@webqit/oohtml 1.9.13 → 1.9.14

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
- (()=>{"use strict";function e(e){return typeof e}function t(e,...t){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var i,r,s=globalThis.WebQitInternalsRegistry.get(e);if(!s){if(s=new Map,!1===t[0])return s;globalThis.WebQitInternalsRegistry.set(e,s)}for(;i=t.shift();)if((r=s)&&!(s=s.get(i))){if(s=new Map,!1===t[0])return s;r.set(i,s)}return s}function i(e){return Array.isArray(e)}function r(e){return"function"==typeof e}function s(e){return r(e)||e&&"[object function]"==={}.toString.call(e)}function n(e){return e instanceof Number||"number"==typeof e}function a(e){return n(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function o(e){return!Array.isArray(e)&&"object"==typeof e&&e}function h(e){return e instanceof String||"string"==typeof e&&null!==e}function c(e){return Array.isArray(e)||"object"==typeof e&&e||r(e)}function l(e){return arguments.length&&(void 0===e||void 0===e)}function p(e,t=!0){return i(e)?e:!t&&o(e)?[e]:!1!==e&&0!==e&&function(e){return function(e){return null===e||""===e}(e)||l(e)||!1===e||0===e||c(e)&&!Object.keys(e).length}(e)?[]:function(e){return!h(e)&&!l(e.length)}(e)?Array.prototype.slice.call(e):o(e)?Object.values(e):[e]}function u(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?e.join(".")===t.join("."):e.length===t.length&&e.reduce(((e,i,r)=>e&&i===t[r]),!0)}function d(e,t,r=null){return i(t)?e.filter((e=>r?t.filter((t=>r(e,t))).length:-1!==t.indexOf(e))):[]}function f(e){return(g(e)?e:p(e).length?[e]:[]).reduce(((e,t)=>e.concat([p(t)])),[]).map((e=>m.resolve(e)))}new Map;class m extends Array{static resolve(e){return e.every((e=>!(e+"").includes(".")))?(new m).concat(e):e}get dotSafe(){return!0}}function g(e){return p(e).reduce(((e,t)=>e||i(t)),!1)}function y(e){return e.filter((e=>e||0===e)).length!==e.length}class b{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=f(t.filter),r=p((t.params||{}).tags),s=f(e.filter),n=p((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!s.length||u(s,i))&&(!n.length||n.length===r.length&&d(r,n).length===n.length)}))}static _getFirebase(i,r,s=!0,n=this.__namespace){if(!c(r))throw new Error('Subject must be of type object; "'+e(r)+'" given!');var a=this;return n&&globalThis.WebQitObserverNamespaceRegistry.has(i+"-"+n)&&(a=globalThis.WebQitObserverNamespaceRegistry.get(i+"-"+n),i+="-"+n),!t(r,"firebases").has(i)&&s&&t(r,"firebases").set(i,new a(r)),t(r,"firebases").get(i)}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 x{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}}class v extends x{fire(e,t,i){return this.disconnected||this.filter&&!d(p(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,i,t)}}function w(e,t){var i=void 0;return c(e)&&Object.keys(e).forEach(((r,s)=>{!1!==i&&(i=t(a(r)?parseFloat(r):r,e[r],s))})),i}class S{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");w(t,((e,t)=>{Object.defineProperty(this,e,{value:t,enumerable:!0})})),Object.seal(this)}}class E extends b{add(e){return super.add(new v(this.target,e))}fire(e,t=null){if(e instanceof S||(e=new S(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=(r,...s)=>{var n=this.fireables[r];return n?n.fire(e,((...e)=>i(r+1,...e)),...s):t?t(...s):s[0]};var r=i(0);return this.currentlyFiring.pop(),r}static getFirebase(e,t=!0,i=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}}function k(e){return t(e,!1).get(e)||e}function C(e,t,i={},r={}){if(!t||!c(t))throw new Error("Target must be of type object!");t=k(t);var s,n=function(r){return arguments.length?r:Reflect[e](t,...Object.values(i))};return(s=E.getFirebase(t,!1,r.namespace))?s.fire({type:e,...i},n):n()}function _(e,t,i,r={}){return C("apply",e,{thisArgument:t,argumentsList:i},r)}function P(e,t,i=null,r={}){return C("construct",e,arguments.length>2?{argumentsList:t,newTarget:i}:{argumentsList:t},r)}function A(e,t=1){var i=0;e.forEach((e=>{i++}));var r=e.slice(e.length-i,t);return arguments.length>1?r:r[0]}function I(e,t=1){return arguments.length>1?A(e.slice().reverse(),t).reverse():A(e.slice().reverse())}function T(e,t){return e.reduce(((e,i,r)=>e||t(i,r)),!1)}function O(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?(e.join(".")+".").startsWith(t.join(".")+"."):t.reduce(((t,i,r)=>t&&i===e[r]),!0)}function N(e,t,i=null,r=!1){var s=function(e,t,i=null,r=!1){return t.length>e.length?-1:("number"==typeof i?r?e.slice(0,i+1+(i<0?e.length:0)):e.slice(i):e).reduce(((e,i,s)=>{var[n,a,o]=e;if(!r&&n>-1)return[n,a,o];var h=o+1,c=i===t[h]?0===h?[s,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]+(r||"number"!=typeof i?0:i>-1?i:e.length-i)}(e,t,i,r);return-1===s?[]:e.slice(s+t.length)}class L{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=o(e)&&!l(e.propagationStopped)&&!l(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 M extends x{constructor(e,t){if(super(e,t),this.filters2D=f(this.filter),this.filtersIsOriginally2D=g(this.filter),this.filtersIsDynamic=this.filters2D.filter((e=>y(p(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&&!T(e,(e=>this.params.type===e.type)))return;const t=e=>!["set","def"].includes(e.type)||!this.params.diff||(s(this.params.diff)?this.params.diff(e.value,e.oldValue):e.value!==e.oldValue);var i=new L(this.target);if(this.filters2D.length){var r=e.filter((e=>this.filters2D.filter(((i,r)=>{var s=i.slice();return this.filtersIsDynamic&&e.path.forEach(((e,t)=>{s[t]=s[t]||0===s[t]?s[t]:e})),(!this.filtersIsDynamic||!y(s))&&t(e)&&(!this.params.subtree&&u(s,e.path)||this.params.suptree&&O(s,e.path)&&(!a(this.params.suptree)||N(s,e.path).length<=this.params.suptree)||this.params.subtree&&e.path.length>=s.length&&O(e.path,s)&&(!a(this.params.subtree)||N(e.path,s).length<=this.params.subtree))})).length));if(r.length)if(this.filtersIsOriginally2D||this.params.subtree){var n=r;o(this.filter)&&(n={...this.filter},r.forEach(((e,t)=>{n[e.name]=e}))),i.respondWith(this.handler(n,i))}else r.forEach(((e,t)=>{i.respondWith(this.handler(e,i))}))}else(this.params.subtree||e.filter((e=>u(e.path,[e.name]))).length===e.length)&&e.filter((e=>t(e))).length&&i.respondWith(this.handler(e,i));return i}}class R{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!");w(t,((e,t)=>{"path"===e&&(t=m.resolve(t)),Object.defineProperty(this,e,{value:t,enumerable:!0})})),this.path||Object.defineProperty(this,"path",{value:m.resolve([t.name]),enumerable:!0}),Object.seal(this)}}class D extends b{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new M(this.target,e))}fire(e,t){var i=new L(this.target,t);return e=p(e,!1).map((e=>e instanceof R?e:new R(this.target,e))),this.buffers.length?(I(this.buffers)(e),i):(this.currentlyFiring.filter((t=>e.filter((e=>t.type===e.type&&t.name===e.name)).length)).length,this.fireables.forEach((r=>{if(i.propagationStopped&&t)return i;i.respondWith(r.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 V(e,r,s=null,n={}){if(!(e=s||e)||!c(e))throw new Error("Target must be of type object!");e=k(e);var a=p(r),o=a.map((i=>{var r,o=function(r){return arguments.length?r:t(e,"accessorizedProps").has(i)&&t(e,"accessorizedProps").get(i).touch(!0)?t(e,"accessorizedProps").get(i).get():s?Reflect.get(e,i,s):Reflect.get(e,i)};return(r=E.getFirebase(e,!0,n.namespace))?r.fire({type:"get",name:i,related:a,receiver:s},o):o()}));return i(r)?o:o[0]}function j(e,t,r=!1,n=!1,h=!1){var l=0,p=e.shift();if((a(p)||!0===p||!1===p)&&(l=p,p=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach(((e,u)=>{var d,f,m;(c(e)||s(e))&&(r?(d=e,m=[],function(e,t){t=(t=t||Object.prototype)&&!i(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}(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((s=>{if(t(s,p,e,u)){var c=p[s],d=e[s];if((i(c)&&i(d)||o(c)&&o(d))&&(!0===l||l>0))p[s]=i(c)&&i(d)?[]:{},j([a(l)?l-1:l,p[s],c,d],t,r,n,h);else if(i(p)&&i(e))n?p[s]=d:p.push(d);else try{h?Object.defineProperty(p,s,Object.getOwnPropertyDescriptor(e,s)):p[s]=e[s]}catch(e){}}}))})),p}function U(...e){return j(e,((e,t,i)=>!0),!1,!1,!1)}function B(t,i,r=null,n={}){if(!(t=k(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(i)&&(n=arguments.length>2?r:{},r=i,i=null),!s(r))throw new Error('Handler must be a function; "'+e(r)+'" given!');var a,o=D.getFirebase(t,!0,n.namespace),h={filter:i,handler:r,params:n};if((h.filter||"*"===h.params.subtree||h.params.subtree&&H(t))&&$(t,h.filter,h.params.subtree,n.namespace),h.params.unique&&(a=o.match({filter:i,params:n})).length){if("replace"!==h.params.unique)return a[0];o.remove(a[0])}return o.add(h)}function F(e,t,i,r=null,s={}){var n;if(e!==i&&(B(i,((i,r)=>{if(n=D.getFirebase(e,!1,s.namespace)){var a=i.map((i=>{var r=i;do{if(r.target===e)return}while(r=r.src);var s={};return w(i,((e,t)=>{"target"!==e&&"name"!==e&&"path"!==e&&"src"!==e&&(s[e]=t)})),s.name=t,s.path=[t].concat(i.path),s.originalSubject=i.originalSubject,s.src=i,new R(e,s)})).filter((e=>e));if(a.length)return n.fire(a,r.cancellable)}}),{subtree:!0,...s,unique:!0,tags:[W,t,e]}),o(r)&&(n=D.getFirebase(e,!1,s.namespace)))){var a=U({name:t,type:"set",value:i,related:[t]},r);let e=n.fire(a,s.cancellable);if(s.eventTypeReturn)return e}}const W={};function $(e,t=null,i=!1,r=null){if(!e||!c(e))throw new Error("Target must be of type object!");var s=D.getFirebase(e,!0,r);if(s&&!s.build){s.build=i;var n=f(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;s.subBuild=o&&o.length?o:null,a.forEach((t=>{var n=V(e,t,null,{namespace:r});try{c(n)&&(F(e,t,n,null,params),(s.subBuild&&H(n)||(_isFunction(i)?i(n):i&&H(n)))&&$(n,s.subBuild,i,r))}catch(e){}}))}}const H=e=>(e instanceof Object||e instanceof Array||e instanceof Function)&&("undefined"==typeof window||e!==window);function q(t,i,r=null,n={}){if(!(t=k(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(i)&&(n=arguments.length>2?r:{},r=i,i=null),r&&!s(r))throw new Error('Handler must be a function; "'+e(r)+'" given!');var a;if(a=D.getFirebase(t,!1,n.namespace))return a.removeMatches({filter:i,originalHandler:r,params:n})}function G(e,t,i,r=null,s={}){var n;if(q(i,null,null,{...s,tags:[W,t,e]}),o(r)&&(n=D.getFirebase(e,!1,s.namespace))){var a=U({name:t,type:"del",oldValue:i,related:[t]},r);n.fire(a,s.cancellable)}}function z(e,t,i={}){return C("has",e,{name:t},i)}function K(e,r,s,a={}){r=s.receiver||r;var l=s.keysOrPayload,u=s.value;if(!r||!c(r))throw new Error("Target must be of type object!");o(l)&&(a=u||{},u=null),r=k(r);var d=E.getFirebase(r,!1,a.namespace),f=D.getFirebase(r,!1,a.namespace);const m=(i,n,o,h)=>{var l,p="set";e&&(p="defineProperty",n=(l=n||{}).value);var u,m=!1;z(r,i,a)&&(m=!0,u=V(r,i,s.receiver,a));var g={name:i,type:p,value:n,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u},y=function(e){return arguments.length&&(l?l=e:n=e),l?!(t(r,"accessorizedProps",!1).has(i)&&!t(r,"accessorizedProps").get(i).restore()||(Object.defineProperty(r,i,l),0)):t(r,"accessorizedProps",!1).has(i)?t(r,"accessorizedProps").get(i).set(n):(r[i]=n,!0)};if(d){var b=l?{type:"defineProperty",name:i,descriptor:l,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u}:{type:"set",name:i,value:n,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u};g.success=d.fire(b,y)}else g.success=y();return g.success&&g.value!==g.oldValue&&(c(g.oldValue)&&G(r,i,g.oldValue,null,a),c(g.value)&&(F(r,i,g.value,null,a),f&&(f.subBuild||f.build&&H(g.value))&&$(g.value,f.subBuild,f.build,a.namespace))),g};var g,y=[];i(l)||(h(l)||n(l))&&(g=p(l))?y=g.map((e=>m(e,u,g,a.detail))):o(l)&&(g=Object.keys(l))&&(y=g.map((e=>m(e,l[e],g,a.detail))));var b,x=y.filter((e=>!1!==e.success));return f?(b=f.fire(x,a.cancellable)).successCount=x.length:a.eventTypeReturn&&(b=new L(r)),a.eventTypeReturn?b:x.length>0}function Q(e,t,i=null,r={}){return K(!0,e,{keysOrPayload:t,value:i},r)}function J(e,i,r={}){if(!e||!c(e))throw new Error("Target must be of type object!");e=k(e);var s,n,a=p(i),o=a.map((i=>{var s;z(e,i,r)&&(s=V(e,i,null,r));var n,o={name:i,type:"deleteProperty",related:a,detail:r.detail,oldValue:s},h=function(r){return arguments.length?r:!(t(e,"accessorizedProps",!1).has(i)&&!t(e,"accessorizedProps").get(i).restore()||(delete e[i],0))};return(n=E.getFirebase(e,!1,r.namespace))?o.success=n.fire({type:"deleteProperty",name:i,oldValue:s,related:a},h):o.success=h(),o.success&&c(o.oldValue)&&G(e,i,o.oldValue,null,r),o})),h=o.filter((e=>!1!==e.success));return(s=D.getFirebase(e,!1,r.namespace))?(n=s.fire(h,r.cancellable)).successCount=h.length:r.eventTypeReturn&&(n=new L(e)),r.eventTypeReturn?n:h.length>0}function X(e,t,i={}){return C("getOwnPropertyDescriptor",e,{name:t},i)}function Y(e,t={}){return C("getPrototypeOf",e,{},t)}function Z(e,t={}){return C("isExtensible",e,{},t)}function ee(e,t={}){return C("ownKeys",e,{},t)}function te(e,t={}){return C("preventExtensions",e,{},t)}function ie(e,t,i=null,r=null,s={}){return K(!1,e,arguments.length>3?{keysOrPayload:t,value:i,receiver:r}:{keysOrPayload:t,value:i},s)}function re(e,t,i={}){return C("setPrototypeOf",e,{prototype:t},i)}function se(e,t=[],r=!0){var n=0;return a(arguments[0])&&c(arguments[1])&&(n=arguments[0],e=arguments[1],t=arguments[2]||[]),j([n,{},e],((e,r,n)=>s(t)?t(e):!i(t)||!t.length||t.indexOf(e)>-1),!1,!1,r)}function ne(e){return e.filter(((e,t,i)=>i.indexOf(e)===t))}const ae={apply:_,construct:P,defineProperty:Q,deleteProperty:J,get:V,getOwnPropertyDescriptor:X,getPrototypeOf:Y,has:z,isExtensible:Z,ownKeys:ee,preventExtensions:te,set:ie,setPrototypeOf:re,accessorize:function(e,r=[],s={}){s=o(r)?r:s;var n=(1===arguments.length?Object.keys(e):p(r)).map((i=>{if(t(e,"accessorizedProps").has(i)&&t(e,"accessorizedProps").get(i).touch(!0))return!1;const r=()=>{for(var t,r=e;!t&&(r=Object.getPrototypeOf(r));)t=Object.getOwnPropertyDescriptor(r,i);return t};var n,a,o=Object.getOwnPropertyDescriptor(e,i);o||(n={writable:!0,enumerable:!(i in e),configurable:!1!==s.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 t=V(e,i,null,s);return c.ongoingGets.pop(),t},h.set=t=>{if(c.ongoingSets.length)return c.set(t);c.ongoingSets.push(1);var r=ie(e,i,t,null,s);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,i,o||n):delete e[i],t(e,"accessorizedProps").delete(i)),!0}catch(e){}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(e,i)||{}).get===h.get},touch:function(e=!1){return this.intact()||!!e&&!this.restore()}};try{return Object.defineProperty(e,i,h),t(e,"accessorizedProps").set(i,c),!0}catch(e){}return!1}));return i(r)?n:n[0]},unaccessorize:function(e,r=[],s={}){s=o(r)?r:s;var n=(1===arguments.length?Object.keys(e):p(r)).map((i=>!t(e,"accessorizedProps",!1).has(i)||t(e,"accessorizedProps").get(i).restore()));return i(r)?n:n[0]},proxy:function(i,n={}){if(!c(i))throw new Error('Object must be of type target; "'+e(i)+'" given!');var a=new Proxy(i,{apply:(e,t,i)=>_(e,t,i,n),construct:(e,t,i=null)=>P(e,t,i,n),defineProperty:(e,t,i)=>Q(e,t,i,n),deleteProperty:(e,t)=>J(e,t,n),get:(e,t,i=null)=>{var o=V(e,t,i,n);return!1!==n.proxyAutoBinding&&s(o)&&!function(e){return r(e)&&/^class\s?/.test(Function.prototype.toString.call(e))}(o)?o.bind(a):o},getOwnPropertyDescriptor:(e,t)=>X(e,t,n),getPrototypeOf:e=>Y(e,n),has:(e,t)=>z(e,t,n),isExtensible:e=>Z(e,n),ownKeys:e=>ee(e,n),preventExtensions:e=>te(e,n),set:(e,t,i,r=null)=>ie(e,t,i,r,n),setPrototypeOf:(e,t)=>re(e,t,n)});return t(a).set(a,i),a},unproxy:k,observe:B,unobserve:q,intercept:function(t,i,r={}){if(!c(t=k(t)))throw new Error('Object must be of type target; "'+e(handler)+'" given!');var n={},a=!0;o(i)||(s(i)?i={"":i}:s(r)&&(i={[i]:r},r=arguments.length>3?arguments[3]:{}),a=!1);var h=E.getFirebase(t,!0,r.namespace);return Object.keys(i).forEach((t=>{if(!s(i[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(i[t])+'" given!');var o,c={filter:t,handler:i[t],params:r};if(c.params.unique&&(o=h.match(c)).length){if("replace"!==c.params.unique)return o[0];h.remove(o[0])}a?n[t]=h.add(c):n=h.add(c)})),n},unintercept:function(t,i=null,r={}){if(!(t=k(t))||!c(t))throw new Error('Object must be of type target; "'+e(t)+'" given!');var n=E.getFirebase(t,!1,r.namespace);_isObject(i)||(s(i)?i={[null]:i}:s(r)&&(i={[i]:r},r=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(n=E.getFirebase(t,!1,r.namespace))&&Object.keys(i).forEach((t=>{if(!s(i[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(i[t])+'" given!');var a={filter:t,originalHandler:i[t],params:r};return n.removeMatches(a)}))},closure:function(e,...t){var r=t.map((e=>{if(!c(e=k(e)))throw new Error("Target must be of type object!");return{target:e,subjectCopy:i(e)?e.slice(0):se(e)}})),s=e(...t);const n=()=>{r.map((e=>{var t,i=Object.keys(e.subjectCopy),r=Object.keys(e.target),s=[],n=ne(i.concat(r)).map((t=>{if(e.subjectCopy[t]!==e.target[t]){s.push(t);var n={name:t,related:s,buffered:!0};return r.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]),c(e.subjectCopy[t])&&G(e.target,t,e.subjectCopy[t]),c(e.target[t])&&F(e.target,t,e.target[t]),n}})).filter((e=>e));if(n.length&&(t=D.getFirebase(e.target,!1)))return t.fire(n)}))};return s instanceof Promise?s.then(n):n(),s},build:$,link:F,unlink:G,Observers:D,Interceptors:E};function oe(e){return!Array.isArray(e)&&"object"==typeof e&&e}function he(){if(!(oe(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=oe(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"),r=!!e.opr&&!!e.opr.addons||!!e.opera||e.navigator.userAgent.indexOf(" OPR/")>=0,s=!!e.document.documentMode,n=!s&&!!e.StyleMedia;return(t||r)&&e.CSS,n?"edge":s?"ie":r?"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 ce{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 r=e(i);if(r){var s=r=>{this.onwrite((()=>{var s=t(r,i);if(s){var n=i=>{this.cycle(e,t,i)};s instanceof Promise?s.then(n):n()}}))};r instanceof Promise?r.then(s):s()}}))}}function le(e){return e instanceof String||"string"==typeof e&&null!==e}function pe(e){return Array.isArray(e)}function ue(e){return arguments.length&&(void 0===e||void 0===e)}function de(e){return null===e||""===e}function fe(e){return"function"==typeof e}function me(e){return Array.isArray(e)||"object"==typeof e&&e||fe(e)}function ge(e,t=!0){return pe(e)?e:!t&&oe(e)?[e]:!1!==e&&0!==e&&function(e){return de(e)||ue(e)||!1===e||0===e||me(e)&&!Object.keys(e).length}(e)?[]:function(e){return!le(e)&&!ue(e.length)}(e)?Array.prototype.slice.call(e):oe(e)?Object.values(e):[e]}function ye(e){const t=he.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 be{constructor(e){this.window=e}onAdded(e,t,i={}){return i.on="added",this.onPresenceChange(e,((e,i,r,s,n)=>{t(e,i,r,s,n)}),i)}onRemoved(e,t,i={}){return i.on="removed",this.onPresenceChange(e,((e,i,r,s,n)=>{t(e,i,r,s,n)}),i)}onPresent(e,t,i={}){ye.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),le(e)?ge(this.window.document.querySelectorAll(e)).forEach((e=>t(e,1))):e.parentNode&&t(e,1)}))}onAbsent(e,t,i={}){ye.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),le(e)?0===ge(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)}))}onPresenceChange(e,t,i={}){e=ge(e,!1);var r=new Set,s=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,r)=>{var s;return t.$$searchCache.has(r)?s=t.$$searchCache.get(r):(s=((e,t)=>{if(t=t.filter((e=>e.matches)),le(e)){var r=t.filter((t=>t.matches(e)));if(!1!==i.observeIndirectMutation&&(r=t.reduce(((t,i)=>t.concat(ge(i.querySelectorAll(e)))),r)).length)return r}else{if(t.includes(e))return[e];if(!1!==i.observeIndirectMutation&&t.length)for(var s=e;s=s.parentNode;)if(t.includes(s))return[e]}})(r,t,le(r))||[],t.$$searchCache.set(r,s)),e.concat(s)}),[])))(e,n)).length&&(i.maintainCallState?(n.forEach((e=>{a?(r.add(e),s.delete(e)):(r.delete(e),s.add(e))})),t(n,a,o,r,s)):t(n,a,o))},a=i.context||this.window.document.documentElement;return this._observe(a,((e,t,r,s)=>{i.ignoreTransients||(n(e,0,!0),n(e.concat(t),1,!0),n(t,0,!0)),n(s,0),n(r,1)}))}onAttrChange(e,t,i=[]){var r=new this.window.MutationObserver(t),s={attributes:!0,attributeOldValue:!0};return i&&(s.attributeFilter=i),r.observe(e,s),r}onTreeChange(e,t,i=!1){var r=new this.window.MutationObserver(t),s={childList:!0,subtree:i};return r.observe(e,s),r}onMutation(e,t,i){var r=new this.window.MutationObserver(t);return r.observe(e,i),r}_observe(e,t){if(!xe.has(e)){const t=new Set,i=new this.window.MutationObserver((e=>{if(t.size){var i=e.reduce(((e,t)=>e.concat(ge(t.addedNodes))),[]),r=e.reduce(((e,t)=>e.concat(ge(t.removedNodes))),[]),s=[],n=[];i=new Set(i),r=new Set(r),i.forEach((e=>{r.has(e)&&(r.delete(e),i.delete(e),e.isConnected?s.push(e):n.push(e))})),i=[...i],r=[...r],t.forEach((e=>e(s,n,i,r)))}}));i.observe(e,{childList:!0,subtree:!0}),xe.set(e,{callbacks:t,observer:i})}const i=xe.get(e);return i.callbacks.add(t),{disconnect(){i.callbacks.delete(t)},reconnect(){i.callbacks.add(t)}}}}const xe=new Map;function ve(e,t=null,i=!1){const r=he.call(this);if(le(e)){var s;if(e.trim().startsWith("<")){var n=r.window.document.createElement("div");n.innerHTML=e,s=i?ge(n.children):n.firstChild}else s=i?ge(Ee.call(this,e,t)):Se.call(this,e,t);return s}return e instanceof r.window.Element?i?[e]:e:i?ge(e):e}function we(e,t=null){return ve.call(this,e,t,!0)}function Se(e,t=null,i=!1){const r=he.call(this);t=t||r.window.document;var s,n=i?"querySelectorAll":"querySelector";try{s=t[n](e)}catch(i){try{s=t[n](e.replace(/\:is\(/g,":matches("))}catch(i){try{s=t[n](e.replace(/\:is\(/g,":-webkit-any("))}catch(i){try{s=t[n](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return s}function Ee(e,t=null){return Se.call(this,e,t,!0)}function ke(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function Ce(e){return fe(e)||e&&"[object function]"==={}.toString.call(e)}function _e(e,t,i={},r={}){t=ge(t).slice();for(var s=e;!ue(s)&&!de(s)&&t.length;){var n=t.shift();if(!(i.get?i.get(s,n):me(s)?n in s:s[n]))return void(r.exists=!1);s=i.get?i.get(s,n):s[n]}return r.exists=!0,s}function Pe(e,t,i,r={},s={}){const n=(e,i,r)=>s.set?s.set(e,i,r):(ke(t[o])&&pe(e)?e.push(r):e[i]=r,!0);t=ge(t);for(var a=e,o=0;o<t.length;o++){if(!(o<t.length-1))return n(a,t[o],i);if(!a||!me(a)&&!Ce(a))return!1;var h=_e(a,t[o],s);if(!me(h)){if(!1===s.buildTree)return!1;if(h=Ce(s.buildTree)?s.buildTree(o):ke(t[o+1])?[]:{},!n(a,t[o],h))return!1}a=h}}function Ae(e,t,i=!1,r={}){t=ge(t);var s=!1;do{var n=""===(n=t.pop())?0:n,a=e;t.length&&(a=_e(e,t,{},r)),(me(a)||Ce(a))&&(r.has?r.has(a,n):n in a)&&(r.deleteProperty?s=r.deleteProperty(a,n):r.del?s=r.del(a,n):(delete a[n],s=!0))}while(s&&i&&t.length&&(me(a)||Ce(a))&&!(r.keys?r.keys(a):Object.keys(a)).length);return s}function Ie(e,t,i={}){var r={};return _e(e,t,i,r),r.exists}function Te(e,t=!1){const i=he.call(this);var r={};return!(r.el=i.window.document.head.querySelector('meta[name="oohtml"]'))&&t&&(r.el=i.window.document.createElement("meta"),r.el.setAttribute("name",e),i.window.document.head.append(r.el)),r.el&&(r.vars=(r.el.getAttribute("content")||"").split(";").filter((e=>e)).reduce(((e,t)=>{var i=t.split("=").map((e=>e.trim()));return Pe(e,i[0].split("."),"true"===i[1]||"false"!==i[1]&&(ke(i[1])?parseInt(i[1]):i[1])),e}),{})),r.get=function(e){return _e(this.vars,e.split("."))},r.set=function(e,i=null,r=!1){var s=oe(e)?e:{[e]:!0===i?"true":i};if(r=arguments.length<3?i:r,Object.keys(s).forEach((e=>{if(!1===s[e])Ae(this.vars,e.split("."));else if(oe(s[e]))Object.keys(s[e]).forEach((t=>{var i=(e+"."+t).split(".");r&&Ie(this.vars,i)||Pe(this.vars,i,s[e][t])}));else{var t=e.split(".");r&&Ie(this.vars,t)||Pe(this.vars,t,s[e])}})),t){const e=(t,i)=>Object.keys(i).reduce(((r,s)=>{var n=(t?t+".":"")+s;return oe(i[s])?r.push(...e(n,i[s])):r.push(n+"="+i[s]),r}),[]);this.el.setAttribute("content",e("",this.vars).join(";"))}return!0},r.defaults=function(e,t=null){return this.set(e,t,!0)},r}function Oe(){const e=he.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 ce(e.window),e.DOM.mutations=new be(e.window),e.DOM.meta=Te.bind(e.window),e.DOM.query=ve.bind(e.window),e.DOM.queryAll=we.bind(e.window),e.DOM.ready=ye.bind(e.window)),e}function Ne(e,t,i=!1){for(var r=e.indexOf(t);r>-1&&(i||!1===i);)e.splice(r,1),i>0&&i--,r=e.indexOf(t);return e}function Le(e,t,i){return function(e,t){return function(e,t,i=!1){if(""==t)return e;var r=i?e.lastIndexOf(t):e.indexOf(t);return-1===r?e:e.substr(0,r)}(e,t,!0)}(function(e,t,i=!1){if(""==t)return e;var r=i?e.lastIndexOf(t):e.indexOf(t);return-1===r?"":e.substr(r+t.length)}(e,t),i)}const Me=function(e,t=1,r=!0){return!a(t)||t<=0?e:(!i(e)&&o(e)&&r&&(e=Object.values(e)),i(e)?e.reduce(((e,s)=>i(s)||o(s)&&r?e.concat(Me(i(s)?s:Object.values(s),t-1,r)):e.concat(s)),[]):e)},Re=Me;function De(e){return o(e)&&Object.getPrototypeOf(e)===Object.prototype}function Ve(e){return!0===e||!1===e}const je=function(e,t,r=!0,a=1){if(i(e)&&i(t)&&e.length!==t.length)return!r;if(o(e)&&o(t)){var h=Object.keys(e),l=Object.keys(t);if(!h.length&&!l.length)return De(e)&&De(t)?r:e===t===r;if(!je(h,l))return!r}if(a>0&&(i(e)&&i(t)||o(e)&&o(t))){var p=function(e,t,r=!0,s=!0,n=!1,a=!1){if(i(e)&&i(t)){var h=[],l=!0;return e.forEach((e=>{if(l){var p=!1;w(t,((t,n)=>{(!p||s&&c(e))&&((i(p=r(e,n))&&!p.length||o(p)&&!Object.keys(p).length)&&(p=!1),c(p)&&s&&(e=p))})),c(p)?h.push(s?p:e):Ve(p)?n&&!p||!n&&p?h.push(e):a&&(l=!1):h.push(p)}})),h}if(o(e)&&o(t))return h={},l=!0,Object.keys(e).forEach((p=>{if(l){var u=r(e[p],t[p]);(i(u)&&!u.length||o(u)&&!Object.keys(u).length)&&(u=!1),c(u)?h[p]=s?u:e[p]:Ve(u)?n&&!u||!n&&u?h[p]=e[p]:a&&(l=!1):h[p]=u}})),h}(e,t,((e,t)=>je(e,t,r,a-1)),!1,!1,!0);return i(p)?p.length===e.length&&p.length===t.length:o(p)&&o(e)?Object.keys(p).length===Object.keys(e).length&&Object.keys(p).length===Object.keys(t).length:p}return s(r)?r(e,t):n(e)&&n(t)&&isNaN(e)&&isNaN(t)?r:e===t===r},Ue=je;function Be(e,t=[]){return j([{},e],((e,r,n)=>{if(!s(n[e]))return s(t)?t(e):!i(t)||!t.length||t.indexOf(e)>-1}),!1,!1,!1)}class Fe{static lex(e,t,i={}){if(!h(e+=""))throw new Error("Argument1 must be a string!");var r=e=>({delims:e.delims.slice(),options:Be(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:Be(e.matchesi)});if(Fe.$cache[e]&&!1!==i.cache)for(var s=0;s<Fe.$cache[e].length;s++){var n=Fe.$cache[e][s];if(Ue(n.delims,t))return r(n)}var a=new Fe(e,i).lex(t);return!1!==i.cache&&(Fe.$cache[e]=Fe.$cache[e]||[],Fe.$cache[e].push(a)),r(a)}static split(e,t,i){return Fe.lex(e,t,i).tokens}static match(e,t,i){return Fe.lex(e,t,i).matches}constructor(e,t){if(!h(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=Fe.$blocks),this.$options.quotes||(this.$options.quotes=Fe.$quotes),this.$options.comments||(this.$options.comments=Fe.$comments)}lex(e,t){for(var i={delims:p(e),options:U(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},r=0;"number"==typeof r;)r=this._evalCharsAt(i,r);if(i.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Re(i.nesting).join(", "));return i}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var i=1,r={},s={},n={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(r=this._testComments(e,t)),e.openComment||r.ending)e.nesting.length||n.ending?this._push(e,this.$str[t]):(i=(o=r.starting||r.ending||this.$str[t]).length,this._push(e,o,"comments",r.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;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((r=>{this.$str.substr(t,1)===r&&(e.openQuote?r===e.openQuote&&(e.openQuote=!1,i.ending=r):(e.openQuote=r,i.starting=r))})),i}_testComments(e,t){var i={};return(e.options.comments||[]).forEach((r=>{if(e.openComment){if(I(r)===I(e.openComment)){var s=I(r);this.$str.substr(t).startsWith(s)&&(e.openComment=!1,i.ending=s)}}else{var n=A(r);this.$str.substr(t).startsWith(n)&&(e.openComment=r,i.starting=n)}})),i}_testNesting(e,t){var i={};return(e.options.blocks||[]).forEach((r=>{var s=A(r);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([r]),i.starting=s;else if(e.nesting.length&&I(r)===I(I(e.nesting))){var n=I(r);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 r=0;r<e.length;r++){var n=e[r];if(s(n)){var a=n(this.$str.substr(0,i),this.$str.substr(i),t.tokens.slice());if(!1!==a)return a}if(t.options.useRegex){var o=this.$str.substr(i).match(new RegExp("^"+n,!0!==t.options.useRegex?t.options.useRegex:""));if(o)return o[0]}if(!t.options.ci&&this.$str.substr(i,n.length)===n||t.options.ci&&this.$str.substr(i,n.length).toLowerCase()===n.toLowerCase())return n}return!1}_push(e,t,i="tokens",r=!1){var s=e.matches.length;if(l(e.tokens[s])&&(e.tokens[s]=""),"comments"===i){e.tokens[s].comments||(e.tokens[s]=new String(e.tokens[s]),e.tokens[s].comments=[]);var n=e.tokens[s].comments.length-(!e.tokens[s].comments.length||r?0:1);e.tokens[s].comments[n]=(e.tokens[s].comments[n]||"")+t}else e.tokens[s].comments,e.tokens[s]=e.tokens[s]+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,U({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}function We(e,t={}){const i=Oe.call(this);return i.OOHTML||(i.OOHTML={}),i.OOHTML.meta||(i.OOHTML.meta=i.DOM.meta("oohtml",!0)),i.OOHTML.meta.defaults(U(3,e,t)),i.OOHTML.meta}function $e(e,t,i,r=null){var s=t.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e));return ze(e,s,i,r)}function He(e){var t=Fe.split(e.trim(),[":"]);return[e=t.shift(),t.reduce(((e,t)=>{var[i,r]=Fe.split(t.trim(),[]);return e[i]=Le(r,"(",")"),e}),{})]}Fe.$blocks=[["(",")"],["[","]"],["{","}"]],Fe.$quotes=['"',"'","`"],Fe.$comments=[["/*","*/"],["//","\n"]],Fe.$cache=Object.create(null);const qe=(e,t)=>Fe.split(e.trim(),["|","+"],{preserveDelims:!0}).reduce(((e,i)=>{var r;return(i.startsWith("|")||i.startsWith("+"))&&(r=i.substr(0,1),i=i.substr(1).trim()),e.theEnd||"|"===r&&e.length?(e.theEnd=!0,e):e.concat(t(i.trim()))}),[]).filter((e=>e)),Ge=(e,t,i)=>{const r=e=>e.reduce(((e,t)=>e.concat(...i(t).values())),[]);return qe(t,(t=>{var[t,s]=He(t);return e.reduce(((e,n)=>{var a=i(n);"*"===t&&(t="("+a.keys().join("+")+")");var o,h=("(",")",(o=t).startsWith("(")&&o.endsWith(")")?Ge([n],Le(t,"(",")"),i):p(a.get(t),!1)),c=[];return Object.keys(s).forEach((e=>{if("deep"===e||"deepest"===e)for(var a=[n];("deepest"===e||!h.length)&&(a=r(a)).length;){var o=Ge(a,`${t}${c.map((e=>`:${e}(${s[e]})`)).join("")}`,i);o.length&&(h=o)}else"having"!==e&&"not-having"!==e||(h=h.filter((t=>{var r=qe(s[e],(e=>i(t,e)));return"not-having"===e?!r.length:r.length}))),c.push(e)})),e.concat(h)}),[])}))},ze=function(e,t,i,r=null,s=0){if(!t.length)return[];var n,a=t.shift();a.endsWith(".")&&(n=!0,a=a.substr(0,a.length-1).trim());var o=Ge(e,a,i);if(o.length&&n)return o;if(t.length){var h=ze(o,t.slice(),i,r,s+1);return-1===h?r(o,s,!0):h}return r?r(o,s):o};function Ke(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Ke.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=We.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")+'"]':"")+"["+s.CSS.escape(o.get("attr.moduleid"))+"]";var c=s.HTMLTemplateElement;if(o.get("api.templateClass")){if(!s[o.get("api.templateClass")])throw new Error('The custom element class "'+o.get("api.templateClass")+'" is not defined!');c=s[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 s.CustomEvent(e,{detail:t}))},u=(e,t)=>{const i=i=>{e.dispatchEvent(new s.CustomEvent(i,{detail:{path:t}}))};var r=e.getAttribute("src");return new Promise(((n,a)=>{s.fetch?s.fetch(r).then((e=>e.ok?e.text():Promise.reject(e.statusText))).then((r=>{e.innerHTML=r,i("load"),l("templatecontentloaded",{template:e},t),n(e)})).catch((s=>{console.error("Error fetching the bundle at "+r+". ("+s+")"),e.innerHTML="",i("loaderror"),l("templatecontentloaderror",{template:e},t),n(e)})):(n(),console.error("Error fetching the bundle at "+r+". (window.fetch() not supported by browser.)"))}))},d=(e,i,r,n=null,c=!0)=>{const m=(e,s,n,a)=>{var c;if(e.matches)if(e.matches(h)&&(c=e.getAttribute(o.get("attr.moduleid")))&&g(c)){var l=(r?r+"/":"")+c;"removed"===n?(t(i,"oohtml","templates").delete(c),t(i,"oohtml").get("parentTemplate")===i&&t(i,"oohtml").delete("parentTemplate"),s&&(s.removedTemplates[c]=e)):"added"===n&&(t(i,"oohtml","templates").set(c,e),t(e,"oohtml").set("parentTemplate",i),s&&(s.addedTemplates[c]=e)),d(e.content,e,l,n,a)}else{const r=e=>{var r=e.getAttribute(o.get("attr.exportgroup"))||"default";"removed"===n?t(i,"oohtml","exports").has(r)&&(Ne(t(i,"oohtml","exports").get(r),e),t(i,"oohtml","exports").has(r).length||t(i,"oohtml","exports").delete(r),s&&(s.removedExports[r]||(s.removedExports[r]=[]),s.removedExports[r].push(e))):"added"===n&&(t(i,"oohtml","exports").has(r)||t(i,"oohtml","exports").set(r,[]),t(i,"oohtml","exports").get(r).push(e),s&&(s.addedExports[r]||(s.addedExports[r]=[]),s.addedExports[r].push(e)))};if(e.matches(o.get("element.export"))){var u=e.getAttribute(o.get("attr.exportid"))||"default";p(e.children).forEach((e=>{e.setAttribute(o.get("attr.exportgroup"),u),r(e)}))}else r(e)}};i.modulemutationsType=n;const y={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};if(p(e.children).forEach((e=>m(e,y,n,c))),c&&l("templatemutation",y,r),"added"===n&&!t(i,"oohtml").get("onLiveMode")){t(i,"oohtml").set("onLiveMode",!0),i.getAttribute("src")&&!i.content.children.length&&f.push(u(i,r)),a.onAttrChange(i,(e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&u(i,r)}),["src"]);var b=new s.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,r)}));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(t(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(t(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(t(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(p(n.querySelectorAll(h)).forEach((async e=>{var i=e.getAttribute(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(i)&&(t(n,"oohtml","templates").set(i,e),d(e.content,e,i,"added",!1))})),a.onPresenceChange(h,(async(e,i)=>{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(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(s)&&(i?(t(n,"oohtml","templates").set(s,e),d(e.content,e,s,"added"),r.addedTemplates[s]=e):(t(n,"oohtml","templates").get(s)===e&&t(n,"oohtml","templates").delete(s),d(e.content,e,s,"removed"),r.removedTemplates[s]=e))})),l("templatemutation",r,"")})),a.onPresent(o.get("element.import"),(e=>{d(e,e,"","added",!1)})),o.get("api.moduleref")in s.Element.prototype)throw new Error('The "Element" class already has a "'+o.get("api.moduleref")+'" property!');Object.defineProperty(s.Element.prototype,o.get("api.moduleref"),{get:function(){var e;if(!t(this,"oohtml").has("module")&&(e=this.getAttribute(o.get("attr.moduleref")))){var i=(e=>{var i=n.createElement("template");return $e([n],e,(function(e,i){var r=t(e,"oohtml","templates");return 1===arguments.length?r:i.startsWith(":")?t(e,"oohtml","exports").get(i.substr(1)):r.get(i)})).forEach((e=>{t(e,"oohtml","templates").forEach(((e,r)=>{t(i,"oohtml","templates").set(r,e)})),t(e,"oohtml","exports").forEach(((e,r)=>{t(i,"oohtml","exports").has(r)||t(i,"oohtml","exports").set(r,[]),t(i,"oohtml","exports").get(r).push(...e)}))})),i})(e);t(this,"oohtml").set("module",i)}return t(this,"oohtml").get("module")}});var y=f.length?"loading":"indeterminate";Object.defineProperty(n,"templatesReadyState",{get:()=>y}),r.DOM.ready.call(r,(()=>(f.forEach((e=>{e.catch((e=>{console.warn(e)}))})),Promise.all(f).then((()=>{y="complete",n.dispatchEvent(new s.Event("templatesreadystatechange"))})))))}function Qe(e,t,r=null){return i(t)?e.filter((e=>r?t.filter((t=>r(e,t))).length:-1===t.indexOf(e))):[]}function Je(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Je.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=[],h=We.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},e);Xe.push(h.get("attr.importid"),h.get("attr.moduleref"));const c="["+s.CSS.escape(h.get("attr.moduleref"))+"]",l="["+s.CSS.escape(h.get("attr.exportgroup"))+"]",u=class{static create(e){return t(this.el,"oohtml").get("instance")||new u(e)}constructor(e){this.el=e,t(this.el,"oohtml").set("instance",this);const[i,r]=He(e.getAttribute(h.get("attr.importid"))||"default");t(this.el,"oohtml").set("importID",i),t(this.el,"oohtml").set("importModifiers",r)}hydrate(e,i,r){t(this.el,"oohtml").set("anchorNode",e),t(this.el,"oohtml").set("slottedElements",i),t(this.el,"oohtml").set("compositionBlock",r),this._bindSlotted(i),this._connectToCompositionBlock()}connectedCallback(){t(this.el,"oohtml").has("anchorNode")||(t(this.el,"oohtml").set("anchorNode",h.get("isomorphic")?n.createComment(this.el.outerHTML):n.createTextNode("")),t(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()),r.DOM.ready.call(r,(()=>{this.resolve()}))}_connectToCompositionBlock(){this.compositionBlock&&t(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(e){e.forEach((e=>{e.importReference=this.el})),t(this.el,"oohtml").set("slottedObserver",a.onRemoved(e,((i,r,s,n,a)=>{a&&a.size===e.length&&t(this.el,"oohtml").get("slottedObserver").disconnect(),i.forEach((e=>{e.parentNode||Ne(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(!T(o,(e=>this.el.closest(e)))){var e,i;if(this.el.hasAttribute(h.get("attr.moduleref")))this.compositionBlock&&t(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&t(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(h.get("attr.moduleref")).trim(),s=this.el.getAttribute(h.get("attr.exportsearch"));e&&(i=((e,i,r)=>{var s=this.importID,n=this.importModifiers,[a,o]="search"in n||null!==r?("search"in n?n.search:r).split("-").filter((e=>e)).map((e=>parseInt(e||0))).concat([0,1e3]):[0,0];return $e(e,i,(function(e,i){var r=t(e,"oohtml","templates");return 1===arguments.length?r:i.startsWith(":")?t(e,"oohtml","exports").get(i.substr(1)):r.get(i)}),(function(e,i,r){var n=e.reduce(((e,i)=>e.concat(t(i,"oohtml","exports").get(s)||[])),[]);return!n.length&&i>a&&o?(o--,-1):n}))})([r.startsWith("~")?this.compositionBlock:n],r,s)).length?Qe(i,t(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(t(this.el,"oohtml").set("originalSlottedElements",i),this.fill(i)):(t(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(e){e=p(e,!1).map((e=>e.cloneNode(!0))),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),e.forEach((e=>{t(e,"oohtml","templates").set("~",this.el),function(e,t,i=[],r=!0){if(i=i.concat(Xe),e.hasAttribute("noinherit")&&(i=i.concat((e.getAttribute("noinherit")||"*").split(" ").map((e=>e.trim())))),ne(Ze.concat(["role","class"])).forEach((s=>{var n,a;if(!i.includes(s)&&!i.includes("*")&&(n=t.getAttribute(s))){if(a=e.getAttribute(s))var o=r?[a,n]:[n,a];else o=[n];e.setAttribute(s,ne(o.join(" ").split(" ").map((e=>e.trim()))).join(" ")),i.push(s)}})),ne(Ye.concat("style")).forEach((s=>{var n,a;if(!i.includes(s)&&!i.includes("*")&&(n=t.getAttribute(s))){if(a=e.getAttribute(s))(o=r?[a,n]:[n,a])[0].trim().endsWith(";")||(o[0]=o[0]+";");else var o=[n];e.setAttribute(s,o.join(" ")),i.push(s)}})),!i.includes("*"))for(var s=0;s<t.attributes.length;s++){var n=t.attributes[s];i.includes(n.name)||e.hasAttribute(n.name)&&!r||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 i=this.slottedElements;e&&t(this.el,"oohtml").has("slottedObserver")&&(t(this.el,"oohtml").get("slottedObserver").disconnect(),i=this.slottedElements.splice(0)),i.forEach((e=>e.remove()))}}get importID(){return t(this.el,"oohtml").get("importID")}get importModifiers(){return t(this.el,"oohtml").get("importModifiers")}get anchorNode(){return t(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return t(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return t(this.el,"oohtml").has("slottedElements")||t(this.el,"oohtml").set("slottedElements",[]),t(this.el,"oohtml").get("slottedElements")}get exports(){return t(this.el,"oohtml").get("exports")}static get observedAttributes(){return[h.get("attr.importid")]}};a.onPresent(h.get("element.import"),(e=>{u.create(e).connectedCallback()}));const d=(e,i)=>{const r=(e,t)=>!i||t===i||!0===i&&(this.importModifiers&&"search"in this.importModifiers||e.getAttribute(h.get("attr.exportsearch")));if(e.matches(h.get("element.import"))){var s=u.create(e);s.connectedCallback(),r(e,s.importID)&&s.resolve()}else t(e,"oohtml","imports").forEach(((e,t)=>{r(e,t)&&u.create(e).resolve()}))};a.onPresent(c,(e=>{T(o,(t=>e.closest(t)))||a.onAttrChange(e,(t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&d(e)}),[h.get("attr.moduleref"),h.get("attr.importid")])})),n.addEventListener("templatemutation",(e=>{e.detail.path&&p(n.querySelectorAll("["+s.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,r)=>!!e&&Fe.split(i.trim(),["|","+"]).reduce(((e,i)=>{var[i,s]=He(i),n=(i=i.trim())===t[r];if(!n&&("deep"in s||"deepest"in s)){var a=t.slice(r+1).reduce(((e,t,r)=>e>-1&&"deep"in s?e:t===i?r:e),-1);a>-1&&(t.splice(r,a+1),n=!0)}return e||n}),!1)),!0)})(t.getAttribute(h.get("attr.moduleref")),e.detail.path)&&(d(t,!0),e.detail.addedExports.concat(e.detail.removedExports).forEach((e=>{d(t,e.name)})))}))})),r.DOM.ready.call(r,(()=>{h.get("isomorphic")&&p(n.querySelectorAll(l)).forEach((e=>{if(!t(e.parentNode,"oohtml").get("importsCan")&&!e.importReference){var i=[];e.parentNode.childNodes.forEach((e=>{var t;if(1===e.nodeType&&e.matches(l))i.push(e);else if(8===e.nodeType&&(t=e.nodeValue.trim())&&t.startsWith("<"+h.get("element.import"))&&t.endsWith("</"+h.get("element.import")+">")){var r,s=n.createElement("div");if(s.innerHTML=t,(r=s.firstChild).matches(h.get("element.import"))){var a=r.hasAttribute(h.get("attr.moduleref"))?r.getAttribute(h.get("attr.moduleref")).trim().startsWith("~")?e.parentNode.closest(l):null:e.parentNode.closest(c);u.create(r).hydrate(e,i,a),i=[]}}})),t(e.parentNode,"oohtml").set("importsCan",!0)}}))}))}const Xe=["nocompose"],Ye=[],Ze=[];function et(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{et.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=[],c=We.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},e),l=function(e){if(!t(e,"oohtml").has("namespace")){const i=Object.create(null);t(e,"oohtml").set("namespace",i),ae.link&&ae.link(e,c.get("api.namespace"),i)}return t(e,"oohtml").get("namespace")},u=function(e){if(!t(e,"oohtml").has("publicNamespace")){const i=l(e);t(e,"oohtml").set("publicNamespace",c.get("eagermode")?new Proxy(i,{get(t,r){if(h(r)&&!i[r]){var a=p(e.querySelectorAll("["+s.CSS.escape(c.get("attr.id"))+'="'+r+'"]')).filter((t=>{var i=t.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");return e===n?!i:i===e}))[0];a&&ae.set(i,r,a)}return i[r]}}):i)}return t(e,"oohtml").get("publicNamespace")};if(c.get("api.namespace")in s.Element.prototype)throw new Error('The "Element" class already has a "'+c.get("api.namespace")+'" property!');if(Object.defineProperty(s.Element.prototype,c.get("api.namespace"),{get:function(){return u(this)}}),c.get("api.namespace")in n)throw new Error('The "document" object already has a "'+c.get("api.namespace")+'" property!');Object.defineProperty(n,c.get("api.namespace"),{get:function(){return u(n)}}),a.onPresent("["+s.CSS.escape(c.get("attr.id"))+"]",(e=>{var i=t(e,"oohtml");if(!i.get("idAlreadyBeingWatched")&&!T(o,(t=>e.closest(t)))){var r=e.getAttribute(c.get("attr.id")),h=e.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");h||(h=n);var p=l(h);p[r]!==e&&ae.set(p,r,e),i.set("idAlreadyBeingWatched",!0),a.onPresenceChange(e,((t,i)=>{i?p[r]!==e&&ae.set(p,r,e):p[r]===e&&ae.deleteProperty(p,r)}))}}))}function tt(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{tt.call(this,e,!1)}));const s=r.window,n=r.window.document,a=We.call(this,{api:{state:"state",setState:"setState",clearState:"clearState"}},e),o=function(e,i=null){if(!t(e,"oohtml").has("state")||i){const r=i||Object.create(null),s=t(e,"oohtml").get("state");if(t(e,"oohtml").set("state",r),s&&ae.unlink&&ae.unlink(e,a.get("api.state"),s),ae.link){let t=i?{isUpdate:!!s,oldValue:s}:null;ae.link(e,a.get("api.state"),r,t)}}return t(e,"oohtml").get("state")};if(a.get("api.state")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.state")+'" property!');if(Object.defineProperty(s.Element.prototype,a.get("api.state"),{get:function(){return ae.proxy(o(this))}}),a.get("api.setState")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.setState")+'" property!');if(Object.defineProperty(s.Element.prototype,a.get("api.setState"),{value:function(e,t={}){if(t.update){var i=o(this);if("merge"!==t.update){var r=Qe(Object.keys(i),Object.keys(e));ae.deleteProperty(i,r)}ae.set(i,e)}else o(this,e)}}),a.get("api.clearState")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.clearState")+'" property!');if(Object.defineProperty(s.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 ae.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 r=Qe(Object.keys(i),Object.keys(e));ae.deleteProperty(i,r)}ae.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{stringify:it}=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 rt={"||":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},st=17,nt={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:st,ClassExpression:st,FunctionExpression:st,ObjectExpression:st,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function at(e,t){const{generator:i}=e;if(e.write("("),null!=t&&t.length>0){i[t[0].type](t[0],e);const{length:r}=t;for(let s=1;s<r;s++){const r=t[s];e.write(", "),i[r.type](r,e)}}e.write(")")}function ot(e,t,i,r){const s=e.expressionsPrecedence[t.type];if(s===st)return!0;const n=e.expressionsPrecedence[i.type];return s!==n?!r&&15===s&&14===n&&"**"===i.operator||s<n:(13===s||14===s)&&("**"===t.operator&&"**"===i.operator?!r:r?rt[t.operator]<=rt[i.operator]:rt[t.operator]<rt[i.operator])}function ht(e,t,i,r){const{generator:s}=e;ot(e,t,i,r)?(e.write("("),s[t.type](t,e),e.write(")")):s[t.type](t,e)}function ct(e,t,i,r){const s=t.split("\n"),n=s.length-1;if(e.write(s[0].trim()),n>0){e.write(r);for(let t=1;t<n;t++)e.write(i+s[t].trim()+r);e.write(i+s[n].trim())}}function lt(e,t,i,r){const{length:s}=t;for(let n=0;n<s;n++){const s=t[n];e.write(i),"L"===s.type[0]?e.write("// "+s.value.trim()+"\n",s):(e.write("/*"),ct(e,s.value,i,r),e.write("*/"+r))}}function pt(e,t){const{generator:i}=e,{declarations:r}=t;e.write(t.kind+" ");const{length:s}=r;if(s>0){i.VariableDeclarator(r[0],e);for(let t=1;t<s;t++)e.write(", "),i.VariableDeclarator(r[t],e)}}let ut,dt,ft,mt,gt,yt;const bt={Program(e,t){const i=t.indent.repeat(t.indentLevel),{lineEnd:r,writeComments:s}=t;s&&null!=e.comments&&lt(t,e.comments,i,r);const n=e.body,{length:a}=n;for(let e=0;e<a;e++){const a=n[e];s&&null!=a.comments&&lt(t,a.comments,i,r),t.write(i),this[a.type](a,t),t.write(r)}s&&null!=e.trailingComments&&lt(t,e.trailingComments,i,r)},BlockStatement:yt=function(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,n=i+t.indent;t.write("{");const a=e.body;if(null!=a&&a.length>0){t.write(r),s&&null!=e.comments&&lt(t,e.comments,n,r);const{length:o}=a;for(let e=0;e<o;e++){const i=a[e];s&&null!=i.comments&&lt(t,i.comments,n,r),t.write(n),this[i.type](i,t),t.write(r)}t.write(i)}else s&&null!=e.comments&&(t.write(r),lt(t,e.comments,n,r),t.write(i));s&&null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write("}"),t.indentLevel--},ClassBody:yt,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===st||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:r,writeComments:s}=t;t.indentLevel++;const n=i+t.indent,a=n+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+r);const{cases:o}=e,{length:h}=o;for(let e=0;e<h;e++){const i=o[e];s&&null!=i.comments&&lt(t,i.comments,n,r),i.test?(t.write(n+"case "),this[i.test.type](i.test,t),t.write(":"+r)):t.write(n+"default:"+r);const{consequent:h}=i,{length:c}=h;for(let e=0;e<c;e++){const i=h[e];s&&null!=i.comments&&lt(t,i.comments,a,r),t.write(a),this[i.type](i,t),t.write(r)}}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]?pt(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:ut=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:i}=e;"V"===i.type[0]?pt(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:ut,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:dt=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),at(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:dt,VariableDeclaration(e,t){pt(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:r}=i,s=t.expressionsPrecedence[r];"C"===r[0]&&"l"===r[1]&&"E"===r[5]||!(s===st||s<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:r}=i;let s=0;if(r>0){for(;s<r;){s>0&&t.write(", ");const e=i[s],r=e.type[6];if("D"===r)t.write(e.local.name,e),s++;else{if("N"!==r)break;t.write("* as "+e.local.name,e),s++}}if(s<r){for(t.write("{");;){const e=i[s],{name:n}=e.imported;if(t.write(n,e),n!==e.local.name&&t.write(" as "+e.local.name),!(++s<r))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:r}=i;if(r>0)for(let e=0;;){const s=i[e],{name:n}=s.local;if(t.write(n,s),n!==s.exported.name&&t.write(" as "+s.exported.name),!(++e<r))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),at(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]):at(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:ft=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:ft,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),ht(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:i,expressions:r}=e;t.write("`");const{length:s}=r;for(let e=0;e<s;e++){const s=r[e],n=i[e];t.write(n.value.raw,n),t.write("${"),this[s.type](s,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){ht(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:gt=function(e,t){if(t.write("["),e.elements.length>0){const{elements:i}=e,{length:r}=i;for(let e=0;;){const s=i[e];if(null!=s&&this[s.type](s,t),!(++e<r)){null==s&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:gt,ObjectExpression(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,n=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(r),s&&null!=e.comments&&lt(t,e.comments,n,r);const a=","+r,{properties:o}=e,{length:h}=o;for(let e=0;;){const i=o[e];if(s&&null!=i.comments&&lt(t,i.comments,n,r),t.write(n),this[i.type](i,t),!(++e<h))break;t.write(a)}t.write(r),s&&null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write(i+"}")}else s?null!=e.comments?(t.write(r),lt(t,e.comments,n,r),null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write(i+"}")):null!=e.trailingComments?(t.write(r),lt(t,e.trailingComments,n,r),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:r}=i;for(let e=0;this[i[e].type](i[e],t),++e<r;)t.write(", ")}t.write("}")},SequenceExpression(e,t){at(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:i,argument:r,argument:{type:s}}=e;t.write(i);const n=ot(t,r,e);n||!(i.length>1)&&("U"!==s[0]||"n"!==s[1]&&"p"!==s[1]||!r.prefix||r.operator[0]!==i||"+"!==i&&"-"!==i)||t.write(" "),n?(t.write(i.length>1?" (":"("),this[s](r,t),t.write(")")):this[s](r,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:mt=function(e,t){const i="in"===e.operator;i&&t.write("("),ht(t,e.left,e,!1),t.write(" "+e.operator+" "),ht(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:mt,ConditionalExpression(e,t){const{test:i}=e,r=t.expressionsPrecedence[i.type];r===st||r<=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===st||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),at(t,e.arguments)},CallExpression(e,t){const i=t.expressionsPrecedence[e.callee.type];i===st||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("?."),at(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const i=t.expressionsPrecedence[e.object.type];i===st||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(it(e.value),e)},RegExpLiteral(e,t){const{regex:i}=e;t.write(`/${i.pattern}/${i.flags}`,e)}},xt={};class vt{constructor(e){const t=null==e?xt:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:bt,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:nt,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:r}=this;for(let s=0;s<t;s++)"\n"===e[s]?(i=0,r++):i++;return this.column=i,void(this.line=r)}}const{length:i}=e,{lineEnd:r}=this;i>0&&(this.lineEndSize>0&&(1===r.length?e[i-1]===r:e.endsWith(r))?(this.line+=this.lineEndSize,this.column=0):this.column+=i)}toString(){return this.output}}class wt{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 r=t();return Object.keys(e).forEach((e=>{this[e]=i[e]})),r}inUse(e){return arguments.length?(e?this.dependencies++:this.dependencies--,this):this.dependencies>0}}class St extends wt{constructor(e,t,i={}){super(t,i),this.ownerUnit=e,this.refs=new Set,this.propertyStack=[],this.embeddingReference=null}withProperty(e,t){this.propertyStack.unshift(e);let i=this.embeddingReference?this.embeddingReference.withProperty(e,t):t();return this.propertyStack.shift(),i}get lineage(){return`${this.ownerUnit.lineage}:${this.id}`}toJson(e=!1){return{id:this.id,type:this.type,kind:this.kind,refs:Array.from(this.refs).map((t=>t.toJson(e))),unitId:this.ownerUnit.id}}}const Et={tryStmt:(e,t,i,r)=>({type:"TryStatement",block:e,handler:t,finalizer:i,guardedHandlers:r}),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}),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,r)=>({type:"ForStatement",init:e,test:t,update:i,body:r}),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,r=!1,s=!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,r="ConditionalExpression")=>({type:r,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,r=!1)=>({type:"MemberExpression",object:e,property:t,computed:i,optional:r}),funcExpr(e,t,i,r=!1,s=!1,n=!1){return this.func("FunctionExpression",...arguments)},arrowFuncExpr(e,t,i,r=!1,s=!1,n=!1){return this.func("ArrowFunctionExpression",...arguments)},func:(e,t,i,r,s=!1,n=!1,a=!1)=>({type:e,id:t,params:i,body:r,async:s,expression:n,generator:a}),identifier:e=>({type:"Identifier",name:e}),property:(e,t,i="init",r=!1,s=!1,n=!1)=>({type:"Property",key:e,value:t,kind:i,shorthand:r,computed:s,method:n}),methodDefinition:(e,t,i="method",r=!1,s=!1)=>({type:"MethodDefinition",key:e,value:t,kind:i,static:r,computed:s}),spreadElement: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 kt extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e}generate(){if(!this.expr)return[this.expr,this];let e=Et.identifier(this.ownerContext.getSubscriptIdentifier("$unit",!0)),t=Et.memberExpr(Et.memberExpr(e,Et.identifier("memo")),Et.literal(this.id),!0);return this.composed=Et.assignmentExpr(t,this.expr),[this.composed,this]}toJson(e=!1){return{id:this.id}}}class Ct extends wt{constructor(e,t,i){super(t,i),this.ownerReference=e,this.condition=this.ownerUnit.currentCondition,this.path=[],this.isDotSafe=!0}get ownerUnit(){return this.ownerReference.ownerUnit}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 kt||(e.name+"").includes(".")))&&(this.isDotSafe=!1)}match(e){let t=this.path,i=Array.isArray(e)?e:e.path,r=t.length-i.length;return r>0&&([t,i]=[i,t]),[t.reduce(((e,t,r)=>{return e&&(s=t,n=i[r],!(!s||!n)&&(s instanceof kt&&n instanceof kt?s.id===n.id:s.name===n.name));var s,n}),!0),r]}toJson(e=!1){return{id:this.id,path:this.path.map((e=>e instanceof kt?{memoId:e.id}:e)),$path:this.isDotSafe?this.path.map((e=>e.name)).join("."):void 0,condition:(this.condition||{}).lineage,referenceId:this.ownerReference.id}}}class _t extends Ct{constructor(e,t,i){super(e,t,i),this.subscriptions=new Map,this.$subscriptions=new Map,this.updates=new Map}subscribe(e,t,i=!1){let r=i?this.$subscriptions:this.subscriptions,s=r.get(e);s||(s=new Set,r.set(e,s)),s.add(t),this.updates.forEach((r=>r.forEach((r=>{r.subscribe(e,t,i)}))))}update(e,t,i){let r=this.updates.get(e);r||(r=new Set,this.updates.set(e,r)),r.add(t),i&&this.subscriptions.forEach(((e,i)=>e.forEach((e=>{t.subscribe(i,e,!0)}))))}toJson(e=!1){let{id:t,condition:i,referenceId:r,...s}=super.toJson(e),n={},a={};return this.subscriptions.forEach(((e,t)=>{n[t.lineage]=Array.from(e).map((e=>e.id))})),this.$subscriptions.forEach(((e,t)=>{a[t.lineage]=Array.from(e).map((e=>e.id))})),{id:t,...s,depth:this.depth.map((e=>e instanceof kt?{memoId:e.id}:e)),subscriptions:n,$subscriptions:a,condition:i,referenceId:r}}}class Pt extends St{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 _t(this,this.refs.size,{...e,condition:this.condition,depth:this.destructuringStack.slice(0)});return t.push(...this.propertyStack),this.refs.add(t),t}doSubscribe(e,t){let i=new Set(t);return this.refs.forEach(((t,r)=>{i.forEach((r=>{let[s,n]=t.match(r);if(s&&n<=0){if("const"===this.kind)return;t.subscribe(e,r),this.inUse(!0),t.condition&&t.condition.inUse(!0),i.delete(r)}}))})),[...i]}doUpdate(e,t,i){let r=new Set(t);return e===this||this.refs.forEach(((t,s)=>{r.forEach((s=>{let[n,a]=t.match(s);if(n&&a>=0){if("const"===this.kind)throw new Error("Assignment to a constant declaration.");t.update(e,s,i),r.delete(s)}}))})),[...r]}inUse(e){let t=super.inUse(...arguments);return this.ownerUnit.inUse(...arguments),t}}class At extends Ct{}class It extends St{addRef(e){let t=new At(this,this.refs.size,{...e,condition:this.condition});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 Tt extends wt{constructor(e,t,i={}){super(t,i),this.ownerContext=e,this.ownerScope=e&&(e.currentScope||e.ownerScope),this.effectReferences=[]}pushEffectReference(e){this.effectReferences.push(e)}doSubscribe(e,t=null){return!(t=this.effectReferences.reduce(((t,i)=>i.doSubscribe(e,t)),t||[...e.refs])).length||(!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)?!(t=this.ownerContext.references.reduce(((t,i)=>i instanceof Pt?i.doSubscribe(e,t):t),t)).length||this.ownerContext.effectReference({},(i=>(t.forEach((e=>{this.canObserveGlobal(e)&&i.addRef().push(...e.path)})),e.inUse(!0),i.doSubscribe(e,t),!0)),!1):this.ownerScope?this.ownerScope.doSubscribe(e,t):void 0)}doUpdate(e,t=null){if(t=this.effectReferences.reduce(((t,i)=>i.doUpdate(e,t)),t||[...e.refs]),!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)){if("VariableDeclaration"===e.type)return;e.ownerUnit.$sideEffects=!0;let i=t.length&&t||[...e.refs];return this.ownerContext.sideEffects.push({reference:e,remainderRefs:i}),!0}return!t.length||(this.ownerScope?this.ownerScope.doUpdate(e,t):void 0)}doSideEffectUpdates(e,t){return this.effectReferences.forEach((i=>{let r=i.doUpdate(e,t,!0);"VariableDeclaration"===i.type&&(t=r)})),!t.length||(!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)?(this.ownerContext.sideEffects.push({reference:e,remainderRefs:t,isSideEffects:!0}),!0):this.ownerScope?this.ownerScope.doSideEffectUpdates(e,t):void 0)}canObserveGlobal(e){return(!this.ownerContext.$params.globalsOnlyPaths||e.path.length>1)&&!(this.ownerContext.$params.globalsNoObserve||[]).includes(e.path[0].name)}}class Ot extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e,this.ownerUnit=e.currentUnit||e,this.parent=e.currentCondition}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}get lineage(){return`${this.ownerUnit.lineage}:${this.id}`}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.ownerUnit.id===this.ownerUnit.id?t.parent=this.parent.id:t.parent=`${this.parent.ownerUnit.lineage}:${this.parent.id}`),t}}class Nt extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e,this.ownerUnit=e&&(e.currentUnit||e),this.ownerScope=e&&(e.currentScope||e.ownerScope),this.subscriptIdentifiers={},this.references=[],this.referenceStack=[],this.entries=[],this.entryStack=[],this.memos=[],this._hoistedAwaitKeyword=void 0,this._hoistedExitStatements=new Map,this._nextIds={},this.sideEffects=[],this.$sideEffects=!1}get $params(){return this.params||this.ownerUnit&&this.ownerUnit.$params}nextId(e){return this.ownerContext?this.ownerContext.nextId(e):(e="",void 0===this._nextIds[e]&&(this._nextIds[e]=0),this._nextIds[e]++)}closest(e=null,t=!1,i=-1){if(!arguments.length)return this.ownerUnit;let r=i+1;return("function"==typeof e?e(this,r):[].concat(e).some((e=>e===this.type)))?t?{instance:this,level:r}:this:this.ownerUnit?this.ownerUnit.closest(e,t,r):void 0}closestContext(e=!1){return this.closest((e=>e instanceof Lt),e)}closestFunction(e=!1){return this.closest(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"],e)}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.ownerUnit&&this.ownerUnit.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],r=i.whitelist.indexOf(e.name);-1!==r&&(i.blacklist.push(i.whitelist.splice(r,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.ownerUnit&&this.ownerUnit.subscriptIdentifiersNoConflict(e)}get currentReference(){return this.referenceStack[0]}pushReference(e,t){this.references.unshift(e);let i=this.currentReference;this.referenceStack.unshift(e);let r=t(e,i);if(this.referenceStack.shift()!==e)throw new Error("Reference stack corrupted.");return r}signalReference(e,t,i=!0){let r=new It(this,this.nextId("causes"),e),s=this.pushReference(r,t),n=this.closestContext(),a=n.currentScope||n.ownerScope;return(!r.refs.size||i&&!a.doSubscribe(r))&&(this.references=this.references.filter((e=>e!==r))),s}effectReference(e,t,i=!0){let r=new Pt(this,this.nextId("affecteds"),e),s=this.pushReference(r,t),n=this.closestContext(),a=n.currentScope||n.ownerScope;return a.pushEffectReference(r),r.refs.size?"VariableDeclaration"===r.type&&"var"!==r.kind||!i||a.doUpdate(r):this.references=this.references.filter((e=>e!==r)),s}chainableReference(e,t){return this.currentReference&&this.currentReference.propertyStack.length?t():this.signalReference(e,t)}embeddableSignalReference(e,t){return this.currentReference&&this.signalReference(e,((e,i)=>(e.embeddingReference=i,t(e,i))))}embeddableEffectReference(e,t){return this.effectReference(e,((e,i)=>(e.embeddingReference=i,t(e,i))))}get currentScope(){return this.entryStack.reduce(((e,t)=>e||t instanceof Tt&&t),null)}get currentCondition(){return this.entryStack.reduce(((e,t)=>e||t instanceof Ot&&t),null)||this.closestFunction()!==this&&this.ownerContext&&this.ownerContext.currentCondition}get currentContext(){return this.entryStack.reduce(((e,t)=>e||t instanceof Lt&&t),null)}get currentUnit(){return this.entryStack.reduce(((e,t)=>e||t instanceof Nt&&t),null)}get currentEntry(){return this.entryStack[0]}pushEntry(e,t){this.entries.unshift(e),this.entryStack.unshift(e);let i=t(e);return this.entryStack.shift(),e instanceof Nt&&!e.generatable()&&(this.entries=this.entries.filter((t=>t!==e))),i}createScope(e,t){let i=new Tt(this,this.nextId("scope"),e);return this.pushEntry(i,t)}createCondition(e,t){let i=new Ot(this,this.nextId("condition"),e);return this.pushEntry(i,t)}defineContext(e,t){let i=new Lt(this,this.nextId("context"),e);return this.pushEntry(i,t)}defineUnit(e,t){let i=new Nt(this,this.nextId("unit"),e);return this.pushEntry(i,t)}defineMemo(e){let t=new kt(this,this.nextId("memo"),e);return this.memos.unshift(t),t}getLabelInfo(){let e,t,i=this.type;return(this.ownerScope||{}).label?({label:{name:e},type:t}=this.ownerScope):"Iteration"===i&&this.ownerUnit.ownerScope.label&&({label:{name:e},type:t}=this.ownerUnit.ownerScope),{type:i,label:e,target:t}}get hoistedAwaitKeyword(){return this._hoistedAwaitKeyword}get hoistedExitStatements(){return this._hoistedExitStatements}hoistAwaitKeyword(){["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)||(this._hoistedAwaitKeyword=!0,this.ownerUnit&&this.ownerUnit.hoistAwaitKeyword())}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.ownerUnit)return this.ownerUnit.hoistExitStatement(e,t)}generatable(){return this.references.length||this instanceof Lt}generate(e,t={}){if(!e||!this.generatable())return e;this.generated=!0;let i,r,s=Et.identifier(this.ownerUnit.getSubscriptIdentifier("$unit",!0));t.isFunctionUnit?i=e:this.inSequence?i=Et.arrowFuncExpr(null,[s],e,this.hoistedAwaitKeyword,!0):(r=Array.isArray(e)?Et.blockStmt(e):Et.blockStmt([e]),i=Et.arrowFuncExpr(null,[s],r,this.hoistedAwaitKeyword));let n=[Et.literal(this.id),...t.args||[],i],a=Et.callExpr(s,n);if(this.hoistedAwaitKeyword&&(a=Et.awaitExpr(a)),this.inSequence||t.generateForArgument)return a;let o=this;a=Et.exprStmt(a),a.comments=[{type:"Line",value:{toString:()=>o.lineage,trim(){return this.toString()}}}];let h=[a];if(this.hookExpr=h,!(this.ownerScope||{}).singleStatementScope){let e,t,i=[],r=(e,i)=>{let r=Et.ifStmt(e,i);t?t.alternate=r:(t=r,h.push(r))};if(this.hoistedExitStatements.forEach(((t,n)=>{if(["break","continue"].includes(n.value)&&!i.includes(n.value)&&t.arg){let e=t.arg,a=Et.callExpr(Et.memberExpr(s,Et.identifier("exiting")),[n,e]),o=Et.exprStmt(Et.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=Et.callExpr(Et.memberExpr(s,Et.identifier("exiting"))),t=Et.exprStmt(Et.identifier("return"));r(e,t)}}return h}get lineage(){let e=this.ownerUnit&&this.ownerUnit.lineage;return this.ownerUnit&&!this.generated?e:`${e?e+"/":""}${this.id}`}toJson(e=!1){let t={id:this.id,lineage:this.lineage,type:this.type,signals:{},effects:{},sideEffects:!!this.sideEffects.length||void 0,$sideEffects:!0===this.$sideEffects||void 0,subUnits:{},conditions:{},hoistedAwaitKeyword:this.hoistedAwaitKeyword,loc:this.loc};this.references.forEach((i=>{let r;i instanceof It?r=t.signals:i instanceof Pt&&(r=t.effects),r[i.id]=i.toJson(e)}));let i=this.lineage.split("/").length,r=e=>e.reduce(((e,t)=>e.subUnits[t]),t);return this.entries.slice(0).reverse().forEach((t=>{t instanceof Nt&&t.generated?r(t.lineage.split("/").slice(i,-1)).subUnits[t.id]=t.toJson(e):t instanceof Ot&&(r(t.ownerUnit.lineage.split("/").slice(i)).conditions[t.id]=t.toJson(e))})),t}}class Lt extends Nt{}class Mt{constructor(e={}){this.params=e,this.locations=[],this._locStart=this.params.locStart||0,this.deferredTasks=[]}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}serialize(e,t={}){return function(e,t){const i=new vt(t);return i.generator[e.type](e,i),i.output}(e,{comments:!0,...t})}generate(e){let t={type:"Global"},i=new Lt(null,"#",{...t,params:this.params});i.defineSubscriptIdentifier("$unit",["$x"]);let[r]=i.createScope(t,(()=>this.generateNodes(i,[e])));return this.deferredTasks.forEach((e=>e())),{source:this.serialize(r),graph:i.toJson(!1),identifier:i.getSubscriptIdentifier("$unit"),locations:this.locations,ast:r}}generateNodes(e,t,i=!1){const r=t.length;r>1&&(t=t.reduce(((e,t)=>"FunctionDeclaration"===t.type?[t].concat(e):e.concat(t)),[]));const s=n=>{if(n===r)return[];let a,o=!1,h=()=>(o=!0,s(n+1));if(t[n]){let r=()=>this.generateNode(e,t[n],i);!this[`generate${t[n].type}`]||i&&!["Identifier","FunctionDeclaration","FunctionExpression"].includes(t[n].type)||(r=()=>this[`generate${t[n].type}`].call(this,e,t[n],h)),a=r()}else a=[t[n]];return o||(a=[].concat(a).concat(h())),a};return s(0)}generateNode(e,t,i=!1){return Object.keys(t).reduce(((r,s)=>{let n=t[s];return Array.isArray(n)?n=this.generateNodes(e,n,i):"object"==typeof n&&n&&([n]=this.generateNodes(e,[n],i)),{...r,[s]:n}}),{})}generateProgram(e,t){let i={type:t.type},r=e.createScope(i,(()=>this.generateNodes(e,t.body)));return{...t,body:r}}generateMethodDefinition(e,t){let i=this.generateNode(e,t.value,!0);return Et.methodDefinition(t.key,i,t.kind,t.static,t.computed)}generateFunctionDeclaration(e,t){return this.generateFunction(Et.funcDeclaration,...arguments)}generateFunctionExpression(e,t){return this.generateFunction(Et.funcExpr,...arguments)}generateArrowFunctionExpression(e,t){return this.generateFunction(Et.arrowFuncExpr,...arguments)}generateFunction(e,t,i){const r=(e,t)=>e?t.effectReference({type:i.type},(()=>this.generateNodes(t,[e])),!1):[e],s=(e,s,n)=>t.defineContext({type:i.type,isSubscriptFunction:i.isSubscriptFunction},(t=>t.createScope({type:i.type},(()=>(e=r(e,t)[0],s=s.map((e=>{if("AssignmentPattern"===e.type){let i=this.generateNode(t,e.right),r={type:e.left.type},[s]=t.effectReference(r,(()=>this.generateNodes(t,[e.left])),!1);return Et.assignmentPattern(s,i)}let i={type:e.type};return[e]=t.effectReference(i,(()=>this.generateNodes(t,[e])),!1),e})),n="ArrowFunctionExpression"===i.type&&i.expression?this.generateNode(t,Et.blockStmt([Et.returnStmt(n)])):this.generateNode(t,n),[t,e,s,n])))));let n,a,o,h,c,l=Et.identifier(t.getSubscriptIdentifier("$unit",!0)),p=(e,t,r,s,n)=>t.generate(e.call(Et,r,[l].concat(s),n,i.async,i.expression,i.generator),{args:[Et.literal(i.type),Et.identifier(i.isSubscriptFunction?"true":"false")],isFunctionUnit:!0,generateForArgument:!0});if("FunctionDeclaration"===i.type){[o]=r(i.id,t),[a,,h,c]=s(null,i.params,i.body),n=p(Et.funcExpr,a,null,h,c);let u=Et.memberExpr(l,Et.identifier("functions")),d=(e,...t)=>Et.callExpr(Et.memberExpr(u,Et.identifier(e)),[o,...t]);n=[Et.exprStmt(d("define",n)),e.call(Et,o,h,Et.blockStmt([Et.returnStmt(Et.callExpr(Et.memberExpr(d("get"),Et.identifier("call")),[Et.thisExpr(),Et.spreadElement(Et.identifier("arguments"))]))]))]}else[a,o,h,c]=s(i.id,i.params,i.body),n=p(e,a,o,h,c);return this.deferredTasks.unshift((()=>{a.sideEffects.forEach((e=>{a.ownerScope.doSideEffectUpdates(e.reference,e.remainderRefs)}))})),n}generateVariableDeclaration(e,t){let i={type:t.type,kind:t.kind},r=[],s=(s,n,a)=>{let o,h,[c]=s.signalReference(i,(t=>(o=t,this.generateNodes(e,[n.init])))),[l]=s.effectReference(i,(t=>(h=t,this.generateNodes(e,[n.id]))));if(o.setAssignee(h),this.setLocation(s,n),a||"const"===t.kind||!n.init||!this.params.devMode&&!s.references.filter((e=>e instanceof It)).length)return Et.varDeclarator(l,c);["ObjectPattern","ArrayPattern"].includes(n.id.type);let p=Array.from(h.refs).map((e=>Et.varDeclarator(Et.identifier(e.path[0].name),null))),u=Et.assignmentExpr(l,c);return r.length?(r.push(Et.varDeclaration(t.kind,p),...s.generate(Et.exprStmt(u))),[]):(r.push(...s.generate(Et.exprStmt(u))),p)},n=e.currentUnit&&["ForStatement","ForOfStatement","ForInStatement"].includes(e.currentUnit.type),a=t.declarations.reduce(((t,r)=>n?t.concat(s(e.currentUnit,r,!0)):e.defineUnit(i,(e=>t.concat(s(e,r))))),[]);return a.length?[Et.varDeclaration(t.kind,a),...r]:r}generateIfStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let{consequent:s,alternate:n}=t,[a]=r.signalReference(i,(()=>this.generateNodes(e,[t.test]))),[o,h]=e.defineMemo({expr:a}).generate();return s=e.createCondition({when:h},(()=>this.generateNodes(e,[t.consequent]))),s="BlockStatement"!==s[0].type&&s.length>1?Et.blockStmt(s):s[0],t.alternate&&(n=e.createCondition({whenNot:h},(()=>this.generateNodes(e,[t.alternate]))),n=n[0]&&"BlockStatement"!==n[0].type&&n.length>1?Et.blockStmt(n):n[0]),this.setLocation(r,t),this.setLocation(h,t.test),r.generate(Et.ifStmt(o,s,n))}))}generateSwitchStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.discriminant]))),[n,a]=e.defineMemo({expr:s}).generate(),o=e.createScope(i,(()=>t.cases.reduce(((t,i)=>{let s=t.slice(-1)[0],n=i.consequent.some((e=>"BreakStatement"===e.type)),[o]=r.signalReference({type:i.type},(()=>this.generateNodes(e,[i.test]))),[h,c]=e.defineMemo({expr:o}).generate(),l={switch:a,cases:[c]};return s&&!s.hasBreak&&l.cases.push(...s.condition.cases),this.setLocation(c,i.test),t.concat({caseNode:i,$test:h,condition:l,hasBreak:n})}),[]).map((({caseNode:t,$test:i,condition:r})=>{let s=e.createCondition(r,(()=>this.generateNodes(e,t.consequent)));return Et.switchCase(i,s)}))));return this.setLocation(r,t),this.setLocation(a,t.discriminant),r.generate(Et.switchStmt(n,o))}))}generateWhileStatement(e,t){return this.generateLoopStmtA(Et.whileStmt,...arguments)}generateDoWhileStatement(e,t){return this.generateLoopStmtA(Et.doWhileStmt,...arguments)}generateForStatement(e,t){return this.generateLoopStmtA(Et.forStmt,...arguments)}generateLoopStmtA(e,t,i){let r={type:i.type};return t.defineUnit({type:i.type},(s=>(this.setLocation(s,i),s.defineSubscriptIdentifier("$counter",["$x_index"]),t.createScope({type:"Iteration"},(()=>{let n,a,o,h;return"ForStatement"===i.type?([a,o,h]=s.signalReference(r,(()=>this.generateNodes(t,[i.init,i.test,i.update]))),n=t=>e.call(Et,a,o,h,t)):([o]=s.signalReference(r,(()=>this.generateNodes(t,[i.test]))),n=t=>e.call(Et,o,t)),t.defineContext({type:"Iteration",isIteration:!0},(e=>{let t;this.setLocation(e,i.body);let[r]=this.generateNodes(e,[i.body]);r.body.length&&([t,r]=this.composeLoopStmt(e,r));let a=[].concat(t||[]).concat(n(Et.blockStmt(r)));return s.generate(a)}))})))))}composeLoopStmt(e,t,i={}){let r=[i.disposeCallback],s=[],n=[],a=[],o=t.body.slice(0);if(!i.iterationId){i.iterationId=Et.identifier(e.getSubscriptIdentifier("$counter",!0));let t=Et.varDeclarator(Et.clone(i.iterationId),Et.literal(-1)),n=Et.updateExpr("++",Et.clone(i.iterationId),!1);s.push(t),a.push(n),r.push((()=>a.pop()))}return n.length&&(a.push(Et.varDeclaration("let",n)),r.push((()=>a.splice(-1)))),a.push(...e.generate(o,{args:[i.iterationId],disposeCallback:()=>r.forEach((e=>e&&e()))})),s=s.length?Et.varDeclaration("let",s):null,[s,a]}generateForOfStatement(e,t){return this.generateLoopStmtB(Et.forOfStmt,...arguments)}generateForInStatement(e,t){return this.generateLoopStmtB(Et.forInStmt,...arguments)}generateLoopStmtB(e,t,i){let r={type:i.type};return t.defineUnit({type:i.type},(s=>(this.setLocation(s,i),s.defineSubscriptIdentifier("$counter",["ForInStatement"===i.type?"$x_key":"$x_index"]),t.createScope({type:"Iteration"},(()=>{let n,a;"VariableDeclaration"===i.left.type?([n]=this.generateNodes(t,[i.left]),a=n.declarations[0].id):([n]=s.affectedsReference(r,(()=>this.generateNodes(t,[i.left]))),a=n);let[o]=s.signalReference(r,(()=>this.generateNodes(t,[i.right])));return t.defineContext({type:"Iteration",isIteration:!0},(r=>{this.setLocation(r,i.body);let[h]=this.generateNodes(r,[i.body]),c=e.call(Et,n,o,h),l=[];if(h.body.length){let s=e=>this.composeLoopStmt(r,h,{disposeCallback:()=>{c.left=n},...e}),p=n,u=h;if("ForOfStatement"===i.type)[l,u]=s({});else if("Identifier"===a.type)[l,u]=s({iterationId:a});else{let e,r=Et.identifier(t.getSubscriptIdentifier("$counter"));[l,u]=s({iterationId:r}),p=Et.varDeclaration("let",[Et.varDeclarator(Et.clone(r),null)]),e="VariableDeclaration"===i.left.type?Et.varDeclaration(n.kind,[Et.varDeclarator(a,Et.clone(r))]):Et.exprStmt(Et.sequenceExpr([Et.assignmentExpr(a,Et.clone(r),"=")])),u=[e].concat(u)}c=e.call(Et,p,o,Et.blockStmt(u))}return s.generate([].concat(l||[]).concat(c))}))})))))}generateLabeledStatement(e,t){e.subscriptIdentifiersNoConflict(t.label);let i={type:t.type,label:t.label};return t.body.type.endsWith("Statement")?e.createScope({type:t.body.type,label:t.label},(i=>{if("BlockStatement"===t.body.type){let i=this.generateNodes(e,t.body.body);return Et.labeledStmt(t.label,Et.blockStmt(i))}i.singleStatementScope=!0;let[r]=this.generateNodes(e,[t.body]);return Et.labeledStmt(t.label,r)})):e.defineUnit(i,(i=>{this.setLocation(i,t.body);let[r]=this.generateNodes(e,[t.body]);return Et.labeledStmt(t.label,i.generate(r))}))}generateBreakStatement(e,t){return this.generateExitStmt(Et.breakStmt,...arguments)}generateContinueStatement(e,t){return this.generateExitStmt(Et.continueStmt,...arguments)}generateExitStmt(e,t,i){let r=t.currentUnit.closest(["Iteration","SwitchStatement","LabeledStatement"]);if(r&&"SwitchStatement"===r.type&&"BreakStatement"===i.type&&!i.label)return e.call(Et,null);let s=Et.identifier(t.getSubscriptIdentifier("$unit",!0)),n=Et.literal("BreakStatement"===i.type?"break":"continue"),a=i.label?Et.literal(i.label.name):Et.identifier("null"),o=Et.exprStmt(Et.callExpr(Et.memberExpr(s,Et.identifier("exit")),[n,a]));return t.currentUnit.hoistExitStatement(n,a),[o,Et.returnStmt()]}generateReturnStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.argument]))),n=Et.identifier(e.getSubscriptIdentifier("$unit",!0)),a=Et.literal("return"),o=s||Et.identifier("undefined"),h=Et.exprStmt(Et.callExpr(Et.memberExpr(n,Et.identifier("exit")),[a,o]));return r.hoistExitStatement(a,Et.identifier("true")),r.generate([h,Et.returnStmt()])}))}generateBlockStatement(e,t){return e.createScope({type:t.type},(()=>{let i=this.generateNodes(e,t.body);return Et.blockStmt(i)}))}generateExpressionStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{this.setLocation(r,t.expression);let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.expression])));return r.generate(Et.exprStmt(s))}))}generateSequenceExpression(e,t){let i=t.expressions.map(((i,r)=>{let s={type:i.type,inSequence:!0};return r===t.expressions.length-1?([i]=e.currentUnit.chainableReference(s,(()=>this.generateNodes(e,[i]))),i):e.defineUnit(s,(t=>(this.setLocation(t,i),[i]=t.signalReference(s,(()=>this.generateNodes(e,[i]))),"Identifier"===i.type?i:t.generate(i))))}));return Et.sequenceExpr(i)}generateAssignmentExpression(e,t){let i,r,s={type:t.type,kind:t.operator},[n]=e.currentUnit.signalReference(s,(r=>(i=r,this.generateNodes(e,[t.right])))),[a]=e.currentUnit.embeddableEffectReference(s,(i=>(r=i,this.generateNodes(e,[t.left]))));return i.setAssignee(r),Et.assignmentExpr(a,n,t.operator)}generateUpdateExpression(e,t){return this.generateMutationExpr(Et.updateExpr,...arguments)}generateUnaryExpression(e,t){if("delete"===t.operator)return this.generateMutationExpr(Et.unaryExpr,...arguments);let i={type:t.type,kind:t.operator},[r]=e.currentUnit.signalReference(i,(()=>this.generateNodes(e,[t.argument])));return Et.unaryExpr(t.operator,r,t.prefix)}generateMutationExpr(e,t,i){let r={type:i.type,kind:i.operator},[s]=t.currentUnit.effectReference(r,(()=>this.generateNodes(t,[i.argument])));return e.call(Et,i.operator,s,i.prefix)}generateBinaryExpression(e,t){let[i]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.left]))),[r]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.right])));return Et.binaryExpr(t.operator,i,r)}generateLogicalExpression(e,t){let i={type:t.type,kind:t.operator},[r]=e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.left]))),[s,n]=e.defineMemo({expr:r}).generate(),a="||"===t.operator?{whenNot:n}:{when:n},[o]=e.createCondition(a,(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.right])))));return this.setLocation(n,t.left),Et.logicalExpr(t.operator,s,o)}generateConditionalExpression(e,t){let i={type:t.type},[r]=e.currentUnit.signalReference(i,(()=>this.generateNodes(e,[t.test]))),[s,n]=e.defineMemo({expr:r}).generate(),[a]=e.createCondition({when:n},(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.consequent]))))),[o]=e.createCondition({whenNot:n},(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.alternate])))));return this.setLocation(n,t.test),Et.condExpr(s,a,o)}generateArrayPattern(e,t){let i=t.elements.map(((t,i)=>([t]=e.currentUnit.currentReference.withDestructure({name:i},(()=>this.generateNodes(e,[t]))),t)));return Et.arrayPattern(i)}generateObjectPattern(e,t){let i=t.properties.map((t=>{let{key:i,value:r}=t;t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i]))));let s={name:t.key.name};return t.computed&&("Literal"===t.key.type?s={name:t.key.value}:[i,s]=e.defineMemo({expr:i}).generate()),[r]=e.currentUnit.currentReference.withDestructure(s,(()=>this.generateNodes(e,[r]))),this.setLocation(s,t.key),Et.property(i,r,t.kind,t.shorthand,t.computed,t.method)}));return Et.objectPattern(i)}generateMemberExpression(e,t){let{property:i}=t;t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i]))));let r={name:t.property.name};t.computed&&("Literal"===t.property.type?r={name:t.property.value}:[i,r]=e.defineMemo({expr:i}).generate());let[s]=e.currentUnit.currentReference.withProperty(r,(()=>this.generateNodes(e,[t.object])));return this.setLocation(r,t.property),Et.memberExpr(s,i,t.computed,t.optional)}generateThisExpression(e,t){return this.generateIdentifier(...arguments)}generateIdentifier(e,t){"Identifier"===t.type&&e.subscriptIdentifiersNoConflict(t);let i={name:"Identifier"===t.type?t.name:"this"};this.setLocation(i,t);const r=e.closestFunction();let s=(e.currentUnit||e).currentReference;if(s)do{(!r||r.isSubscriptFunction||s instanceof Pt)&&s.addRef().unshift(i)}while(s=s.contextReference);return"Identifier"===t.type?Et.identifier(t.name):Et.thisExpr()}generateSpreadElement(e,t){return this.generateArgumentExpr(Et.spreadElement,...arguments)}generateAwaitExpression(e,t){return e.currentUnit.hoistAwaitKeyword(),this.generateArgumentExpr(Et.awaitExpr,...arguments)}generateArgumentExpr(e,t,i){let[r]=t.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(t,[i.argument])));return e.call(Et,r)}generateCallExpression(e,t){return this.generateCallExpr(Et.callExpr,...arguments)}generateNewExpression(e,t){return this.generateCallExpr(Et.newExpr,...arguments)}generateCallExpr(e,t,i){let[r]=t.currentUnit.signalReference({type:i.callee.type},(()=>this.generateNodes(t,[i.callee]))),s=i.arguments.map((e=>t.currentUnit.signalReference({type:e.type},(()=>this.generateNodes(t,[e])[0]))));return e.call(Et,r,s,i.optional)}generateParenthesizedExpression(e,t){return this.generateExprExpr(Et.parensExpr,...arguments)}generateChainExpression(e,t){return this.generateExprExpr(Et.chainExpr,...arguments)}generateExprExpr(e,t,i){let[r]=this.generateNodes(t,[i.expression]);return e.call(Et,r)}generateArrayExpression(e,t){let i=t.elements.map((t=>e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t])[0]))));return Et.arrayExpr(i)}generateObjectExpression(e,t){let i=this.generateNodes(e,t.properties);return Et.objectExpr(i)}generateProperty(e,t){let{key:i,value:r}=t;return t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i])))),[r]=e.currentUnit.signalReference({type:r.type},(()=>this.generateNodes(e,[r]))),Et.property(i,r,t.kind,t.shorthand,t.computed,!1)}generateTaggedTemplateExpression(e,t){let[i,r]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.tag,t.quasi])));return Et.taggedTemplateExpr(i,r)}generateTemplateLiteral(e,t){let i=t.expressions.map((i=>e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[i])[0]))));return Et.templateLiteral(t.quasis,i)}generateTryStatement(e,t){let[i,r,s]=this.generateNodes(e,[t.block,t.handler,t.finalizer]);return Et.tryStmt(i,r,s)}generateCatchClause(e,t){let[i]=this.generateNodes(e,[t.body]);return Et.catchClause(t.param,i)}generateThrowStatement(e,t){return this.generateArgumentExpr(Et.throwStmt,...arguments)}}class Rt{constructor(e,t,i,r={},s=null,n=null){this.ownerUnit=e,this.graph=t,this.callee=i,this.params=r,this.exits=n||new Map,this.$thread=s||{entries:new Map,sequence:[],ownerUnit:this},this.subUnits=new Map,this.unit=function(e,t,i=null,r=null){if(!this.graph.subUnits[e])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child unit ${e}.`);let s,n,o,h=this.graph.subUnits[e],c={...this.params,isIterationUnit:3===arguments.length,iterationId:3===arguments.length&&t,isFunctionUnit:4===arguments.length,functionType:4===arguments.length&&t,isSubscriptFunction:4===arguments.length&&i,functionScope:this.params.isFunctionUnit&&this.graph.lineage||this.params.functionScope};if(c.isIterationUnit){let t=new Rt(this,h,i,c,this.$thread,this.exits),r=this.subUnits.get(e);return r||(r=new Map,this.subUnits.set(e,r)),r.has(c.iterationId)&&r.get(c.iterationId).dispose(),r.set(c.iterationId,t),t.call()}return this.subUnits.has(e)&&this.subUnits.get(e).dispose(),c.isFunctionUnit?(s=r,o=n=new Rt(this,h,s,c),"FunctionDeclaration"!==c.functionType&&(o=s instanceof(async()=>{}).constructor?async function(){return n.call(this,...arguments)}:function(){return n.call(this,...arguments)},a(o,n))):(s=t,n=new Rt(this,h,s,c,this.$thread,this.exits),o=n.call()),this.subUnits.set(e,n),o}.bind(this),this.unit.memo=Object.create(null),this.unit.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.unit.exit=function(e,t){this.exits.set(e,t)}.bind(this),this.unit.functions=new Map,this.unit.functions.define=(e,t)=>{this.unit.functions.set(e,t),a(e,t,!0)};const a=(e,t,i=!1)=>{i||(Object.defineProperty(e,"length",{configurable:!0,value:t.callee.length-1}),Object.defineProperty(e,"name",{configurable:!0,value:t.callee.name})),t.params.isSubscriptFunction&&(e.thread=t.thread.bind(t),e.dispose=t.dispose.bind(t),Object.defineProperty(e,"runtime",{value:t}),Object.defineProperty(e,"sideEffects",{configurable:!0,value:t.graph.sideEffects||""}),Object.defineProperty(e,"subscriptSource",{configurable:!0,value:t.graph.subscriptSource||""}),Object.defineProperty(e,"originalSource",{configurable:!0,value:t.graph.originalSource||""}))}}fire(e,t,i){if(this.ownerUnit)return this.ownerUnit.fire(e,t,i)}call(e,...t){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);let i=this.callee.call(e,this.unit,...t);if(this.graph.$sideEffects)for(let e in this.graph.effects)for(let t of this.graph.effects[e].refs)this.buildThread([],t,[],0,!0);if(!this.ownerUnit||this.params.isFunctionUnit){let e=this.exits.get("return");this.exits.clear(),void 0!==e&&(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.subUnits.size)throw new Error(`Unit ${this.graph.lineage} is not an iterator.`);let t,[[,i]]=this.subUnits,r=(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=r(t,(()=>e.call()));else for(let s of e){let e=i.get(s)||i.get(parseInt(s));e&&(t=r(t,(()=>e.call())))}return t}thread(...e){if(this.disposed)return!1;this.$thread.active=!0;for(let t in this.graph.effects)for(let i of this.graph.effects[t].refs)for(let t of e){let[e,r,s]=this.matchRefs(t,i);e&&this.buildThread(t,i,s,r)}return this.runThread()}runThread(){let e,t,i,r=(e,t)=>{if(["ForOfStatement","ForInStatement"].includes(e.graph.type)&&t.every((e=>e.executionPlan.isIterationUnitTarget))){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()},s=(e,t)=>e instanceof Promise?e.then(t):t();for(;(t=this.$thread.sequence.shift())&&(i=[...this.$thread.entries.get(t)])&&this.$thread.entries.delete(t);)e=s(e,(()=>{if(t.disposed||!t.filterRefs(i).length)return;this.$thread.current=t;let e=r(t,i);return s(e,(()=>{for(let e of i)[].concat(e.executionPlan.assigneeRef||e.executionPlan.assigneeRefs||[]).forEach((e=>{t.buildThread([],e,[],0)}))})),e}));return s(e,(()=>{let e=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,e}))}buildThread(e,t,i,r=0,s=!1){let n=r>0;if(this.ownerUnit){if(!this.compute(i))return;if(void 0!==t.condition&&!this.assert(t.condition))return}else n||(n=i.length||void 0!==t.condition);let a=s?t.$subscriptions:t.subscriptions;Object.keys(a).forEach((t=>{let[i,r]=t.split(":"),s=i=>{i&&i.selectRefs(r,a[t],n?e:null)},o=this.locate(i);Array.isArray(o)?o.forEach(s):s(o)}))}selectRefs(e,t,i=null){let r=this.$thread,s=this.graph.signals[e],n=(e,t)=>e.graph.lineage.localeCompare(t.graph.lineage,void 0,{numeric:!0}),a=(e,t=[],i={})=>{if(!r.active)return;if(r.current&&n(this,r.current)<0)return;let s=r.entries.get(this);if(s||(s=new Set,r.entries.set(this,s),r.sequence.push(this),r.sequence.sort(n)),s.add({...e,computes:t,executionPlan:i}),!i.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){i.assigneeRefs=[];for(let e in this.graph.effects)i.assigneeRefs.push(...this.graph.effects[e].refs)}};for(let e of t){let t=s.refs[e];if(!i){a(t);continue}let[r,n,o]=this.matchRefs(i,t);if(!r)continue;if(n<=0){a(t,o);continue}let h=i.slice(-n),c="assignee"in s?this.graph.effects[s.assignee]:null;c?c.refs.forEach((e=>{if(e.depth.length){let[i,r,s]=this.matchRefs(h,e.depth),n=o.concat(s);if(i&&r>0){let t=e.path.concat(h.slice(-r));this.buildThread(t,e,n,r)}else i&&a(t,n,{assigneeRef:e})}else{let t=e.path.concat(h);this.buildThread(t,e,o,n)}})):(1!==n||"ForOfStatement"!==this.graph.type)&&(1!==n||"ForInStatement"!==this.graph.type)||a(t,o,{isIterationUnitTarget:!0,iterationTarget:h[0]})}}filterRefs(e){return e.filter((e=>{if(this.compute(e.computes)&&(void 0===e.condition||this.assert(e.condition)))return!0}))}matchRefs(e,t){let i,r,s,n;Array.isArray(e)?(i=e,r=e.dotSafe?e.join("."):void 0):(i=e.path,r=e.$path),Array.isArray(t)?(s=t,n=t.dotSafe?t.join("."):void 0):(s=t.path,n=t.$path);let a=i.length-s.length;if(a>0&&([i,s,r,n]=[s,i,n,r]),r&&n)return[`${n}.`.startsWith(`${r}.`),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,r="object"==typeof t&&"memoId"in t;return i||r?(o.push((s=>(i?s[e.memoId]:h(e))===(r?s[t.memoId]:h(t)))),!0):h(e)===h(t)})(t,s[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("/"),r=this.subUnits.get(parseInt(i.shift()));if(i.length){if(r instanceof Map)return Array.from(r).reduce(((t,[i,r])=>t.concat(r.locate(e))),[]);if(r)return r.locate(e)}return r}return this.ownerUnit?this.ownerUnit.locate(e):void 0}compute(e){return!e.some((e=>!1===e(this.unit.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.unit.memo;return!(void 0!==t.parent&&!this.assert(t.parent))&&(void 0!==t.switch?t.cases.some((e=>i[e]===i[t.switch])):void 0!==t.whenNot?!i[t.whenNot]:void 0===t.when||i[t.when])}dispose(){this.params.isFunctionUnit||(this.subUnits.forEach(((e,t)=>{e instanceof Map?(e.forEach((e=>e.dispose())),e.clear()):e.dispose()})),this.subUnits.clear(),delete this.ownerUnit,delete this.callee,delete this.params,delete this.unit.memo,this.disposed=!0)}}class Dt extends Rt{static create(e,t=[],i={}){const r=new(e.graph.hoistedAwaitKeyword?Object.getPrototypeOf((async function(){})).constructor:Function)(e.identifier,...t,e.source);return new this(null,e.graph,r,i)}constructor(e,t,i,r={},s=null){super(e,t,i,{},s),this.observers=[]}observe(e,t){this.params.devMode,this.observers.push({unitUrl:e,callback:t})}fire(e,t,i){(this.observers||[]).forEach((r=>{r.unitUrl===e&&r.callback(t,i)}))}}function Vt(e){let t=e.split(/\n/g);if(t.length>1){for(;!t[0].trim().length;)t.shift();let e=t[0].split(/[^\s]/)[0].length;if(e)return t.map(((i,r)=>{let s=i.substring(0,e);return s.trim().length?"}"===s.trim()&&r===t.length-1?"}":i:i.substring(e)})).join("\n")}return e}function jt(...e){let t="object"==typeof e[e.length-1]?e.pop():{};t.compiler={...jt.compilerParams,...t.compiler||{}},t.runtime={...jt.runtimeParams,...t.runtime||{}};let i,r=Vt(e.pop()||""),s=e;if(jt.cache[r]&&!t.compiler.devMode&&Wt(s,jt.cache[r][1])&&$t(t.compiler,jt.cache[r][2]))[i,s]=jt.cache[r];else{let e=Ft(r);i=new Mt(t.compiler).generate(e),jt.cache[r]=[i,s,t.compiler]}return Ut(this,i,e,t.runtime,r)}jt.cache={},jt.compilerParams={globalsNoObserve:[],globalsOnlyPaths:!1,compact:2},jt.runtimeParams={},jt.cloneCache={},jt.clone=function(e,t=null,i={},r={}){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 s,n,a,o,h=Vt(e.toString()),c=h;if(h.startsWith("async ")&&(s=!0,c=c.substring(6)),!c.startsWith("function ")&&!c.startsWith("function(")){if(c.trim().startsWith("[")){let t,i=c.split(/\](?:[\s]+)?\(/g).filter((e=>e));[t,c]=i.reduce(((t,r,s)=>{if(Array.isArray(t))return t;r=`${t}${r||""}]`;try{return Ft(r),[r,`${e.name}(${i.slice(s+1).join("] (")}`]}catch(e){return`${r} (`}}),"")}c="function "+c}if(jt.cloneCache[c]&&!i.devMode&&$t(i,jt.cloneCache[c][3]))[n,a,o]=jt.cloneCache[c];else{let e=Ft(c).body[0],t=e.body.start+1;"\n"===c.substr(t,1)&&(t+=1);let r=new Mt({...i,...jt.compilerParams,locStart:-t});a=e.params.map((e=>r.serialize(e))),n=r.generate({type:"Program",body:e.body.body}),!n.graph.hoistedAwaitKeyword&&s&&(n.graph.hoistedAwaitKeyword=!0),o=c.substring(t,e.body.end-1),jt.cloneCache[c]=[n,a,o,i]}return Ut(t,n,a,r,o,e.name)};const Ut=function(e,t,i=[],r={},s=null,n=null){let a=Dt.create(t,i,{...r,...jt.runtimeParams}),o=function(...t){return a.call(void 0===this?e:this,...t)};o.thread=a.thread.bind(a),o.dispose=a.dispose.bind(a),Object.defineProperty(o,"runtime",{value:a}),Object.defineProperty(o,"sideEffects",{configurable:!0,value:a.graph.sideEffects}),Object.defineProperty(o,"subscriptSource",{configurable:!0,value:t.source}),Object.defineProperty(o,"originalSource",{configurable:!0,value:s}),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(", ")}) {${s}}`,o},Bt=new Map,Ft=function(e,t={}){t={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,...t};let i=Bt.get(e);return i||(i=Or.parse(e,t),Bt.set(e,i)),i},Wt=(e,t)=>"object"==typeof e&&e&&"object"==typeof t&&t?$t(e,t):Array.isArray(e)&&Array.isArray(t)&&e.length===t.length?e.every((e=>t.some((t=>Wt(e,t))))):e===t,$t=function(e,t){for(let i in e)if(!Wt(e[i],t[i]))return!1;return!0},Ht=e=>class extends(e||class{}){static get subscriptMethods(){return[]}static implementMethod(e,t){return jt.clone(e,t)}constructor(){super();const e=this.constructor;e.subscriptMethods.forEach((t=>{if(!this[t])throw new Error(`${t} is not a method.`);if("constructor"===t)throw new Error("Class constructors cannot be subscript methods.");this[t]=e.implementMethod(this[t],this)}))}};var qt={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"},Gt="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",zt={5:Gt,"5module":Gt+" export import",6:Gt+" const class extends export import super"},Kt=/^in(stanceof)?$/,Qt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Jt="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Xt=new RegExp("["+Qt+"]"),Yt=new RegExp("["+Qt+Jt+"]");Qt=Jt=null;var Zt=[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],ei=[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 ti(e,t){for(var i=65536,r=0;r<t.length;r+=2){if((i+=t[r])>e)return!1;if((i+=t[r+1])>=e)return!0}}function ii(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Xt.test(String.fromCharCode(e)):!1!==t&&ti(e,Zt)))}function ri(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Yt.test(String.fromCharCode(e)):!1!==t&&(ti(e,Zt)||ti(e,ei)))))}var si=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 ni(e,t){return new si(e,{beforeExpr:!0,binop:t})}var ai={beforeExpr:!0},oi={startsExpr:!0},hi={};function ci(e,t){return void 0===t&&(t={}),t.keyword=e,hi[e]=new si(e,t)}var li={num:new si("num",oi),regexp:new si("regexp",oi),string:new si("string",oi),name:new si("name",oi),privateId:new si("privateId",oi),eof:new si("eof"),bracketL:new si("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new si("]"),braceL:new si("{",{beforeExpr:!0,startsExpr:!0}),braceR:new si("}"),parenL:new si("(",{beforeExpr:!0,startsExpr:!0}),parenR:new si(")"),comma:new si(",",ai),semi:new si(";",ai),colon:new si(":",ai),dot:new si("."),question:new si("?",ai),questionDot:new si("?."),arrow:new si("=>",ai),template:new si("template"),invalidTemplate:new si("invalidTemplate"),ellipsis:new si("...",ai),backQuote:new si("`",oi),dollarBraceL:new si("${",{beforeExpr:!0,startsExpr:!0}),eq:new si("=",{beforeExpr:!0,isAssign:!0}),assign:new si("_=",{beforeExpr:!0,isAssign:!0}),incDec:new si("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new si("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ni("||",1),logicalAND:ni("&&",2),bitwiseOR:ni("|",3),bitwiseXOR:ni("^",4),bitwiseAND:ni("&",5),equality:ni("==/!=/===/!==",6),relational:ni("</>/<=/>=",7),bitShift:ni("<</>>/>>>",8),plusMin:new si("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ni("%",10),star:ni("*",10),slash:ni("/",10),starstar:new si("**",{beforeExpr:!0}),coalesce:ni("??",1),_break:ci("break"),_case:ci("case",ai),_catch:ci("catch"),_continue:ci("continue"),_debugger:ci("debugger"),_default:ci("default",ai),_do:ci("do",{isLoop:!0,beforeExpr:!0}),_else:ci("else",ai),_finally:ci("finally"),_for:ci("for",{isLoop:!0}),_function:ci("function",oi),_if:ci("if"),_return:ci("return",ai),_switch:ci("switch"),_throw:ci("throw",ai),_try:ci("try"),_var:ci("var"),_const:ci("const"),_while:ci("while",{isLoop:!0}),_with:ci("with"),_new:ci("new",{beforeExpr:!0,startsExpr:!0}),_this:ci("this",oi),_super:ci("super",oi),_class:ci("class",oi),_extends:ci("extends",ai),_export:ci("export"),_import:ci("import",oi),_null:ci("null",oi),_true:ci("true",oi),_false:ci("false",oi),_in:ci("in",{beforeExpr:!0,binop:7}),_instanceof:ci("instanceof",{beforeExpr:!0,binop:7}),_typeof:ci("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ci("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ci("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},pi=/\r\n?|\n|\u2028|\u2029/,ui=new RegExp(pi.source,"g");function di(e){return 10===e||13===e||8232===e||8233===e}function fi(e,t,i){void 0===i&&(i=e.length);for(var r=t;r<i;r++){var s=e.charCodeAt(r);if(di(s))return r<i-1&&13===s&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var mi=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yi=Object.prototype,bi=yi.hasOwnProperty,xi=yi.toString,vi=Object.hasOwn||function(e,t){return bi.call(e,t)},wi=Array.isArray||function(e){return"[object Array]"===xi.call(e)};function Si(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Ei=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ki=function(e,t){this.line=e,this.column=t};ki.prototype.offset=function(e){return new ki(this.line,this.column+e)};var Ci=function(e,t,i){this.start=t,this.end=i,null!==e.sourceFile&&(this.source=e.sourceFile)};function _i(e,t){for(var i=1,r=0;;){var s=fi(e,r,t);if(s<0)return new ki(i,t-r);++i,r=s}}var Pi={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},Ai=!1;function Ii(e,t){return 2|(e?4:0)|(t?8:0)}var Ti=function(e,t,i){this.options=e=function(e){var t={};for(var i in Pi)t[i]=e&&vi(e,i)?e[i]:Pi[i];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Ai&&"object"==typeof console&&console.warn&&(Ai=!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),wi(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return wi(t.onComment)&&(t.onComment=function(e,t){return function(i,r,s,n,a,o){var h={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(h.loc=new Ci(this,a,o)),e.ranges&&(h.range=[s,n]),t.push(h)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=Si(zt[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=qt[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=Si(r);var s=(r?r+" ":"")+qt.strict;this.reservedWordsStrict=Si(s),this.reservedWordsStrictBind=Si(s+" "+qt.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(pi).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=li.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=[]},Oi={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}};Ti.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Oi.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Oi.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Oi.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Oi.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},Oi.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(64&t)>0||i||this.options.allowSuperOutsideMethod},Oi.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Oi.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Oi.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(258&t)>0||i},Oi.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},Ti.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var i=this,r=0;r<e.length;r++)i=e[r](i);return i},Ti.parse=function(e,t){return new this(t,e).parse()},Ti.parseExpressionAt=function(e,t,i){var r=new this(i,e,t);return r.nextToken(),r.parseExpression()},Ti.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Ti.prototype,Oi);var Ni=Ti.prototype,Li=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function Mi(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Ni.strictDirective=function(e){for(;;){gi.lastIndex=e,e+=gi.exec(this.input)[0].length;var t=Li.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){gi.lastIndex=e+t[0].length;var i=gi.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return";"===s||"}"===s||pi.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||"!"===s&&"="===this.input.charAt(r+1))}e+=t[0].length,gi.lastIndex=e,e+=gi.exec(this.input)[0].length,";"===this.input[e]&&e++}},Ni.eat=function(e){return this.type===e&&(this.next(),!0)},Ni.isContextual=function(e){return this.type===li.name&&this.value===e&&!this.containsEsc},Ni.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Ni.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Ni.canInsertSemicolon=function(){return this.type===li.eof||this.type===li.braceR||pi.test(this.input.slice(this.lastTokEnd,this.start))},Ni.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ni.semicolon=function(){this.eat(li.semi)||this.insertSemicolon()||this.unexpected()},Ni.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Ni.expect=function(e){this.eat(e)||this.unexpected()},Ni.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Ni.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")}},Ni.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Ni.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")},Ni.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Ri=Ti.prototype;Ri.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==li.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,s=Object.keys(this.undefinedExports);r<s.length;r+=1){var n=s[r];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 Di={kind:"loop"},Vi={kind:"switch"};Ri.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;gi.lastIndex=this.pos;var t=gi.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(91===r||92===r||r>55295&&r<56320)return!0;if(e)return!1;if(123===r)return!0;if(ii(r,!0)){for(var s=i+1;ri(r=this.input.charCodeAt(s),!0);)++s;if(92===r||r>55295&&r<56320)return!0;var n=this.input.slice(i,s);if(!Kt.test(n))return!0}return!1},Ri.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;gi.lastIndex=this.pos;var e,t=gi.exec(this.input),i=this.pos+t[0].length;return!(pi.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(ri(e=this.input.charCodeAt(i+8))||e>55295&&e<56320))},Ri.parseStatement=function(e,t,i){var r,s=this.type,n=this.startNode();switch(this.isLet(e)&&(s=li._var,r="let"),s){case li._break:case li._continue:return this.parseBreakContinueStatement(n,s.keyword);case li._debugger:return this.parseDebuggerStatement(n);case li._do:return this.parseDoStatement(n);case li._for:return this.parseForStatement(n);case li._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case li._class:return e&&this.unexpected(),this.parseClass(n,!0);case li._if:return this.parseIfStatement(n);case li._return:return this.parseReturnStatement(n);case li._switch:return this.parseSwitchStatement(n);case li._throw:return this.parseThrowStatement(n);case li._try:return this.parseTryStatement(n);case li._const:case li._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(n,r);case li._while:return this.parseWhileStatement(n);case li._with:return this.parseWithStatement(n);case li.braceL:return this.parseBlock(!0,n);case li.semi:return this.parseEmptyStatement(n);case li._export:case li._import:if(this.options.ecmaVersion>10&&s===li._import){gi.lastIndex=this.pos;var a=gi.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'")),s===li._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 s===li.name&&"Identifier"===l.type&&this.eat(li.colon)?this.parseLabeledStatement(n,c,l,e):this.parseExpressionStatement(n,l)}},Ri.parseBreakContinueStatement=function(e,t){var i="break"===t;this.next(),this.eat(li.semi)||this.insertSemicolon()?e.label=null:this.type!==li.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var s=this.labels[r];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(i||"loop"===s.kind))break;if(e.label&&i)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")},Ri.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Ri.parseDoStatement=function(e){return this.next(),this.labels.push(Di),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(li._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(li.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Ri.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Di),this.enterScope(0),this.expect(li.parenL),this.type===li.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===li._var||this.type===li._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,"VariableDeclaration"),(this.type===li._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===li._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var n=this.isContextual("let"),a=!1,o=new Mi,h=this.parseExpression(!(t>-1)||"await",o);return this.type===li._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===li._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))},Ri.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Ui|(i?0:Bi),!1,t)},Ri.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(li._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Ri.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(li.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Ri.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(li.braceL),this.labels.push(Vi),this.enterScope(0);for(var i=!1;this.type!==li.braceR;)if(this.type===li._case||this.type===li._default){var r=this.type===li._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(li.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")},Ri.parseThrowStatement=function(e){return this.next(),pi.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 ji=[];Ri.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===li._catch){var t=this.startNode();if(this.next(),this.eat(li.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(li.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(li._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Ri.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Ri.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Di),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Ri.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")},Ri.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Ri.parseLabeledStatement=function(e,t,i,r){for(var s=0,n=this.labels;s<n.length;s+=1)n[s].name===t&&this.raise(i.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===li._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(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")},Ri.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Ri.parseBlock=function(e,t,i){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(li.braceL),e&&this.enterScope(0);this.type!==li.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Ri.parseFor=function(e,t){return e.init=t,this.expect(li.semi),e.test=this.type===li.semi?null:this.parseExpression(),this.expect(li.semi),e.update=this.type===li.parenR?null:this.parseExpression(),this.expect(li.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Ri.parseForIn=function(e,t){var i=this.type===li._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(li.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")},Ri.parseVar=function(e,t,i){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(li.eq)?r.init=this.parseMaybeAssign(t):"const"!==i||this.type===li._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===li._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(li.comma))break}return e},Ri.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Ui=1,Bi=2;function Fi(e,t){var i=t.key.name,r=e[i],s="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(s=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===s||"iset"===r&&"iget"===s||"sget"===r&&"sset"===s||"sset"===r&&"sget"===s?(e[i]="true",!1):!!r||(e[i]=s,!1)}function Wi(e,t){var i=e.computed,r=e.key;return!i&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}Ri.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===li.star&&t&Bi&&this.unexpected(),e.generator=this.eat(li.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Ui&&(e.id=4&t&&this.type!==li.name?null:this.parseIdent(),!e.id||t&Bi||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(Ii(e.async,e.generator)),t&Ui||(e.id=this.type===li.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,s),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&Ui?"FunctionDeclaration":"FunctionExpression")},Ri.parseFunctionParams=function(e){this.expect(li.parenL),e.params=this.parseBindingList(li.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ri.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),n=!1;for(s.body=[],this.expect(li.braceL);this.type!==li.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(s.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&&Fi(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Ri.parseClassElement=function(e){if(this.eat(li.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=!1,n=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(li.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===li.star?o=!0:r="static"}if(i.static=o,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==li.star||this.canInsertSemicolon()?r="async":n=!0),!r&&(t>=9||!n)&&this.eat(li.star)&&(s=!0),!r&&!n&&!s){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=h:r=h)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===li.parenL||"method"!==a||s||n){var c=!i.static&&Wi(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,s,n,l)}else this.parseClassField(i);return i},Ri.isClassElementNameStart=function(){return this.type===li.name||this.type===li.privateId||this.type===li.num||this.type===li.string||this.type===li.bracketL||this.type.keyword},Ri.parseClassElementName=function(e){this.type===li.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)},Ri.parseClassMethod=function(e,t,i,r){var s=e.key;"constructor"===e.kind?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&Wi(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,r);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")},Ri.parseClassField=function(e){if(Wi(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Wi(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(li.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")},Ri.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==li.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Ri.parseClassId=function(e,t){this.type===li.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Ri.parseClassSuper=function(e){e.superClass=this.eat(li._extends)?this.parseExprSubscripts(!1):null},Ri.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Ri.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,i=e.used,r=this.privateNameStack.length,s=0===r?null:this.privateNameStack[r-1],n=0;n<i.length;++n){var a=i[n];vi(t,a.name)||(s?s.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},Ri.parseExport=function(e,t){if(this.next(),this.eat(li.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!==li.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(li._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===li._function||(i=this.isAsyncFunction())){var r=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(r,4|Ui,!1,i)}else if(this.type===li._class){var s=this.startNode();e.declaration=this.parseClass(s,"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!==li.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")},Ri.checkExport=function(e,t,i){e&&(vi(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)},Ri.checkPatternExport=function(e,t){var i=t.type;if("Identifier"===i)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===i)for(var r=0,s=t.properties;r<s.length;r+=1){var n=s[r];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)},Ri.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s.id)}},Ri.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Ri.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(li.braceL);!this.eat(li.braceR);){if(i)i=!1;else if(this.expect(li.comma),this.afterTrailingComma(li.braceR))break;var r=this.startNode();r.local=this.parseModuleExportName(),r.exported=this.eatContextual("as")?this.parseModuleExportName():r.local,this.checkExport(e,r.exported["Identifier"===r.exported.type?"name":"value"],r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},Ri.parseImport=function(e){return this.next(),this.type===li.string?(e.specifiers=ji,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===li.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Ri.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===li.name){var i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(li.comma))return e}if(this.type===li.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(li.braceL);!this.eat(li.braceR);){if(t)t=!1;else if(this.expect(li.comma),this.afterTrailingComma(li.braceR))break;var s=this.startNode();s.imported=this.parseModuleExportName(),this.eatContextual("as")?s.local=this.parseIdent():(this.checkUnreserved(s.imported),s.local=s.imported),this.checkLValSimple(s.local,2),e.push(this.finishNode(s,"ImportSpecifier"))}return e},Ri.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===li.string){var e=this.parseLiteral(this.value);return Ei.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Ri.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)},Ri.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 $i=Ti.prototype;$i.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 r=0,s=e.properties;r<s.length;r+=1){var n=s[r];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},$i.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var s=e[r];s&&this.toAssignable(s,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},$i.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},$i.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==li.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},$i.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case li.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(li.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case li.braceL:return this.parseObj(!0)}return this.parseIdent()},$i.parseBindingList=function(e,t,i){for(var r=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(li.comma),t&&this.type===li.comma)r.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===li.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),r.push(n),this.type===li.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),r.push(a)}return r},$i.parseBindingListItem=function(e){return e},$i.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(li.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},$i.checkLValSimple=function(e,t,i){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(vi(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":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},$i.checkLValPattern=function(e,t,i){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,s=e.properties;r<s.length;r+=1){var n=s[r];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)}},$i.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 Hi=function(e,t,i,r,s){this.token=e,this.isExpr=!!t,this.preserveSpace=!!i,this.override=r,this.generator=!!s},qi={b_stat:new Hi("{",!1),b_expr:new Hi("{",!0),b_tmpl:new Hi("${",!1),p_stat:new Hi("(",!1),p_expr:new Hi("(",!0),q_tmpl:new Hi("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new Hi("function",!1),f_expr:new Hi("function",!0),f_expr_gen:new Hi("function",!0,!1,null,!0),f_gen:new Hi("function",!1,!1,null,!0)},Gi=Ti.prototype;Gi.initialContext=function(){return[qi.b_stat]},Gi.curContext=function(){return this.context[this.context.length-1]},Gi.braceIsBlock=function(e){var t=this.curContext();return t===qi.f_expr||t===qi.f_stat||(e!==li.colon||t!==qi.b_stat&&t!==qi.b_expr?e===li._return||e===li.name&&this.exprAllowed?pi.test(this.input.slice(this.lastTokEnd,this.start)):e===li._else||e===li.semi||e===li.eof||e===li.parenR||e===li.arrow||(e===li.braceL?t===qi.b_stat:e!==li._var&&e!==li._const&&e!==li.name&&!this.exprAllowed):!t.isExpr)},Gi.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},Gi.updateContext=function(e){var t,i=this.type;i.keyword&&e===li.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr},Gi.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},li.parenR.updateContext=li.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===qi.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},li.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?qi.b_stat:qi.b_expr),this.exprAllowed=!0},li.dollarBraceL.updateContext=function(){this.context.push(qi.b_tmpl),this.exprAllowed=!0},li.parenL.updateContext=function(e){var t=e===li._if||e===li._for||e===li._with||e===li._while;this.context.push(t?qi.p_stat:qi.p_expr),this.exprAllowed=!0},li.incDec.updateContext=function(){},li._function.updateContext=li._class.updateContext=function(e){!e.beforeExpr||e===li._else||e===li.semi&&this.curContext()!==qi.p_stat||e===li._return&&pi.test(this.input.slice(this.lastTokEnd,this.start))||(e===li.colon||e===li.braceL)&&this.curContext()===qi.b_stat?this.context.push(qi.f_stat):this.context.push(qi.f_expr),this.exprAllowed=!1},li.backQuote.updateContext=function(){this.curContext()===qi.q_tmpl?this.context.pop():this.context.push(qi.q_tmpl),this.exprAllowed=!1},li.star.updateContext=function(e){if(e===li._function){var t=this.context.length-1;this.context[t]===qi.f_expr?this.context[t]=qi.f_expr_gen:this.context[t]=qi.f_gen}this.exprAllowed=!0},li.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==li.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var zi=Ti.prototype;function Ki(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Ki(e.expression)}zi.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,s=e.key;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===n&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[r="$"+r];a?("init"===n?this.strict&&a.init||a.get||a.set:a.init||a[n])&&this.raiseRecoverable(s.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[n]=!0}}},zi.parseExpression=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===li.comma){var n=this.startNodeAt(i,r);for(n.expressions=[s];this.eat(li.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return s},zi.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,s=-1,n=-1,a=-1;t?(s=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Mi,r=!0);var o=this.start,h=this.startLoc;this.type!==li.parenL&&this.type!==li.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===li.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===li.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 r&&this.checkExpressionErrors(t,!0),s>-1&&(t.parenthesizedAssign=s),n>-1&&(t.trailingComma=n),c},zi.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(li.question)){var n=this.startNodeAt(i,r);return n.test=s,n.consequent=this.parseMaybeAssign(),this.expect(li.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return s},zi.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||s.start===i&&"ArrowFunctionExpression"===s.type?s:this.parseExprOp(s,i,r,-1,e)},zi.parseExprOp=function(e,t,i,r,s){var n=this.type.binop;if(null!=n&&(!s||this.type!==li._in)&&n>r){var a=this.type===li.logicalOR||this.type===li.logicalAND,o=this.type===li.coalesce;o&&(n=li.logicalAND.binop);var h=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,s),c,l,n,s),u=this.buildBinary(t,i,e,p,h,a||o);return(a&&this.type===li.coalesce||o&&(this.type===li.logicalOR||this.type===li.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,t,i,r,s)}return e},zi.buildBinary=function(e,t,i,r,s,n){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=i,a.operator=s,a.right=r,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")},zi.parseMaybeUnary=function(e,t,i,r){var s,n=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===li.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,r),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&&Ki(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==li.privateId){if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(n,a);c.operator=this.value,c.prefix=!1,c.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==li._in&&this.unexpected();return i||!this.eat(li.starstar)?s:t?void this.unexpected(this.lastTokStart):this.buildBinary(n,a,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},zi.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===s.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return s;var n=this.parseSubscripts(s,i,r,!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},zi.parseSubscripts=function(e,t,i,r,s){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,r,n,a,s);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}},zi.parseSubscript=function(e,t,i,r,s,n,a){var o=this.options.ecmaVersion>=11,h=o&&this.eat(li.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(li.bracketL);if(c||h&&this.type!==li.parenL&&this.type!==li.backQuote||this.eat(li.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(li.bracketR)):this.type===li.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(!r&&this.eat(li.parenL)){var p=new Mi,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(li.parenR,this.options.ecmaVersion>=8,!1,p);if(s&&!h&&!this.canInsertSemicolon()&&this.eat(li.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===li.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},zi.parseExprAtom=function(e,t){this.type===li.slash&&this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case li._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==li.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==li.dot&&this.type!==li.bracketL&&this.type!==li.parenL&&this.unexpected(),this.finishNode(i,"Super");case li._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case li.name:var s=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(li._function))return this.overrideContext(qi.f_expr),this.parseFunction(this.startNodeAt(s,n),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(li.arrow))return this.parseArrowExpression(this.startNodeAt(s,n),[o],!1,t);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===li.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(li.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,n),[o],!0,t)}return o;case li.regexp:var h=this.value;return(i=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},i;case li.num:case li.string:return this.parseLiteral(this.value);case li._null:case li._true:case li._false:return(i=this.startNode()).value=this.type===li._null?null:this.type===li._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case li.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),l;case li.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(li.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case li.braceL:return this.overrideContext(qi.b_expr),this.parseObj(!1,e);case li._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case li._class:return this.parseClass(this.startNode(),!1);case li._new:return this.parseNew();case li.backQuote:return this.parseTemplate();case li._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},zi.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 li.parenL:return this.parseDynamicImport(e);case li.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},zi.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(li.parenR)){var t=this.start;this.eat(li.comma)&&this.eat(li.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},zi.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")},zi.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")},zi.parseParenExpression=function(){this.expect(li.parenL);var e=this.parseExpression();return this.expect(li.parenR),e},zi.parseParenAndDistinguishExpression=function(e,t){var i,r=this.start,s=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 Mi,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==li.parenR;){if(l?l=!1:this.expect(li.comma),n&&this.afterTrailingComma(li.parenR,!0)){p=!0;break}if(this.type===li.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===li.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(li.parenR),e&&!this.canInsertSemicolon()&&this.eat(li.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(r,s,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(r,s);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},zi.parseParenItem=function(e){return e},zi.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var Qi=[];zi.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(li.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 r=this.start,s=this.startLoc,n=this.type===li._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,s,!0,!1),n&&"ImportExpression"===e.callee.type&&this.raise(r,"Cannot use new with import()"),this.eat(li.parenL)?e.arguments=this.parseExprList(li.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Qi,this.finishNode(e,"NewExpression")},zi.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===li.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===li.backQuote,this.finishNode(i,"TemplateElement")},zi.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 r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===li.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(li.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(li.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")},zi.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===li.name||this.type===li.num||this.type===li.string||this.type===li.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===li.star)&&!pi.test(this.input.slice(this.lastTokEnd,this.start))},zi.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(li.braceR);){if(r)r=!1;else if(this.expect(li.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(li.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")},zi.parseProperty=function(e,t){var i,r,s,n,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(li.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===li.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(this.type===li.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),a.argument=this.parseMaybeAssign(!1,t),this.type===li.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)&&(s=this.start,n=this.startLoc),e||(i=this.eat(li.star)));var o=this.containsEsc;return this.parsePropertyName(a),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(a)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(li.star),this.parsePropertyName(a,t)):r=!1,this.parsePropertyValue(a,e,i,r,s,n,t,o),this.finishNode(a,"Property")},zi.parsePropertyValue=function(e,t,i,r,s,n,a,o){if((i||r)&&this.type===li.colon&&this.unexpected(),this.eat(li.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===li.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r);else if(t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===li.comma||this.type===li.braceR||this.type===li.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===li.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(i||r)&&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")}},zi.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(li.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(li.bracketR),e.key;e.computed=!1}return e.key=this.type===li.num||this.type===li.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},zi.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},zi.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Ii(t,r.generator)|(i?128:0)),this.expect(li.parenL),r.params=this.parseBindingList(li.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},zi.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|Ii(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,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},zi.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==li.braceL,n=this.strict,a=!1;if(s)e.body=this.parseMaybeAssign(r),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()},zi.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1)if("Identifier"!==i[t].type)return!1;return!0},zi.checkParams=function(e,t){for(var i=Object.create(null),r=0,s=e.params;r<s.length;r+=1){var n=s[r];this.checkLValInnerPattern(n,1,t?null:i)}},zi.parseExprList=function(e,t,i,r){for(var s=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(li.comma),t&&this.afterTrailingComma(e))break;var a=void 0;i&&this.type===li.comma?a=null:this.type===li.ellipsis?(a=this.parseSpread(r),r&&this.type===li.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),s.push(a)}return s},zi.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===r&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},zi.parseIdent=function(e,t){var i=this.startNode();return this.type===li.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},zi.parsePrivateIdent=function(){var e=this.startNode();return this.type===li.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},zi.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===li.semi||this.canInsertSemicolon()||this.type!==li.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(li.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},zi.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 Ji=Ti.prototype;Ji.raise=function(e,t){var i=_i(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r},Ji.raiseRecoverable=Ji.raise,Ji.curPosition=function(){if(this.options.locations)return new ki(this.curLine,this.pos-this.lineStart)};var Xi=Ti.prototype,Yi=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Xi.enterScope=function(e){this.scopeStack.push(new Yi(e))},Xi.exitScope=function(){this.scopeStack.pop()},Xi.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Xi.declareName=function(e,t,i){var r=!1;if(2===t){var s=this.currentScope();r=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var n=this.currentScope();r=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){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")},Xi.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Xi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Xi.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Xi.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 Zi=function(e,t,i){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ci(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},er=Ti.prototype;function tr(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}er.startNode=function(){return new Zi(this,this.start,this.startLoc)},er.startNodeAt=function(e,t){return new Zi(this,e,t)},er.finishNode=function(e,t){return tr.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},er.finishNodeAt=function(e,t,i,r){return tr.call(this,e,t,i,r)},er.copyNode=function(e){var t=new Zi(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var ir,rr,sr="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",nr=sr+" Extended_Pictographic",ar={9:sr,10:nr,11:nr,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"},or="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",hr="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",cr=hr+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",lr=cr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",pr={9:hr,10:cr,11:lr,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"},ur={};for(var dr=0,fr=[9,10,11,12,13];dr<fr.length;dr+=1)rr=void 0,(rr=ur[ir=fr[dr]]={binary:Si(ar[ir]+" "+or),nonBinary:{General_Category:Si(or),Script:Si(pr[ir])}}).nonBinary.Script_Extensions=rr.nonBinary.Script,rr.nonBinary.gc=rr.nonBinary.General_Category,rr.nonBinary.sc=rr.nonBinary.Script,rr.nonBinary.scx=rr.nonBinary.Script_Extensions;var mr=Ti.prototype,gr=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=ur[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 yr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function br(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function xr(e){return e>=65&&e<=90||e>=97&&e<=122}function vr(e){return xr(e)||95===e}function wr(e){return vr(e)||Sr(e)}function Sr(e){return e>=48&&e<=57}function Er(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function kr(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Cr(e){return e>=48&&e<=55}gr.prototype.reset=function(e,t,i){var r=-1!==i.indexOf("u");this.start=0|e,this.source=t+"",this.flags=i,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},gr.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},gr.prototype.at=function(e,t){void 0===t&&(t=!1);var i=this.source,r=i.length;if(e>=r)return-1;var s=i.charCodeAt(e);if(!t&&!this.switchU||s<=55295||s>=57344||e+1>=r)return s;var n=i.charCodeAt(e+1);return n>=56320&&n<=57343?(s<<10)+n-56613888:s},gr.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var i=this.source,r=i.length;if(e>=r)return r;var s,n=i.charCodeAt(e);return!t&&!this.switchU||n<=55295||n>=57344||e+1>=r||(s=i.charCodeAt(e+1))<56320||s>57343?e+1:e+2},gr.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},gr.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},gr.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},gr.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},mr.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=0;r<i.length;r++){var s=i.charAt(r);-1===t.indexOf(s)&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(s,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},mr.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},mr.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 r=i[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},mr.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")},mr.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},mr.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)},mr.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},mr.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},mr.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},mr.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return-1!==s&&s<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1},mr.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)},mr.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},mr.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},mr.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},mr.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)},mr.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},mr.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!br(t)&&(e.lastIntValue=t,e.advance(),!0)},mr.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;-1!==(i=e.current())&&!br(i);)e.advance();return e.pos!==t},mr.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))},mr.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")}},mr.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},mr.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=yr(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=yr(e.lastIntValue);return!0}return!1},mr.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),function(e){return ii(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},mr.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),function(e){return ri(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},mr.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)},mr.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},mr.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},mr.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)},mr.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},mr.regexp_eatZero=function(e){return 48===e.current()&&!Sr(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},mr.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)},mr.regexp_eatControlLetter=function(e){var t=e.current();return!!xr(t)&&(e.lastIntValue=t%32,e.advance(),!0)},mr.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var i,r=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(s&&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(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(i=e.lastIntValue)>=0&&i<=1114111)return!0;s&&e.raise("Invalid unicode escape"),e.pos=r}return!1},mr.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))},mr.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},mr.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},mr.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 r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s),!0}return!1},mr.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){vi(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")},mr.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},mr.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";vr(t=e.current());)e.lastStringValue+=yr(t),e.advance();return""!==e.lastStringValue},mr.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";wr(t=e.current());)e.lastStringValue+=yr(t),e.advance();return""!==e.lastStringValue},mr.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},mr.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},mr.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")}}},mr.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||Cr(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},mr.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)},mr.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Sr(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},mr.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},mr.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Sr(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t},mr.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Er(i=e.current());)e.lastIntValue=16*e.lastIntValue+kr(i),e.advance();return e.pos!==t},mr.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},mr.regexp_eatOctalDigit=function(e){var t=e.current();return Cr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},mr.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var s=e.current();if(!Er(s))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+kr(s),e.advance()}return!0};var _r=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ci(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Pr=Ti.prototype;function Ar(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Ir(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Pr.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 _r(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Pr.getToken=function(){return this.next(),new _r(this)},"undefined"!=typeof Symbol&&(Pr[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===li.eof,value:t}}}}),Pr.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(li.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Pr.readToken=function(e){return ii(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Pr.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},Pr.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 r=void 0,s=t;(r=fi(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())},Pr.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!di(r);)r=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())},Pr.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&&mi.test(String.fromCharCode(e))))break e;++this.pos}}},Pr.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)},Pr.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(li.ellipsis)):(++this.pos,this.finishToken(li.dot))},Pr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(li.assign,2):this.finishOp(li.slash,1)},Pr.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=42===e?li.star:li.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++i,r=li.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(li.assign,i+1):this.finishOp(r,i)},Pr.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(li.assign,3):this.finishOp(124===e?li.logicalOR:li.logicalAND,2):61===t?this.finishOp(li.assign,2):this.finishOp(124===e?li.bitwiseOR:li.bitwiseAND,1)},Pr.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(li.assign,2):this.finishOp(li.bitwiseXOR,1)},Pr.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&&!pi.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(li.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(li.assign,2):this.finishOp(li.plusMin,1)},Pr.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(li.assign,i+1):this.finishOp(li.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(li.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Pr.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(li.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(li.arrow)):this.finishOp(61===e?li.eq:li.prefix,1)},Pr.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(li.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(li.assign,3):this.finishOp(li.coalesce,2)}return this.finishOp(li.question,1)},Pr.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,ii(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(li.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ir(e)+"'")},Pr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(li.parenL);case 41:return++this.pos,this.finishToken(li.parenR);case 59:return++this.pos,this.finishToken(li.semi);case 44:return++this.pos,this.finishToken(li.comma);case 91:return++this.pos,this.finishToken(li.bracketL);case 93:return++this.pos,this.finishToken(li.bracketR);case 123:return++this.pos,this.finishToken(li.braceL);case 125:return++this.pos,this.finishToken(li.braceR);case 58:return++this.pos,this.finishToken(li.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(li.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(li.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ir(e)+"'")},Pr.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)},Pr.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(pi.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var s=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 gr(this));o.reset(i,s,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(s,a)}catch(e){}return this.finishToken(li.regexp,{pattern:s,flags:a,value:h})},Pr.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&void 0===t,s=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(r&&95===l)s&&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 r&&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},Pr.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=Ar(this.input.slice(t,this.pos)),++this.pos):ii(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(li.num,i)},Pr.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 r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&110===r){var s=Ar(this.input.slice(t,this.pos));return++this.pos,ii(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(li.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),ii(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(li.num,a)},Pr.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},Pr.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(di(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(li.string,t)};var Tr={};Pr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Tr)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Pr.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Tr;this.raise(e,t)},Pr.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!==li.template&&this.type!==li.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(li.template,e)):36===i?(this.pos+=2,this.finishToken(li.dollarBraceL)):(++this.pos,this.finishToken(li.backQuote));if(92===i)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(di(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}},Pr.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(li.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Pr.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 Ir(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 r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return di(t)?"":String.fromCharCode(t)}},Pr.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return null===i&&this.invalidStringToken(t,"Bad character escape sequence"),i},Pr.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(ri(s,r))this.pos+=s<=65535?1:2;else{if(92!==s)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?ii:ri)(a,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ir(a),i=this.pos}t=!1}return e+this.input.slice(i,this.pos)},Pr.readWord=function(){var e=this.readWord1(),t=li.name;return this.keywords.test(e)&&(t=hi[e]),this.finishToken(t,e)},Ti.acorn={Parser:Ti,version:"8.7.0",defaultOptions:Pi,Position:ki,SourceLocation:Ci,getLineInfo:_i,Node:Zi,TokenType:si,tokTypes:li,keywordTypes:hi,TokContext:Hi,tokContexts:qi,isIdentifierChar:ri,isIdentifierStart:ii,Token:_r,isNewLine:di,lineBreak:pi,lineBreakG:ui,nonASCIIwhitespace:mi};const Or=Ti.extend((function(e){let t=!1,i=!1,r=!1;return class extends e{parseFunction(e,t,i,r,s){return"**"===this.type.label&&(e.isSubscriptFunction=!0,this.next()),super.parseFunction(e,t,i,r,s)}isClassElementNameStart(){return"**"===this.type.label&&(t=!0,this.next()),super.isClassElementNameStart()}isAsyncProp(e){return"**"===this.type.label&&(t=!0,this.next()),super.isAsyncProp(e)}eat(e){return(r&&":"===e.label||(r||i)&&"*"===e.label)&&"**"===this.type.label?(t=!0,this.next(),!1):super.eat(e)}parseProperty(e,i){r=!0;let s=super.parseProperty(e,i);return r=!1,t&&(s.value.isSubscriptFunction=!0,t=!1),s}parseClassElement(e){i=!0;let r=super.parseClassElement(e);return i=!1,t&&(r.value.isSubscriptFunction=!0,t=!1),r}}})),Nr=e=>class extends(Ht(e)){static get subscriptParams(){return{globalsAutoObserve:["document"]}}static get subscriptMethods(){return[]}static expose(e,i){let r=t(e,"oohtml","subscripts"),s=i.name;return s||(s=[...r.keys()].filter((e=>a(e))).length),r.set(s,i),i}static implementMethod(e,t){let i=super.implementMethod(e,t);return this.expose(t,i)}static implementScript(e,t){let i=(e.textContent||"").trim();return this.expose(t,jt.call(t,i))}static doConnectedCallback(e){if("undefined"==typeof WebQit||!WebQit.Observer)return;const i=t(e,"oohtml","subscripts"),r=(e,t,r=[])=>{i.forEach((t=>t.thread(...e.map((e=>r.concat(e.path))))))};(this.subscriptParams.globalsAutoObserve||[]).forEach((t=>{WebQit.Observer.observe(globalThis[t],(e=>r(e,0,[t])),{subtree:!0,diff:!0,tags:[e,"subscript-element",t],unique:!0})})),WebQit.Observer.observe(e,(e=>r(e,0,["this"])),{subtree:!0,diff:!0,tags:[e,"subscript-element","this"],unique:!0})}static doDisconnectedCallback(e){"undefined"!=typeof WebQit&&WebQit.Observer&&((this.subscriptParams.globalsAutoObserve||[]).forEach((t=>{WebQit.Observer.unobserve(globalThis[t],null,null,{subtree:!0,tags:[e,"subscript-element",t]})})),WebQit.Observer.unobserve(e,null,null,{subtree:!0,tags:[e,"subscript-element","this"]}))}connectedCallback(){this.constructor.doConnectedCallback(this),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){this.constructor.doDisconnectedCallback(this),super.disconnectedCallback&&super.disconnectedCallback()}get subscripts(){return t(this,"oohtml","subscripts")}};function Lr(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Lr.call(this,e,!1)}));const s=r.DOM.mutations,n=We.call(this,{selectors:{script:'script[type="subscript"]'},api:{bind:"bind",unbind:"unbind"},script:{}},e),a=Nr(class{});s.onPresent(n.get("selectors.script"),(e=>{let i=e.parentNode;if(!i)return;let r=t(i,"oohtml","subscript").get("embeds");if(r||(r=new WeakSet,t(i,"oohtml","subscript").set("embeds",r)),r.has(e))return;a.implementScript(i,e)(),a.doConnectedCallback(i),r.add(e);let n=s.onRemoved(i,(()=>{a.doDisconnectedCallback(i),r.delete(e),n.disconnect()}),{ignoreTransients:!0})})),r.OOHTML||(r.OOHTML={}),r.OOHTML.SubscriptElement=Nr}(function(e=null,t=!1){const i=Oe.call(this);i.OOHTML||(i.OOHTML={},Ke.call(this,e,t),Je.call(this,e,t),et.call(this,e,t),tt.call(this,e,t),Lr.call(this,e,t),i.Observer=ae)}).call(window)})();
1
+ (()=>{"use strict";function e(e){return typeof e}function t(e,...t){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var i,r,s=globalThis.WebQitInternalsRegistry.get(e);if(!s){if(s=new Map,!1===t[0])return s;globalThis.WebQitInternalsRegistry.set(e,s)}for(;i=t.shift();)if((r=s)&&!(s=s.get(i))){if(s=new Map,!1===t[0])return s;r.set(i,s)}return s}function i(e){return Array.isArray(e)}function r(e){return"function"==typeof e}function s(e){return r(e)||e&&"[object function]"==={}.toString.call(e)}function n(e){return e instanceof Number||"number"==typeof e}function a(e){return n(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function o(e){return!Array.isArray(e)&&"object"==typeof e&&e}function h(e){return e instanceof String||"string"==typeof e&&null!==e}function c(e){return Array.isArray(e)||"object"==typeof e&&e||r(e)}function l(e){return arguments.length&&(void 0===e||void 0===e)}function p(e,t=!0){return i(e)?e:!t&&o(e)?[e]:!1!==e&&0!==e&&function(e){return function(e){return null===e||""===e}(e)||l(e)||!1===e||0===e||c(e)&&!Object.keys(e).length}(e)?[]:function(e){return!h(e)&&!l(e.length)}(e)?Array.prototype.slice.call(e):o(e)?Object.values(e):[e]}function u(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?e.join(".")===t.join("."):e.length===t.length&&e.reduce(((e,i,r)=>e&&i===t[r]),!0)}function d(e,t,r=null){return i(t)?e.filter((e=>r?t.filter((t=>r(e,t))).length:-1!==t.indexOf(e))):[]}function f(e){return(g(e)?e:p(e).length?[e]:[]).reduce(((e,t)=>e.concat([p(t)])),[]).map((e=>m.resolve(e)))}new Map;class m extends Array{static resolve(e){return e.every((e=>!(e+"").includes(".")))?(new m).concat(e):e}get dotSafe(){return!0}}function g(e){return p(e).reduce(((e,t)=>e||i(t)),!1)}function y(e){return e.filter((e=>e||0===e)).length!==e.length}class b{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=f(t.filter),r=p((t.params||{}).tags),s=f(e.filter),n=p((e.params||{}).tags);return(!e.originalHandler||t.handler===e.originalHandler)&&(!s.length||u(s,i))&&(!n.length||n.length===r.length&&d(r,n).length===n.length)}))}static _getFirebase(i,r,s=!0,n=this.__namespace){if(!c(r))throw new Error('Subject must be of type object; "'+e(r)+'" given!');var a=this;return n&&globalThis.WebQitObserverNamespaceRegistry.has(i+"-"+n)&&(a=globalThis.WebQitObserverNamespaceRegistry.get(i+"-"+n),i+="-"+n),!t(r,"firebases").has(i)&&s&&t(r,"firebases").set(i,new a(r)),t(r,"firebases").get(i)}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 x{constructor(e,t){this.target=e,this.handler=t.handler,this.filter=t.filter,this.params=t.params}disconnect(){this.disconnected=!0}}class v extends x{fire(e,t,i){return this.disconnected||this.filter&&!d(p(this.filter),[e.type]).length?t(...Array.prototype.slice.call(arguments,2)):this.handler(e,i,t)}}function w(e,t){var i=void 0;return c(e)&&Object.keys(e).forEach(((r,s)=>{!1!==i&&(i=t(a(r)?parseFloat(r):r,e[r],s))})),i}class S{constructor(e,t){if(this.target=e,!t.type)throw new Error("Action type must be given in definition!");w(t,((e,t)=>{Object.defineProperty(this,e,{value:t,enumerable:!0})})),Object.seal(this)}}class E extends b{add(e){return super.add(new v(this.target,e))}fire(e,t=null){if(e instanceof S||(e=new S(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=(r,...s)=>{var n=this.fireables[r];return n?n.fire(e,((...e)=>i(r+1,...e)),...s):t?t(...s):s[0]};var r=i(0);return this.currentlyFiring.pop(),r}static getFirebase(e,t=!0,i=null){return super._getFirebase("interceptor",...arguments)}static namespace(e,t=null){return super._namespace("interceptor",...arguments)}}function k(e){return t(e,!1).get(e)||e}function C(e,t,i={},r={}){if(!t||!c(t))throw new Error("Target must be of type object!");t=k(t);var s,n=function(r){return arguments.length?r:Reflect[e](t,...Object.values(i))};return(s=E.getFirebase(t,!1,r.namespace))?s.fire({type:e,...i},n):n()}function _(e,t,i,r={}){return C("apply",e,{thisArgument:t,argumentsList:i},r)}function P(e,t,i=null,r={}){return C("construct",e,arguments.length>2?{argumentsList:t,newTarget:i}:{argumentsList:t},r)}function A(e,t=1){var i=0;e.forEach((e=>{i++}));var r=e.slice(e.length-i,t);return arguments.length>1?r:r[0]}function I(e,t=1){return arguments.length>1?A(e.slice().reverse(),t).reverse():A(e.slice().reverse())}function T(e,t){return e.reduce(((e,i,r)=>e||t(i,r)),!1)}function O(e,t,i=null){return i||!1!==i&&e.dotSafe&&t.dotSafe?(e.join(".")+".").startsWith(t.join(".")+"."):t.reduce(((t,i,r)=>t&&i===e[r]),!0)}function N(e,t,i=null,r=!1){var s=function(e,t,i=null,r=!1){return t.length>e.length?-1:("number"==typeof i?r?e.slice(0,i+1+(i<0?e.length:0)):e.slice(i):e).reduce(((e,i,s)=>{var[n,a,o]=e;if(!r&&n>-1)return[n,a,o];var h=o+1,c=i===t[h]?0===h?[s,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]+(r||"number"!=typeof i?0:i>-1?i:e.length-i)}(e,t,i,r);return-1===s?[]:e.slice(s+t.length)}class L{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=o(e)&&!l(e.propagationStopped)&&!l(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 M extends x{constructor(e,t){if(super(e,t),this.filters2D=f(this.filter),this.filtersIsOriginally2D=g(this.filter),this.filtersIsDynamic=this.filters2D.filter((e=>y(p(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&&!T(e,(e=>this.params.type===e.type)))return;const t=e=>!["set","def"].includes(e.type)||!this.params.diff||(s(this.params.diff)?this.params.diff(e.value,e.oldValue):e.value!==e.oldValue);var i=new L(this.target);if(this.filters2D.length){var r=e.filter((e=>this.filters2D.filter(((i,r)=>{var s=i.slice();return this.filtersIsDynamic&&e.path.forEach(((e,t)=>{s[t]=s[t]||0===s[t]?s[t]:e})),(!this.filtersIsDynamic||!y(s))&&t(e)&&(!this.params.subtree&&u(s,e.path)||this.params.suptree&&O(s,e.path)&&(!a(this.params.suptree)||N(s,e.path).length<=this.params.suptree)||this.params.subtree&&e.path.length>=s.length&&O(e.path,s)&&(!a(this.params.subtree)||N(e.path,s).length<=this.params.subtree))})).length));if(r.length)if(this.filtersIsOriginally2D||this.params.subtree){var n=r;o(this.filter)&&(n={...this.filter},r.forEach(((e,t)=>{n[e.name]=e}))),i.respondWith(this.handler(n,i))}else r.forEach(((e,t)=>{i.respondWith(this.handler(e,i))}))}else(this.params.subtree||e.filter((e=>u(e.path,[e.name]))).length===e.length)&&e.filter((e=>t(e))).length&&i.respondWith(this.handler(e,i));return i}}class R{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!");w(t,((e,t)=>{"path"===e&&(t=m.resolve(t)),Object.defineProperty(this,e,{value:t,enumerable:!0})})),this.path||Object.defineProperty(this,"path",{value:m.resolve([t.name]),enumerable:!0}),Object.seal(this)}}class D extends b{constructor(e){super(e),this.buffers=[]}add(e){return super.add(new M(this.target,e))}fire(e,t){var i=new L(this.target,t);return e=p(e,!1).map((e=>e instanceof R?e:new R(this.target,e))),this.buffers.length?(I(this.buffers)(e),i):(this.currentlyFiring.filter((t=>e.filter((e=>t.type===e.type&&t.name===e.name)).length)).length,this.fireables.forEach((r=>{if(i.propagationStopped&&t)return i;i.respondWith(r.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 V(e,r,s=null,n={}){if(!(e=s||e)||!c(e))throw new Error("Target must be of type object!");e=k(e);var a=p(r),o=a.map((i=>{var r,o=function(r){return arguments.length?r:t(e,"accessorizedProps").has(i)&&t(e,"accessorizedProps").get(i).touch(!0)?t(e,"accessorizedProps").get(i).get():s?Reflect.get(e,i,s):Reflect.get(e,i)};return(r=E.getFirebase(e,!0,n.namespace))?r.fire({type:"get",name:i,related:a,receiver:s},o):o()}));return i(r)?o:o[0]}function j(e,t,r=!1,n=!1,h=!1){var l=0,p=e.shift();if((a(p)||!0===p||!1===p)&&(l=p,p=e.shift()),!e.length)throw new Error("_merge() requires two or more array/objects.");return e.forEach(((e,u)=>{var d,f,m;(c(e)||s(e))&&(r?(d=e,m=[],function(e,t){t=(t=t||Object.prototype)&&!i(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}(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((s=>{if(t(s,p,e,u)){var c=p[s],d=e[s];if((i(c)&&i(d)||o(c)&&o(d))&&(!0===l||l>0))p[s]=i(c)&&i(d)?[]:{},j([a(l)?l-1:l,p[s],c,d],t,r,n,h);else if(i(p)&&i(e))n?p[s]=d:p.push(d);else try{h?Object.defineProperty(p,s,Object.getOwnPropertyDescriptor(e,s)):p[s]=e[s]}catch(e){}}}))})),p}function U(...e){return j(e,((e,t,i)=>!0),!1,!1,!1)}function B(t,i,r=null,n={}){if(!(t=k(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(i)&&(n=arguments.length>2?r:{},r=i,i=null),!s(r))throw new Error('Handler must be a function; "'+e(r)+'" given!');var a,o=D.getFirebase(t,!0,n.namespace),h={filter:i,handler:r,params:n};if((h.filter||"*"===h.params.subtree||h.params.subtree&&H(t))&&$(t,h.filter,h.params.subtree,n.namespace),h.params.unique&&(a=o.match({filter:i,params:n})).length){if("replace"!==h.params.unique)return a[0];o.remove(a[0])}return o.add(h)}function F(e,t,i,r=null,s={}){var n;if(e!==i&&(B(i,((i,r)=>{if(n=D.getFirebase(e,!1,s.namespace)){var a=i.map((i=>{var r=i;do{if(r.target===e)return}while(r=r.src);var s={};return w(i,((e,t)=>{"target"!==e&&"name"!==e&&"path"!==e&&"src"!==e&&(s[e]=t)})),s.name=t,s.path=[t].concat(i.path),s.originalSubject=i.originalSubject,s.src=i,new R(e,s)})).filter((e=>e));if(a.length)return n.fire(a,r.cancellable)}}),{subtree:!0,...s,unique:!0,tags:[W,t,e]}),o(r)&&(n=D.getFirebase(e,!1,s.namespace)))){var a=U({name:t,type:"set",value:i,related:[t]},r);let e=n.fire(a,s.cancellable);if(s.eventTypeReturn)return e}}const W={};function $(e,t=null,i=!1,r=null){if(!e||!c(e))throw new Error("Target must be of type object!");var s=D.getFirebase(e,!0,r);if(s&&!s.build){s.build=i;var n=f(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;s.subBuild=o&&o.length?o:null,a.forEach((t=>{var n=V(e,t,null,{namespace:r});try{c(n)&&(F(e,t,n,null,params),(s.subBuild&&H(n)||(_isFunction(i)?i(n):i&&H(n)))&&$(n,s.subBuild,i,r))}catch(e){}}))}}const H=e=>(e instanceof Object||e instanceof Array||e instanceof Function)&&("undefined"==typeof window||e!==window);function q(t,i,r=null,n={}){if(!(t=k(t))||!c(t))throw new Error('Observable subjects must be of type object; "'+e(t)+'" given!');if(s(i)&&(n=arguments.length>2?r:{},r=i,i=null),r&&!s(r))throw new Error('Handler must be a function; "'+e(r)+'" given!');var a;if(a=D.getFirebase(t,!1,n.namespace))return a.removeMatches({filter:i,originalHandler:r,params:n})}function G(e,t,i,r=null,s={}){var n;if(q(i,null,null,{...s,tags:[W,t,e]}),o(r)&&(n=D.getFirebase(e,!1,s.namespace))){var a=U({name:t,type:"del",oldValue:i,related:[t]},r);n.fire(a,s.cancellable)}}function z(e,t,i={}){return C("has",e,{name:t},i)}function K(e,r,s,a={}){r=s.receiver||r;var l=s.keysOrPayload,u=s.value;if(!r||!c(r))throw new Error("Target must be of type object!");o(l)&&(a=u||{},u=null),r=k(r);var d=E.getFirebase(r,!1,a.namespace),f=D.getFirebase(r,!1,a.namespace);const m=(i,n,o,h)=>{var l,p="set";e&&(p="defineProperty",n=(l=n||{}).value);var u,m=!1;z(r,i,a)&&(m=!0,u=V(r,i,s.receiver,a));var g={name:i,type:p,value:n,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u},y=function(e){return arguments.length&&(l?l=e:n=e),l?!(t(r,"accessorizedProps",!1).has(i)&&!t(r,"accessorizedProps").get(i).restore()||(Object.defineProperty(r,i,l),0)):t(r,"accessorizedProps",!1).has(i)?t(r,"accessorizedProps").get(i).set(n):(r[i]=n,!0)};if(d){var b=l?{type:"defineProperty",name:i,descriptor:l,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u}:{type:"set",name:i,value:n,receiver:s.receiver,related:o,detail:h,isUpdate:m,oldValue:u};g.success=d.fire(b,y)}else g.success=y();return g.success&&g.value!==g.oldValue&&(c(g.oldValue)&&G(r,i,g.oldValue,null,a),c(g.value)&&(F(r,i,g.value,null,a),f&&(f.subBuild||f.build&&H(g.value))&&$(g.value,f.subBuild,f.build,a.namespace))),g};var g,y=[];i(l)||(h(l)||n(l))&&(g=p(l))?y=g.map((e=>m(e,u,g,a.detail))):o(l)&&(g=Object.keys(l))&&(y=g.map((e=>m(e,l[e],g,a.detail))));var b,x=y.filter((e=>!1!==e.success));return f?(b=f.fire(x,a.cancellable)).successCount=x.length:a.eventTypeReturn&&(b=new L(r)),a.eventTypeReturn?b:x.length>0}function Q(e,t,i=null,r={}){return K(!0,e,{keysOrPayload:t,value:i},r)}function J(e,i,r={}){if(!e||!c(e))throw new Error("Target must be of type object!");e=k(e);var s,n,a=p(i),o=a.map((i=>{var s;z(e,i,r)&&(s=V(e,i,null,r));var n,o={name:i,type:"deleteProperty",related:a,detail:r.detail,oldValue:s},h=function(r){return arguments.length?r:!(t(e,"accessorizedProps",!1).has(i)&&!t(e,"accessorizedProps").get(i).restore()||(delete e[i],0))};return(n=E.getFirebase(e,!1,r.namespace))?o.success=n.fire({type:"deleteProperty",name:i,oldValue:s,related:a},h):o.success=h(),o.success&&c(o.oldValue)&&G(e,i,o.oldValue,null,r),o})),h=o.filter((e=>!1!==e.success));return(s=D.getFirebase(e,!1,r.namespace))?(n=s.fire(h,r.cancellable)).successCount=h.length:r.eventTypeReturn&&(n=new L(e)),r.eventTypeReturn?n:h.length>0}function X(e,t,i={}){return C("getOwnPropertyDescriptor",e,{name:t},i)}function Y(e,t={}){return C("getPrototypeOf",e,{},t)}function Z(e,t={}){return C("isExtensible",e,{},t)}function ee(e,t={}){return C("ownKeys",e,{},t)}function te(e,t={}){return C("preventExtensions",e,{},t)}function ie(e,t,i=null,r=null,s={}){return K(!1,e,arguments.length>3?{keysOrPayload:t,value:i,receiver:r}:{keysOrPayload:t,value:i},s)}function re(e,t,i={}){return C("setPrototypeOf",e,{prototype:t},i)}function se(e,t=[],r=!0){var n=0;return a(arguments[0])&&c(arguments[1])&&(n=arguments[0],e=arguments[1],t=arguments[2]||[]),j([n,{},e],((e,r,n)=>s(t)?t(e):!i(t)||!t.length||t.indexOf(e)>-1),!1,!1,r)}function ne(e){return e.filter(((e,t,i)=>i.indexOf(e)===t))}const ae={apply:_,construct:P,defineProperty:Q,deleteProperty:J,get:V,getOwnPropertyDescriptor:X,getPrototypeOf:Y,has:z,isExtensible:Z,ownKeys:ee,preventExtensions:te,set:ie,setPrototypeOf:re,accessorize:function(e,r=[],s={}){s=o(r)?r:s;var n=(1===arguments.length?Object.keys(e):p(r)).map((i=>{if(t(e,"accessorizedProps").has(i)&&t(e,"accessorizedProps").get(i).touch(!0))return!1;const r=()=>{for(var t,r=e;!t&&(r=Object.getPrototypeOf(r));)t=Object.getOwnPropertyDescriptor(r,i);return t};var n,a,o=Object.getOwnPropertyDescriptor(e,i);o||(n={writable:!0,enumerable:!(i in e),configurable:!1!==s.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 t=V(e,i,null,s);return c.ongoingGets.pop(),t},h.set=t=>{if(c.ongoingSets.length)return c.set(t);c.ongoingSets.push(1);var r=ie(e,i,t,null,s);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,i,o||n):delete e[i],t(e,"accessorizedProps").delete(i)),!0}catch(e){}return!1},intact:function(){return(Object.getOwnPropertyDescriptor(e,i)||{}).get===h.get},touch:function(e=!1){return this.intact()||!!e&&!this.restore()}};try{return Object.defineProperty(e,i,h),t(e,"accessorizedProps").set(i,c),!0}catch(e){}return!1}));return i(r)?n:n[0]},unaccessorize:function(e,r=[],s={}){s=o(r)?r:s;var n=(1===arguments.length?Object.keys(e):p(r)).map((i=>!t(e,"accessorizedProps",!1).has(i)||t(e,"accessorizedProps").get(i).restore()));return i(r)?n:n[0]},proxy:function(i,n={}){if(!c(i))throw new Error('Object must be of type target; "'+e(i)+'" given!');var a=new Proxy(i,{apply:(e,t,i)=>_(e,t,i,n),construct:(e,t,i=null)=>P(e,t,i,n),defineProperty:(e,t,i)=>Q(e,t,i,n),deleteProperty:(e,t)=>J(e,t,n),get:(e,t,i=null)=>{var o=V(e,t,i,n);return!1!==n.proxyAutoBinding&&s(o)&&!function(e){return r(e)&&/^class\s?/.test(Function.prototype.toString.call(e))}(o)?o.bind(a):o},getOwnPropertyDescriptor:(e,t)=>X(e,t,n),getPrototypeOf:e=>Y(e,n),has:(e,t)=>z(e,t,n),isExtensible:e=>Z(e,n),ownKeys:e=>ee(e,n),preventExtensions:e=>te(e,n),set:(e,t,i,r=null)=>ie(e,t,i,r,n),setPrototypeOf:(e,t)=>re(e,t,n)});return t(a).set(a,i),a},unproxy:k,observe:B,unobserve:q,intercept:function(t,i,r={}){if(!c(t=k(t)))throw new Error('Object must be of type target; "'+e(handler)+'" given!');var n={},a=!0;o(i)||(s(i)?i={"":i}:s(r)&&(i={[i]:r},r=arguments.length>3?arguments[3]:{}),a=!1);var h=E.getFirebase(t,!0,r.namespace);return Object.keys(i).forEach((t=>{if(!s(i[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(i[t])+'" given!');var o,c={filter:t,handler:i[t],params:r};if(c.params.unique&&(o=h.match(c)).length){if("replace"!==c.params.unique)return o[0];h.remove(o[0])}a?n[t]=h.add(c):n=h.add(c)})),n},unintercept:function(t,i=null,r={}){if(!(t=k(t))||!c(t))throw new Error('Object must be of type target; "'+e(t)+'" given!');var n=E.getFirebase(t,!1,r.namespace);_isObject(i)||(s(i)?i={[null]:i}:s(r)&&(i={[i]:r},r=arguments.length>3?arguments[3]:{}),isOriginallyObj=!1),(n=E.getFirebase(t,!1,r.namespace))&&Object.keys(i).forEach((t=>{if(!s(i[t]))throw new Error("Callback"+(null===t?"":" for "+t)+' must be a function; "'+e(i[t])+'" given!');var a={filter:t,originalHandler:i[t],params:r};return n.removeMatches(a)}))},closure:function(e,...t){var r=t.map((e=>{if(!c(e=k(e)))throw new Error("Target must be of type object!");return{target:e,subjectCopy:i(e)?e.slice(0):se(e)}})),s=e(...t);const n=()=>{r.map((e=>{var t,i=Object.keys(e.subjectCopy),r=Object.keys(e.target),s=[],n=ne(i.concat(r)).map((t=>{if(e.subjectCopy[t]!==e.target[t]){s.push(t);var n={name:t,related:s,buffered:!0};return r.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]),c(e.subjectCopy[t])&&G(e.target,t,e.subjectCopy[t]),c(e.target[t])&&F(e.target,t,e.target[t]),n}})).filter((e=>e));if(n.length&&(t=D.getFirebase(e.target,!1)))return t.fire(n)}))};return s instanceof Promise?s.then(n):n(),s},build:$,link:F,unlink:G,Observers:D,Interceptors:E};function oe(e){return!Array.isArray(e)&&"object"==typeof e&&e}function he(){if(!(oe(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const e=oe(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"),r=!!e.opr&&!!e.opr.addons||!!e.opera||e.navigator.userAgent.indexOf(" OPR/")>=0,s=!!e.document.documentMode,n=!s&&!!e.StyleMedia;return(t||r)&&e.CSS,n?"edge":s?"ie":r?"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 ce{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 r=e(i);if(r){var s=r=>{this.onwrite((()=>{var s=t(r,i);if(s){var n=i=>{this.cycle(e,t,i)};s instanceof Promise?s.then(n):n()}}))};r instanceof Promise?r.then(s):s()}}))}}function le(e){return e instanceof String||"string"==typeof e&&null!==e}function pe(e){return Array.isArray(e)}function ue(e){return arguments.length&&(void 0===e||void 0===e)}function de(e){return null===e||""===e}function fe(e){return"function"==typeof e}function me(e){return Array.isArray(e)||"object"==typeof e&&e||fe(e)}function ge(e,t=!0){return pe(e)?e:!t&&oe(e)?[e]:!1!==e&&0!==e&&function(e){return de(e)||ue(e)||!1===e||0===e||me(e)&&!Object.keys(e).length}(e)?[]:function(e){return!le(e)&&!ue(e.length)}(e)?Array.prototype.slice.call(e):oe(e)?Object.values(e):[e]}function ye(e){const t=he.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 be{constructor(e){this.window=e}onAdded(e,t,i={}){return i.on="added",this.onPresenceChange(e,((e,i,r,s,n)=>{t(e,i,r,s,n)}),i)}onRemoved(e,t,i={}){return i.on="removed",this.onPresenceChange(e,((e,i,r,s,n)=>{t(e,i,r,s,n)}),i)}onPresent(e,t,i={}){ye.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),le(e)?ge(this.window.document.querySelectorAll(e)).forEach((e=>t(e,1))):e.parentNode&&t(e,1)}))}onAbsent(e,t,i={}){ye.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(e,((e,i)=>{e.forEach((e=>t(e,i)))}),i),le(e)?0===ge(this.window.document.querySelectorAll(e)).length&&t(null,0):e.parentNode||t(e,0)}))}onPresenceChange(e,t,i={}){e=ge(e,!1);var r=new Set,s=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,r)=>{var s;return t.$$searchCache.has(r)?s=t.$$searchCache.get(r):(s=((e,t)=>{if(t=t.filter((e=>e.matches)),le(e)){var r=t.filter((t=>t.matches(e)));if(!1!==i.observeIndirectMutation&&(r=t.reduce(((t,i)=>t.concat(ge(i.querySelectorAll(e)))),r)).length)return r}else{if(t.includes(e))return[e];if(!1!==i.observeIndirectMutation&&t.length)for(var s=e;s=s.parentNode;)if(t.includes(s))return[e]}})(r,t,le(r))||[],t.$$searchCache.set(r,s)),e.concat(s)}),[])))(e,n)).length&&(i.maintainCallState?(n.forEach((e=>{a?(r.add(e),s.delete(e)):(r.delete(e),s.add(e))})),t(n,a,o,r,s)):t(n,a,o))},a=i.context||this.window.document.documentElement;return this._observe(a,((e,t,r,s)=>{i.ignoreTransients||(n(e,0,!0),n(e.concat(t),1,!0),n(t,0,!0)),n(s,0),n(r,1)}))}onAttrChange(e,t,i=[]){var r=new this.window.MutationObserver(t),s={attributes:!0,attributeOldValue:!0};return i&&(s.attributeFilter=i),r.observe(e,s),r}onTreeChange(e,t,i=!1){var r=new this.window.MutationObserver(t),s={childList:!0,subtree:i};return r.observe(e,s),r}onMutation(e,t,i){var r=new this.window.MutationObserver(t);return r.observe(e,i),r}_observe(e,t){if(!xe.has(e)){const t=new Set,i=new this.window.MutationObserver((e=>{if(t.size){var i=e.reduce(((e,t)=>e.concat(ge(t.addedNodes))),[]),r=e.reduce(((e,t)=>e.concat(ge(t.removedNodes))),[]),s=[],n=[];i=new Set(i),r=new Set(r),i.forEach((e=>{r.has(e)&&(r.delete(e),i.delete(e),e.isConnected?s.push(e):n.push(e))})),i=[...i],r=[...r],t.forEach((e=>e(s,n,i,r)))}}));i.observe(e,{childList:!0,subtree:!0}),xe.set(e,{callbacks:t,observer:i})}const i=xe.get(e);return i.callbacks.add(t),{disconnect(){i.callbacks.delete(t)},reconnect(){i.callbacks.add(t)}}}}const xe=new Map;function ve(e,t=null,i=!1){const r=he.call(this);if(le(e)){var s;if(e.trim().startsWith("<")){var n=r.window.document.createElement("div");n.innerHTML=e,s=i?ge(n.children):n.firstChild}else s=i?ge(Ee.call(this,e,t)):Se.call(this,e,t);return s}return e instanceof r.window.Element?i?[e]:e:i?ge(e):e}function we(e,t=null){return ve.call(this,e,t,!0)}function Se(e,t=null,i=!1){const r=he.call(this);t=t||r.window.document;var s,n=i?"querySelectorAll":"querySelector";try{s=t[n](e)}catch(i){try{s=t[n](e.replace(/\:is\(/g,":matches("))}catch(i){try{s=t[n](e.replace(/\:is\(/g,":-webkit-any("))}catch(i){try{s=t[n](e.replace(/\:is\(/g,":-moz-any("))}catch(e){throw e}}}}return s}function Ee(e,t=null){return Se.call(this,e,t,!0)}function ke(e){return function(e){return e instanceof Number||"number"==typeof e}(e)||!0!==e&&!1!==e&&null!==e&&""!==e&&!isNaN(1*e)}function Ce(e){return fe(e)||e&&"[object function]"==={}.toString.call(e)}function _e(e,t,i={},r={}){t=ge(t).slice();for(var s=e;!ue(s)&&!de(s)&&t.length;){var n=t.shift();if(!(i.get?i.get(s,n):me(s)?n in s:s[n]))return void(r.exists=!1);s=i.get?i.get(s,n):s[n]}return r.exists=!0,s}function Pe(e,t,i,r={},s={}){const n=(e,i,r)=>s.set?s.set(e,i,r):(ke(t[o])&&pe(e)?e.push(r):e[i]=r,!0);t=ge(t);for(var a=e,o=0;o<t.length;o++){if(!(o<t.length-1))return n(a,t[o],i);if(!a||!me(a)&&!Ce(a))return!1;var h=_e(a,t[o],s);if(!me(h)){if(!1===s.buildTree)return!1;if(h=Ce(s.buildTree)?s.buildTree(o):ke(t[o+1])?[]:{},!n(a,t[o],h))return!1}a=h}}function Ae(e,t,i=!1,r={}){t=ge(t);var s=!1;do{var n=""===(n=t.pop())?0:n,a=e;t.length&&(a=_e(e,t,{},r)),(me(a)||Ce(a))&&(r.has?r.has(a,n):n in a)&&(r.deleteProperty?s=r.deleteProperty(a,n):r.del?s=r.del(a,n):(delete a[n],s=!0))}while(s&&i&&t.length&&(me(a)||Ce(a))&&!(r.keys?r.keys(a):Object.keys(a)).length);return s}function Ie(e,t,i={}){var r={};return _e(e,t,i,r),r.exists}function Te(e,t=!1){const i=he.call(this);var r={};return!(r.el=i.window.document.head.querySelector('meta[name="oohtml"]'))&&t&&(r.el=i.window.document.createElement("meta"),r.el.setAttribute("name",e),i.window.document.head.append(r.el)),r.el&&(r.vars=(r.el.getAttribute("content")||"").split(";").filter((e=>e)).reduce(((e,t)=>{var i=t.split("=").map((e=>e.trim()));return Pe(e,i[0].split("."),"true"===i[1]||"false"!==i[1]&&(ke(i[1])?parseInt(i[1]):i[1])),e}),{})),r.get=function(e){return _e(this.vars,e.split("."))},r.set=function(e,i=null,r=!1){var s=oe(e)?e:{[e]:!0===i?"true":i};if(r=arguments.length<3?i:r,Object.keys(s).forEach((e=>{if(!1===s[e])Ae(this.vars,e.split("."));else if(oe(s[e]))Object.keys(s[e]).forEach((t=>{var i=(e+"."+t).split(".");r&&Ie(this.vars,i)||Pe(this.vars,i,s[e][t])}));else{var t=e.split(".");r&&Ie(this.vars,t)||Pe(this.vars,t,s[e])}})),t){const e=(t,i)=>Object.keys(i).reduce(((r,s)=>{var n=(t?t+".":"")+s;return oe(i[s])?r.push(...e(n,i[s])):r.push(n+"="+i[s]),r}),[]);this.el.setAttribute("content",e("",this.vars).join(";"))}return!0},r.defaults=function(e,t=null){return this.set(e,t,!0)},r}function Oe(){const e=he.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 ce(e.window),e.DOM.mutations=new be(e.window),e.DOM.meta=Te.bind(e.window),e.DOM.query=ve.bind(e.window),e.DOM.queryAll=we.bind(e.window),e.DOM.ready=ye.bind(e.window)),e}function Ne(e,t,i=!1){for(var r=e.indexOf(t);r>-1&&(i||!1===i);)e.splice(r,1),i>0&&i--,r=e.indexOf(t);return e}function Le(e,t,i){return function(e,t){return function(e,t,i=!1){if(""==t)return e;var r=i?e.lastIndexOf(t):e.indexOf(t);return-1===r?e:e.substr(0,r)}(e,t,!0)}(function(e,t,i=!1){if(""==t)return e;var r=i?e.lastIndexOf(t):e.indexOf(t);return-1===r?"":e.substr(r+t.length)}(e,t),i)}const Me=function(e,t=1,r=!0){return!a(t)||t<=0?e:(!i(e)&&o(e)&&r&&(e=Object.values(e)),i(e)?e.reduce(((e,s)=>i(s)||o(s)&&r?e.concat(Me(i(s)?s:Object.values(s),t-1,r)):e.concat(s)),[]):e)},Re=Me;function De(e){return o(e)&&Object.getPrototypeOf(e)===Object.prototype}function Ve(e){return!0===e||!1===e}const je=function(e,t,r=!0,a=1){if(i(e)&&i(t)&&e.length!==t.length)return!r;if(o(e)&&o(t)){var h=Object.keys(e),l=Object.keys(t);if(!h.length&&!l.length)return De(e)&&De(t)?r:e===t===r;if(!je(h,l))return!r}if(a>0&&(i(e)&&i(t)||o(e)&&o(t))){var p=function(e,t,r=!0,s=!0,n=!1,a=!1){if(i(e)&&i(t)){var h=[],l=!0;return e.forEach((e=>{if(l){var p=!1;w(t,((t,n)=>{(!p||s&&c(e))&&((i(p=r(e,n))&&!p.length||o(p)&&!Object.keys(p).length)&&(p=!1),c(p)&&s&&(e=p))})),c(p)?h.push(s?p:e):Ve(p)?n&&!p||!n&&p?h.push(e):a&&(l=!1):h.push(p)}})),h}if(o(e)&&o(t))return h={},l=!0,Object.keys(e).forEach((p=>{if(l){var u=r(e[p],t[p]);(i(u)&&!u.length||o(u)&&!Object.keys(u).length)&&(u=!1),c(u)?h[p]=s?u:e[p]:Ve(u)?n&&!u||!n&&u?h[p]=e[p]:a&&(l=!1):h[p]=u}})),h}(e,t,((e,t)=>je(e,t,r,a-1)),!1,!1,!0);return i(p)?p.length===e.length&&p.length===t.length:o(p)&&o(e)?Object.keys(p).length===Object.keys(e).length&&Object.keys(p).length===Object.keys(t).length:p}return s(r)?r(e,t):n(e)&&n(t)&&isNaN(e)&&isNaN(t)?r:e===t===r},Ue=je;function Be(e,t=[]){return j([{},e],((e,r,n)=>{if(!s(n[e]))return s(t)?t(e):!i(t)||!t.length||t.indexOf(e)>-1}),!1,!1,!1)}class Fe{static lex(e,t,i={}){if(!h(e+=""))throw new Error("Argument1 must be a string!");var r=e=>({delims:e.delims.slice(),options:Be(e.options),nesting:e.nesting.slice(),maxDepth:e.maxDepth,comments:e.comments.slice(),tokens:e.tokens.slice(),matches:e.matches.slice(),matchesi:Be(e.matchesi)});if(Fe.$cache[e]&&!1!==i.cache)for(var s=0;s<Fe.$cache[e].length;s++){var n=Fe.$cache[e][s];if(Ue(n.delims,t))return r(n)}var a=new Fe(e,i).lex(t);return!1!==i.cache&&(Fe.$cache[e]=Fe.$cache[e]||[],Fe.$cache[e].push(a)),r(a)}static split(e,t,i){return Fe.lex(e,t,i).tokens}static match(e,t,i){return Fe.lex(e,t,i).matches}constructor(e,t){if(!h(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=Fe.$blocks),this.$options.quotes||(this.$options.quotes=Fe.$quotes),this.$options.comments||(this.$options.comments=Fe.$comments)}lex(e,t){for(var i={delims:p(e),options:U(!0,{},this.$options,t||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},r=0;"number"==typeof r;)r=this._evalCharsAt(i,r);if(i.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Re(i.nesting).join(", "));return i}_evalCharsAt(e,t){if(!(t>=this.$str.length)){var i=1,r={},s={},n={};if(e.openComment||(s=this._testQuotes(e,t)),e.openQuote||(r=this._testComments(e,t)),e.openComment||r.ending)e.nesting.length||n.ending?this._push(e,this.$str[t]):(i=(o=r.starting||r.ending||this.$str[t]).length,this._push(e,o,"comments",r.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;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((r=>{this.$str.substr(t,1)===r&&(e.openQuote?r===e.openQuote&&(e.openQuote=!1,i.ending=r):(e.openQuote=r,i.starting=r))})),i}_testComments(e,t){var i={};return(e.options.comments||[]).forEach((r=>{if(e.openComment){if(I(r)===I(e.openComment)){var s=I(r);this.$str.substr(t).startsWith(s)&&(e.openComment=!1,i.ending=s)}}else{var n=A(r);this.$str.substr(t).startsWith(n)&&(e.openComment=r,i.starting=n)}})),i}_testNesting(e,t){var i={};return(e.options.blocks||[]).forEach((r=>{var s=A(r);if(this.$str.substr(t).startsWith(s))e.nesting=e.nesting.concat([r]),i.starting=s;else if(e.nesting.length&&I(r)===I(I(e.nesting))){var n=I(r);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 r=0;r<e.length;r++){var n=e[r];if(s(n)){var a=n(this.$str.substr(0,i),this.$str.substr(i),t.tokens.slice());if(!1!==a)return a}if(t.options.useRegex){var o=this.$str.substr(i).match(new RegExp("^"+n,!0!==t.options.useRegex?t.options.useRegex:""));if(o)return o[0]}if(!t.options.ci&&this.$str.substr(i,n.length)===n||t.options.ci&&this.$str.substr(i,n.length).toLowerCase()===n.toLowerCase())return n}return!1}_push(e,t,i="tokens",r=!1){var s=e.matches.length;if(l(e.tokens[s])&&(e.tokens[s]=""),"comments"===i){e.tokens[s].comments||(e.tokens[s]=new String(e.tokens[s]),e.tokens[s].comments=[]);var n=e.tokens[s].comments.length-(!e.tokens[s].comments.length||r?0:1);e.tokens[s].comments[n]=(e.tokens[s].comments[n]||"")+t}else e.tokens[s].comments,e.tokens[s]=e.tokens[s]+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,U({useRegex:!0},t||{}))}regSplit(e,t){return this.regParse(e,t).tokens}regMatch(e,t){return this.regParse(e,t).matches}}function We(e,t={}){const i=Oe.call(this);return i.OOHTML||(i.OOHTML={}),i.OOHTML.meta||(i.OOHTML.meta=i.DOM.meta("oohtml",!0)),i.OOHTML.meta.defaults(U(3,e,t)),i.OOHTML.meta}function $e(e,t,i,r=null){var s=t.split("#")[0].split("/").map((e=>e.trim())).filter((e=>e));return ze(e,s,i,r)}function He(e){var t=Fe.split(e.trim(),[":"]);return[e=t.shift(),t.reduce(((e,t)=>{var[i,r]=Fe.split(t.trim(),[]);return e[i]=Le(r,"(",")"),e}),{})]}Fe.$blocks=[["(",")"],["[","]"],["{","}"]],Fe.$quotes=['"',"'","`"],Fe.$comments=[["/*","*/"],["//","\n"]],Fe.$cache=Object.create(null);const qe=(e,t)=>Fe.split(e.trim(),["|","+"],{preserveDelims:!0}).reduce(((e,i)=>{var r;return(i.startsWith("|")||i.startsWith("+"))&&(r=i.substr(0,1),i=i.substr(1).trim()),e.theEnd||"|"===r&&e.length?(e.theEnd=!0,e):e.concat(t(i.trim()))}),[]).filter((e=>e)),Ge=(e,t,i)=>{const r=e=>e.reduce(((e,t)=>e.concat(...i(t).values())),[]);return qe(t,(t=>{var[t,s]=He(t);return e.reduce(((e,n)=>{var a=i(n);"*"===t&&(t="("+a.keys().join("+")+")");var o,h=("(",")",(o=t).startsWith("(")&&o.endsWith(")")?Ge([n],Le(t,"(",")"),i):p(a.get(t),!1)),c=[];return Object.keys(s).forEach((e=>{if("deep"===e||"deepest"===e)for(var a=[n];("deepest"===e||!h.length)&&(a=r(a)).length;){var o=Ge(a,`${t}${c.map((e=>`:${e}(${s[e]})`)).join("")}`,i);o.length&&(h=o)}else"having"!==e&&"not-having"!==e||(h=h.filter((t=>{var r=qe(s[e],(e=>i(t,e)));return"not-having"===e?!r.length:r.length}))),c.push(e)})),e.concat(h)}),[])}))},ze=function(e,t,i,r=null,s=0){if(!t.length)return[];var n,a=t.shift();a.endsWith(".")&&(n=!0,a=a.substr(0,a.length-1).trim());var o=Ge(e,a,i);if(o.length&&n)return o;if(t.length){var h=ze(o,t.slice(),i,r,s+1);return-1===h?r(o,s,!0):h}return r?r(o,s):o};function Ke(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Ke.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=We.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")+'"]':"")+"["+s.CSS.escape(o.get("attr.moduleid"))+"]";var c=s.HTMLTemplateElement;if(o.get("api.templateClass")){if(!s[o.get("api.templateClass")])throw new Error('The custom element class "'+o.get("api.templateClass")+'" is not defined!');c=s[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 s.CustomEvent(e,{detail:t}))},u=(e,t)=>{const i=i=>{e.dispatchEvent(new s.CustomEvent(i,{detail:{path:t}}))};var r=e.getAttribute("src");return new Promise(((n,a)=>{s.fetch?s.fetch(r).then((e=>e.ok?e.text():Promise.reject(e.statusText))).then((r=>{e.innerHTML=r,i("load"),l("templatecontentloaded",{template:e},t),n(e)})).catch((s=>{console.error("Error fetching the bundle at "+r+". ("+s+")"),e.innerHTML="",i("loaderror"),l("templatecontentloaderror",{template:e},t),n(e)})):(n(),console.error("Error fetching the bundle at "+r+". (window.fetch() not supported by browser.)"))}))},d=(e,i,r,n=null,c=!0)=>{const m=(e,s,n,a)=>{var c;if(e.matches)if(e.matches(h)&&(c=e.getAttribute(o.get("attr.moduleid")))&&g(c)){var l=(r?r+"/":"")+c;"removed"===n?(t(i,"oohtml","templates").delete(c),t(i,"oohtml").get("parentTemplate")===i&&t(i,"oohtml").delete("parentTemplate"),s&&(s.removedTemplates[c]=e)):"added"===n&&(t(i,"oohtml","templates").set(c,e),t(e,"oohtml").set("parentTemplate",i),s&&(s.addedTemplates[c]=e)),d(e.content,e,l,n,a)}else{const r=e=>{var r=e.getAttribute(o.get("attr.exportgroup"))||"default";"removed"===n?t(i,"oohtml","exports").has(r)&&(Ne(t(i,"oohtml","exports").get(r),e),t(i,"oohtml","exports").has(r).length||t(i,"oohtml","exports").delete(r),s&&(s.removedExports[r]||(s.removedExports[r]=[]),s.removedExports[r].push(e))):"added"===n&&(t(i,"oohtml","exports").has(r)||t(i,"oohtml","exports").set(r,[]),t(i,"oohtml","exports").get(r).push(e),s&&(s.addedExports[r]||(s.addedExports[r]=[]),s.addedExports[r].push(e)))};if(e.matches(o.get("element.export"))){var u=e.getAttribute(o.get("attr.exportid"))||"default";p(e.children).forEach((e=>{e.setAttribute(o.get("attr.exportgroup"),u),r(e)}))}else r(e)}};i.modulemutationsType=n;const y={addedTemplates:Object.create(null),removedTemplates:Object.create(null),addedExports:Object.create(null),removedExports:Object.create(null)};if(p(e.children).forEach((e=>m(e,y,n,c))),c&&l("templatemutation",y,r),"added"===n&&!t(i,"oohtml").get("onLiveMode")){t(i,"oohtml").set("onLiveMode",!0),i.getAttribute("src")&&!i.content.children.length&&f.push(u(i,r)),a.onAttrChange(i,(e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&u(i,r)}),["src"]);var b=new s.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,r)}));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(t(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(t(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(t(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(p(n.querySelectorAll(h)).forEach((async e=>{var i=e.getAttribute(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(i)&&(t(n,"oohtml","templates").set(i,e),d(e.content,e,i,"added",!1))})),a.onPresenceChange(h,(async(e,i)=>{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(o.get("attr.moduleid"));!e.closest(o.get("element.import"))&&g(s)&&(i?(t(n,"oohtml","templates").set(s,e),d(e.content,e,s,"added"),r.addedTemplates[s]=e):(t(n,"oohtml","templates").get(s)===e&&t(n,"oohtml","templates").delete(s),d(e.content,e,s,"removed"),r.removedTemplates[s]=e))})),l("templatemutation",r,"")})),a.onPresent(o.get("element.import"),(e=>{d(e,e,"","added",!1)})),o.get("api.moduleref")in s.Element.prototype)throw new Error('The "Element" class already has a "'+o.get("api.moduleref")+'" property!');Object.defineProperty(s.Element.prototype,o.get("api.moduleref"),{get:function(){var e;if(!t(this,"oohtml").has("module")&&(e=this.getAttribute(o.get("attr.moduleref")))){var i=(e=>{var i=n.createElement("template");return $e([n],e,(function(e,i){var r=t(e,"oohtml","templates");return 1===arguments.length?r:i.startsWith(":")?t(e,"oohtml","exports").get(i.substr(1)):r.get(i)})).forEach((e=>{t(e,"oohtml","templates").forEach(((e,r)=>{t(i,"oohtml","templates").set(r,e)})),t(e,"oohtml","exports").forEach(((e,r)=>{t(i,"oohtml","exports").has(r)||t(i,"oohtml","exports").set(r,[]),t(i,"oohtml","exports").get(r).push(...e)}))})),i})(e);t(this,"oohtml").set("module",i)}return t(this,"oohtml").get("module")}});var y=f.length?"loading":"indeterminate";Object.defineProperty(n,"templatesReadyState",{get:()=>y}),r.DOM.ready.call(r,(()=>(f.forEach((e=>{e.catch((e=>{console.warn(e)}))})),Promise.all(f).then((()=>{y="complete",n.dispatchEvent(new s.Event("templatesreadystatechange"))})))))}function Qe(e,t,r=null){return i(t)?e.filter((e=>r?t.filter((t=>r(e,t))).length:-1===t.indexOf(e))):[]}function Je(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Je.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=[],h=We.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},e);Xe.push(h.get("attr.importid"),h.get("attr.moduleref"));const c="["+s.CSS.escape(h.get("attr.moduleref"))+"]",l="["+s.CSS.escape(h.get("attr.exportgroup"))+"]",u=class{static create(e){return t(this.el,"oohtml").get("instance")||new u(e)}constructor(e){this.el=e,t(this.el,"oohtml").set("instance",this);const[i,r]=He(e.getAttribute(h.get("attr.importid"))||"default");t(this.el,"oohtml").set("importID",i),t(this.el,"oohtml").set("importModifiers",r)}hydrate(e,i,r){t(this.el,"oohtml").set("anchorNode",e),t(this.el,"oohtml").set("slottedElements",i),t(this.el,"oohtml").set("compositionBlock",r),this._bindSlotted(i),this._connectToCompositionBlock()}connectedCallback(){t(this.el,"oohtml").has("anchorNode")||(t(this.el,"oohtml").set("anchorNode",h.get("isomorphic")?n.createComment(this.el.outerHTML):n.createTextNode("")),t(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()),r.DOM.ready.call(r,(()=>{this.resolve()}))}_connectToCompositionBlock(){this.compositionBlock&&t(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(e){e.forEach((e=>{e.importReference=this.el})),t(this.el,"oohtml").set("slottedObserver",a.onRemoved(e,((i,r,s,n,a)=>{a&&a.size===e.length&&t(this.el,"oohtml").get("slottedObserver").disconnect(),i.forEach((e=>{e.parentNode||Ne(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(!T(o,(e=>this.el.closest(e)))){var e,i;if(this.el.hasAttribute(h.get("attr.moduleref")))this.compositionBlock&&t(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&t(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(h.get("attr.moduleref")).trim(),s=this.el.getAttribute(h.get("attr.exportsearch"));e&&(i=((e,i,r)=>{var s=this.importID,n=this.importModifiers,[a,o]="search"in n||null!==r?("search"in n?n.search:r).split("-").filter((e=>e)).map((e=>parseInt(e||0))).concat([0,1e3]):[0,0];return $e(e,i,(function(e,i){var r=t(e,"oohtml","templates");return 1===arguments.length?r:i.startsWith(":")?t(e,"oohtml","exports").get(i.substr(1)):r.get(i)}),(function(e,i,r){var n=e.reduce(((e,i)=>e.concat(t(i,"oohtml","exports").get(s)||[])),[]);return!n.length&&i>a&&o?(o--,-1):n}))})([r.startsWith("~")?this.compositionBlock:n],r,s)).length?Qe(i,t(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(t(this.el,"oohtml").set("originalSlottedElements",i),this.fill(i)):(t(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(e){e=p(e,!1).map((e=>e.cloneNode(!0))),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),e.forEach((e=>{t(e,"oohtml","templates").set("~",this.el),function(e,t,i=[],r=!0){if(i=i.concat(Xe),e.hasAttribute("noinherit")&&(i=i.concat((e.getAttribute("noinherit")||"*").split(" ").map((e=>e.trim())))),ne(Ze.concat(["role","class"])).forEach((s=>{var n,a;if(!i.includes(s)&&!i.includes("*")&&(n=t.getAttribute(s))){if(a=e.getAttribute(s))var o=r?[a,n]:[n,a];else o=[n];e.setAttribute(s,ne(o.join(" ").split(" ").map((e=>e.trim()))).join(" ")),i.push(s)}})),ne(Ye.concat("style")).forEach((s=>{var n,a;if(!i.includes(s)&&!i.includes("*")&&(n=t.getAttribute(s))){if(a=e.getAttribute(s))(o=r?[a,n]:[n,a])[0].trim().endsWith(";")||(o[0]=o[0]+";");else var o=[n];e.setAttribute(s,o.join(" ")),i.push(s)}})),!i.includes("*"))for(var s=0;s<t.attributes.length;s++){var n=t.attributes[s];i.includes(n.name)||e.hasAttribute(n.name)&&!r||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 i=this.slottedElements;e&&t(this.el,"oohtml").has("slottedObserver")&&(t(this.el,"oohtml").get("slottedObserver").disconnect(),i=this.slottedElements.splice(0)),i.forEach((e=>e.remove()))}}get importID(){return t(this.el,"oohtml").get("importID")}get importModifiers(){return t(this.el,"oohtml").get("importModifiers")}get anchorNode(){return t(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return t(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return t(this.el,"oohtml").has("slottedElements")||t(this.el,"oohtml").set("slottedElements",[]),t(this.el,"oohtml").get("slottedElements")}get exports(){return t(this.el,"oohtml").get("exports")}static get observedAttributes(){return[h.get("attr.importid")]}};a.onPresent(h.get("element.import"),(e=>{u.create(e).connectedCallback()}));const d=(e,i)=>{const r=(e,t)=>!i||t===i||!0===i&&(this.importModifiers&&"search"in this.importModifiers||e.getAttribute(h.get("attr.exportsearch")));if(e.matches(h.get("element.import"))){var s=u.create(e);s.connectedCallback(),r(e,s.importID)&&s.resolve()}else t(e,"oohtml","imports").forEach(((e,t)=>{r(e,t)&&u.create(e).resolve()}))};a.onPresent(c,(e=>{T(o,(t=>e.closest(t)))||a.onAttrChange(e,(t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&d(e)}),[h.get("attr.moduleref"),h.get("attr.importid")])})),n.addEventListener("templatemutation",(e=>{e.detail.path&&p(n.querySelectorAll("["+s.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,r)=>!!e&&Fe.split(i.trim(),["|","+"]).reduce(((e,i)=>{var[i,s]=He(i),n=(i=i.trim())===t[r];if(!n&&("deep"in s||"deepest"in s)){var a=t.slice(r+1).reduce(((e,t,r)=>e>-1&&"deep"in s?e:t===i?r:e),-1);a>-1&&(t.splice(r,a+1),n=!0)}return e||n}),!1)),!0)})(t.getAttribute(h.get("attr.moduleref")),e.detail.path)&&(d(t,!0),e.detail.addedExports.concat(e.detail.removedExports).forEach((e=>{d(t,e.name)})))}))})),r.DOM.ready.call(r,(()=>{h.get("isomorphic")&&p(n.querySelectorAll(l)).forEach((e=>{if(!t(e.parentNode,"oohtml").get("importsCan")&&!e.importReference){var i=[];e.parentNode.childNodes.forEach((e=>{var t;if(1===e.nodeType&&e.matches(l))i.push(e);else if(8===e.nodeType&&(t=e.nodeValue.trim())&&t.startsWith("<"+h.get("element.import"))&&t.endsWith("</"+h.get("element.import")+">")){var r,s=n.createElement("div");if(s.innerHTML=t,(r=s.firstChild).matches(h.get("element.import"))){var a=r.hasAttribute(h.get("attr.moduleref"))?r.getAttribute(h.get("attr.moduleref")).trim().startsWith("~")?e.parentNode.closest(l):null:e.parentNode.closest(c);u.create(r).hydrate(e,i,a),i=[]}}})),t(e.parentNode,"oohtml").set("importsCan",!0)}}))}))}const Xe=["nocompose"],Ye=[],Ze=[];function et(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{et.call(this,e,!1)}));const s=r.window,n=r.window.document,a=r.DOM.mutations,o=[],c=We.call(this,{attr:{namespace:"namespace",id:"id"},api:{namespace:"namespace"},eagermode:!0},e),l=function(e){if(!t(e,"oohtml").has("namespace")){const i=Object.create(null);t(e,"oohtml").set("namespace",i),ae.link&&ae.link(e,c.get("api.namespace"),i)}return t(e,"oohtml").get("namespace")},u=function(e){if(!t(e,"oohtml").has("publicNamespace")){const i=l(e);t(e,"oohtml").set("publicNamespace",c.get("eagermode")?new Proxy(i,{get(t,r){if(h(r)&&!i[r]){var a=p(e.querySelectorAll("["+s.CSS.escape(c.get("attr.id"))+'="'+r+'"]')).filter((t=>{var i=t.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");return e===n?!i:i===e}))[0];a&&ae.set(i,r,a)}return i[r]}}):i)}return t(e,"oohtml").get("publicNamespace")};if(c.get("api.namespace")in s.Element.prototype)throw new Error('The "Element" class already has a "'+c.get("api.namespace")+'" property!');if(Object.defineProperty(s.Element.prototype,c.get("api.namespace"),{get:function(){return u(this)}}),c.get("api.namespace")in n)throw new Error('The "document" object already has a "'+c.get("api.namespace")+'" property!');Object.defineProperty(n,c.get("api.namespace"),{get:function(){return u(n)}}),a.onPresent("["+s.CSS.escape(c.get("attr.id"))+"]",(e=>{var i=t(e,"oohtml");if(!i.get("idAlreadyBeingWatched")&&!T(o,(t=>e.closest(t)))){var r=e.getAttribute(c.get("attr.id")),h=e.parentNode.closest("["+s.CSS.escape(c.get("attr.namespace"))+"]");h||(h=n);var p=l(h);p[r]!==e&&ae.set(p,r,e),i.set("idAlreadyBeingWatched",!0),a.onPresenceChange(e,((t,i)=>{i?p[r]!==e&&ae.set(p,r,e):p[r]===e&&ae.deleteProperty(p,r)}))}}))}function tt(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{tt.call(this,e,!1)}));const s=r.window,n=r.window.document,a=We.call(this,{api:{state:"state",setState:"setState",clearState:"clearState"}},e),o=function(e,i=null){if(!t(e,"oohtml").has("state")||i){const r=i||Object.create(null),s=t(e,"oohtml").get("state");if(t(e,"oohtml").set("state",r),s&&ae.unlink&&ae.unlink(e,a.get("api.state"),s),ae.link){let t=i?{isUpdate:!!s,oldValue:s}:null;ae.link(e,a.get("api.state"),r,t)}}return t(e,"oohtml").get("state")};if(a.get("api.state")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.state")+'" property!');if(Object.defineProperty(s.Element.prototype,a.get("api.state"),{get:function(){return ae.proxy(o(this))}}),a.get("api.setState")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.setState")+'" property!');if(Object.defineProperty(s.Element.prototype,a.get("api.setState"),{value:function(e,t={}){if(t.update){var i=o(this);if("merge"!==t.update){var r=Qe(Object.keys(i),Object.keys(e));ae.deleteProperty(i,r)}ae.set(i,e)}else o(this,e)}}),a.get("api.clearState")in s.Element.prototype)throw new Error('The "Element" class already has a "'+a.get("api.clearState")+'" property!');if(Object.defineProperty(s.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 ae.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 r=Qe(Object.keys(i),Object.keys(e));ae.deleteProperty(i,r)}ae.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{stringify:it}=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 rt={"||":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},st=17,nt={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:st,ClassExpression:st,FunctionExpression:st,ObjectExpression:st,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function at(e,t){const{generator:i}=e;if(e.write("("),null!=t&&t.length>0){i[t[0].type](t[0],e);const{length:r}=t;for(let s=1;s<r;s++){const r=t[s];e.write(", "),i[r.type](r,e)}}e.write(")")}function ot(e,t,i,r){const s=e.expressionsPrecedence[t.type];if(s===st)return!0;const n=e.expressionsPrecedence[i.type];return s!==n?!r&&15===s&&14===n&&"**"===i.operator||s<n:(13===s||14===s)&&("**"===t.operator&&"**"===i.operator?!r:r?rt[t.operator]<=rt[i.operator]:rt[t.operator]<rt[i.operator])}function ht(e,t,i,r){const{generator:s}=e;ot(e,t,i,r)?(e.write("("),s[t.type](t,e),e.write(")")):s[t.type](t,e)}function ct(e,t,i,r){const s=t.split("\n"),n=s.length-1;if(e.write(s[0].trim()),n>0){e.write(r);for(let t=1;t<n;t++)e.write(i+s[t].trim()+r);e.write(i+s[n].trim())}}function lt(e,t,i,r){const{length:s}=t;for(let n=0;n<s;n++){const s=t[n];e.write(i),"L"===s.type[0]?e.write("// "+s.value.trim()+"\n",s):(e.write("/*"),ct(e,s.value,i,r),e.write("*/"+r))}}function pt(e,t){const{generator:i}=e,{declarations:r}=t;e.write(t.kind+" ");const{length:s}=r;if(s>0){i.VariableDeclarator(r[0],e);for(let t=1;t<s;t++)e.write(", "),i.VariableDeclarator(r[t],e)}}let ut,dt,ft,mt,gt,yt;const bt={Program(e,t){const i=t.indent.repeat(t.indentLevel),{lineEnd:r,writeComments:s}=t;s&&null!=e.comments&&lt(t,e.comments,i,r);const n=e.body,{length:a}=n;for(let e=0;e<a;e++){const a=n[e];s&&null!=a.comments&&lt(t,a.comments,i,r),t.write(i),this[a.type](a,t),t.write(r)}s&&null!=e.trailingComments&&lt(t,e.trailingComments,i,r)},BlockStatement:yt=function(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,n=i+t.indent;t.write("{");const a=e.body;if(null!=a&&a.length>0){t.write(r),s&&null!=e.comments&&lt(t,e.comments,n,r);const{length:o}=a;for(let e=0;e<o;e++){const i=a[e];s&&null!=i.comments&&lt(t,i.comments,n,r),t.write(n),this[i.type](i,t),t.write(r)}t.write(i)}else s&&null!=e.comments&&(t.write(r),lt(t,e.comments,n,r),t.write(i));s&&null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write("}"),t.indentLevel--},ClassBody:yt,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===st||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:r,writeComments:s}=t;t.indentLevel++;const n=i+t.indent,a=n+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+r);const{cases:o}=e,{length:h}=o;for(let e=0;e<h;e++){const i=o[e];s&&null!=i.comments&&lt(t,i.comments,n,r),i.test?(t.write(n+"case "),this[i.test.type](i.test,t),t.write(":"+r)):t.write(n+"default:"+r);const{consequent:h}=i,{length:c}=h;for(let e=0;e<c;e++){const i=h[e];s&&null!=i.comments&&lt(t,i.comments,a,r),t.write(a),this[i.type](i,t),t.write(r)}}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]?pt(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:ut=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:i}=e;"V"===i.type[0]?pt(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:ut,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:dt=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),at(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:dt,VariableDeclaration(e,t){pt(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:r}=i,s=t.expressionsPrecedence[r];"C"===r[0]&&"l"===r[1]&&"E"===r[5]||!(s===st||s<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:r}=i;let s=0;if(r>0){for(;s<r;){s>0&&t.write(", ");const e=i[s],r=e.type[6];if("D"===r)t.write(e.local.name,e),s++;else{if("N"!==r)break;t.write("* as "+e.local.name,e),s++}}if(s<r){for(t.write("{");;){const e=i[s],{name:n}=e.imported;if(t.write(n,e),n!==e.local.name&&t.write(" as "+e.local.name),!(++s<r))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:r}=i;if(r>0)for(let e=0;;){const s=i[e],{name:n}=s.local;if(t.write(n,s),n!==s.exported.name&&t.write(" as "+s.exported.name),!(++e<r))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),at(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]):at(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:ft=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:ft,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),ht(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:i,expressions:r}=e;t.write("`");const{length:s}=r;for(let e=0;e<s;e++){const s=r[e],n=i[e];t.write(n.value.raw,n),t.write("${"),this[s.type](s,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){ht(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:gt=function(e,t){if(t.write("["),e.elements.length>0){const{elements:i}=e,{length:r}=i;for(let e=0;;){const s=i[e];if(null!=s&&this[s.type](s,t),!(++e<r)){null==s&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:gt,ObjectExpression(e,t){const i=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:s}=t,n=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(r),s&&null!=e.comments&&lt(t,e.comments,n,r);const a=","+r,{properties:o}=e,{length:h}=o;for(let e=0;;){const i=o[e];if(s&&null!=i.comments&&lt(t,i.comments,n,r),t.write(n),this[i.type](i,t),!(++e<h))break;t.write(a)}t.write(r),s&&null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write(i+"}")}else s?null!=e.comments?(t.write(r),lt(t,e.comments,n,r),null!=e.trailingComments&&lt(t,e.trailingComments,n,r),t.write(i+"}")):null!=e.trailingComments?(t.write(r),lt(t,e.trailingComments,n,r),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:r}=i;for(let e=0;this[i[e].type](i[e],t),++e<r;)t.write(", ")}t.write("}")},SequenceExpression(e,t){at(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:i,argument:r,argument:{type:s}}=e;t.write(i);const n=ot(t,r,e);n||!(i.length>1)&&("U"!==s[0]||"n"!==s[1]&&"p"!==s[1]||!r.prefix||r.operator[0]!==i||"+"!==i&&"-"!==i)||t.write(" "),n?(t.write(i.length>1?" (":"("),this[s](r,t),t.write(")")):this[s](r,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:mt=function(e,t){const i="in"===e.operator;i&&t.write("("),ht(t,e.left,e,!1),t.write(" "+e.operator+" "),ht(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:mt,ConditionalExpression(e,t){const{test:i}=e,r=t.expressionsPrecedence[i.type];r===st||r<=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===st||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),at(t,e.arguments)},CallExpression(e,t){const i=t.expressionsPrecedence[e.callee.type];i===st||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("?."),at(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const i=t.expressionsPrecedence[e.object.type];i===st||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(it(e.value),e)},RegExpLiteral(e,t){const{regex:i}=e;t.write(`/${i.pattern}/${i.flags}`,e)}},xt={};class vt{constructor(e){const t=null==e?xt:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:bt,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:nt,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:r}=this;for(let s=0;s<t;s++)"\n"===e[s]?(i=0,r++):i++;return this.column=i,void(this.line=r)}}const{length:i}=e,{lineEnd:r}=this;i>0&&(this.lineEndSize>0&&(1===r.length?e[i-1]===r:e.endsWith(r))?(this.line+=this.lineEndSize,this.column=0):this.column+=i)}toString(){return this.output}}class wt{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 r=t();return Object.keys(e).forEach((e=>{this[e]=i[e]})),r}inUse(e){return arguments.length?(e?this.dependencies++:this.dependencies--,this):this.dependencies>0}}class St extends wt{constructor(e,t,i={}){super(t,i),this.ownerUnit=e,this.refs=new Set,this.propertyStack=[],this.embeddingReference=null}withProperty(e,t){this.propertyStack.unshift(e);let i=this.embeddingReference?this.embeddingReference.withProperty(e,t):t();return this.propertyStack.shift(),i}get lineage(){return`${this.ownerUnit.lineage}:${this.id}`}toJson(e=!1){return{id:this.id,type:this.type,kind:this.kind,refs:Array.from(this.refs).map((t=>t.toJson(e))),unitId:this.ownerUnit.id}}}const Et={tryStmt:(e,t,i,r)=>({type:"TryStatement",block:e,handler:t,finalizer:i,guardedHandlers:r}),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}),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,r)=>({type:"ForStatement",init:e,test:t,update:i,body:r}),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,r=!1,s=!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,r="ConditionalExpression")=>({type:r,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,r=!1)=>({type:"MemberExpression",object:e,property:t,computed:i,optional:r}),funcExpr(e,t,i,r=!1,s=!1,n=!1){return this.func("FunctionExpression",...arguments)},arrowFuncExpr(e,t,i,r=!1,s=!1,n=!1){return this.func("ArrowFunctionExpression",...arguments)},func:(e,t,i,r,s=!1,n=!1,a=!1)=>({type:e,id:t,params:i,body:r,async:s,expression:n,generator:a}),identifier:e=>({type:"Identifier",name:e}),property:(e,t,i="init",r=!1,s=!1,n=!1)=>({type:"Property",key:e,value:t,kind:i,shorthand:r,computed:s,method:n}),methodDefinition:(e,t,i="method",r=!1,s=!1)=>({type:"MethodDefinition",key:e,value:t,kind:i,static:r,computed:s}),spreadElement: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 kt extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e}generate(){if(!this.expr)return[this.expr,this];let e=Et.identifier(this.ownerContext.getSubscriptIdentifier("$unit",!0)),t=Et.memberExpr(Et.memberExpr(e,Et.identifier("memo")),Et.literal(this.id),!0);return this.composed=Et.assignmentExpr(t,this.expr),[this.composed,this]}toJson(e=!1){return{id:this.id}}}class Ct extends wt{constructor(e,t,i){super(t,i),this.ownerReference=e,this.condition=this.ownerUnit.currentCondition,this.path=[],this.isDotSafe=!0}get ownerUnit(){return this.ownerReference.ownerUnit}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 kt||(e.name+"").includes(".")))&&(this.isDotSafe=!1)}match(e){let t=this.path,i=Array.isArray(e)?e:e.path,r=t.length-i.length;return r>0&&([t,i]=[i,t]),[t.reduce(((e,t,r)=>{return e&&(s=t,n=i[r],!(!s||!n)&&(s instanceof kt&&n instanceof kt?s.id===n.id:s.name===n.name));var s,n}),!0),r]}toJson(e=!1){return{id:this.id,path:this.path.map((e=>e instanceof kt?{memoId:e.id}:e)),$path:this.isDotSafe?this.path.map((e=>e.name)).join("."):void 0,condition:(this.condition||{}).lineage,referenceId:this.ownerReference.id}}}class _t extends Ct{constructor(e,t,i){super(e,t,i),this.subscriptions=new Map,this.$subscriptions=new Map,this.updates=new Map}subscribe(e,t,i=!1){let r=i?this.$subscriptions:this.subscriptions,s=r.get(e);s||(s=new Set,r.set(e,s)),s.add(t),this.updates.forEach((r=>r.forEach((r=>{r.subscribe(e,t,i)}))))}update(e,t,i){let r=this.updates.get(e);r||(r=new Set,this.updates.set(e,r)),r.add(t),i&&this.subscriptions.forEach(((e,i)=>e.forEach((e=>{t.subscribe(i,e,!0)}))))}toJson(e=!1){let{id:t,condition:i,referenceId:r,...s}=super.toJson(e),n={},a={};return this.subscriptions.forEach(((e,t)=>{n[t.lineage]=Array.from(e).map((e=>e.id))})),this.$subscriptions.forEach(((e,t)=>{a[t.lineage]=Array.from(e).map((e=>e.id))})),{id:t,...s,depth:this.depth.map((e=>e instanceof kt?{memoId:e.id}:e)),subscriptions:n,$subscriptions:a,condition:i,referenceId:r}}}class Pt extends St{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 _t(this,this.refs.size,{...e,condition:this.condition,depth:this.destructuringStack.slice(0)});return t.push(...this.propertyStack),this.refs.add(t),t}doSubscribe(e,t){let i=new Set(t);return this.refs.forEach(((t,r)=>{i.forEach((r=>{let[s,n]=t.match(r);if(s&&n<=0){if("const"===this.kind)return;t.subscribe(e,r),this.inUse(!0),t.condition&&t.condition.inUse(!0),i.delete(r)}}))})),[...i]}doUpdate(e,t,i){let r=new Set(t);return e===this||this.refs.forEach(((t,s)=>{r.forEach((s=>{let[n,a]=t.match(s);if(n&&a>=0){if("const"===this.kind)throw new Error("Assignment to a constant declaration.");t.update(e,s,i),r.delete(s)}}))})),[...r]}inUse(e){let t=super.inUse(...arguments);return this.ownerUnit.inUse(...arguments),t}}class At extends Ct{}class It extends St{addRef(e){let t=new At(this,this.refs.size,{...e,condition:this.condition});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 Tt extends wt{constructor(e,t,i={}){super(t,i),this.ownerContext=e,this.ownerScope=e&&(e.currentScope||e.ownerScope),this.effectReferences=[]}pushEffectReference(e){this.effectReferences.push(e)}doSubscribe(e,t=null){return!(t=this.effectReferences.reduce(((t,i)=>i.doSubscribe(e,t)),t||[...e.refs])).length||(!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)?!(t=this.ownerContext.references.reduce(((t,i)=>i instanceof Pt?i.doSubscribe(e,t):t),t)).length||this.ownerContext.effectReference({},(i=>(t.forEach((e=>{this.canObserveGlobal(e)&&i.addRef().push(...e.path)})),e.inUse(!0),i.doSubscribe(e,t),!0)),!1):this.ownerScope?this.ownerScope.doSubscribe(e,t):void 0)}doUpdate(e,t=null){if(t=this.effectReferences.reduce(((t,i)=>i.doUpdate(e,t)),t||[...e.refs]),!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)){if("VariableDeclaration"===e.type)return;e.ownerUnit.$sideEffects=!0;let i=t.length&&t||[...e.refs];return this.ownerContext.sideEffects.push({reference:e,remainderRefs:i}),!0}return!t.length||(this.ownerScope?this.ownerScope.doUpdate(e,t):void 0)}doSideEffectUpdates(e,t){return this.effectReferences.forEach((i=>{let r=i.doUpdate(e,t,!0);"VariableDeclaration"===i.type&&(t=r)})),!t.length||(!this.ownerScope||["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)?(this.ownerContext.sideEffects.push({reference:e,remainderRefs:t,isSideEffects:!0}),!0):this.ownerScope?this.ownerScope.doSideEffectUpdates(e,t):void 0)}canObserveGlobal(e){return(!this.ownerContext.$params.globalsOnlyPaths||e.path.length>1)&&!(this.ownerContext.$params.globalsNoObserve||[]).includes(e.path[0].name)}}class Ot extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e,this.ownerUnit=e.currentUnit||e,this.parent=e.currentCondition}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}get lineage(){return`${this.ownerUnit.lineage}:${this.id}`}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.ownerUnit.id===this.ownerUnit.id?t.parent=this.parent.id:t.parent=`${this.parent.ownerUnit.lineage}:${this.parent.id}`),t}}class Nt extends wt{constructor(e,t,i){super(t,i),this.ownerContext=e,this.ownerUnit=e&&(e.currentUnit||e),this.ownerScope=e&&(e.currentScope||e.ownerScope),this.subscriptIdentifiers={},this.references=[],this.referenceStack=[],this.entries=[],this.entryStack=[],this.memos=[],this._hoistedAwaitKeyword=void 0,this._hoistedExitStatements=new Map,this._nextIds={},this.sideEffects=[],this.$sideEffects=!1}get $params(){return this.params||this.ownerUnit&&this.ownerUnit.$params}nextId(e){return this.ownerContext?this.ownerContext.nextId(e):(e="",void 0===this._nextIds[e]&&(this._nextIds[e]=0),this._nextIds[e]++)}closest(e=null,t=!1,i=-1){if(!arguments.length)return this.ownerUnit;let r=i+1;return("function"==typeof e?e(this,r):[].concat(e).some((e=>e===this.type)))?t?{instance:this,level:r}:this:this.ownerUnit?this.ownerUnit.closest(e,t,r):void 0}closestContext(e=!1){return this.closest((e=>e instanceof Lt),e)}closestFunction(e=!1){return this.closest(["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"],e)}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.ownerUnit&&this.ownerUnit.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],r=i.whitelist.indexOf(e.name);-1!==r&&(i.blacklist.push(i.whitelist.splice(r,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.ownerUnit&&this.ownerUnit.subscriptIdentifiersNoConflict(e)}get currentReference(){return this.referenceStack[0]}pushReference(e,t){this.references.unshift(e);let i=this.currentReference;this.referenceStack.unshift(e);let r=t(e,i);if(this.referenceStack.shift()!==e)throw new Error("Reference stack corrupted.");return r}signalReference(e,t,i=!0){let r=new It(this,this.nextId("causes"),e),s=this.pushReference(r,t),n=this.closestContext(),a=n.currentScope||n.ownerScope;return(!r.refs.size||i&&!a.doSubscribe(r))&&(this.references=this.references.filter((e=>e!==r))),s}effectReference(e,t,i=!0){let r=new Pt(this,this.nextId("affecteds"),e),s=this.pushReference(r,t),n=this.closestContext(),a=n.currentScope||n.ownerScope;return a.pushEffectReference(r),r.refs.size?"VariableDeclaration"===r.type&&"var"!==r.kind||!i||a.doUpdate(r):this.references=this.references.filter((e=>e!==r)),s}chainableReference(e,t){return this.currentReference&&this.currentReference.propertyStack.length?t():this.signalReference(e,t)}embeddableSignalReference(e,t){return this.currentReference&&this.signalReference(e,((e,i)=>(e.embeddingReference=i,t(e,i))))}embeddableEffectReference(e,t){return this.effectReference(e,((e,i)=>(e.embeddingReference=i,t(e,i))))}get currentScope(){return this.entryStack.reduce(((e,t)=>e||t instanceof Tt&&t),null)}get currentCondition(){return this.entryStack.reduce(((e,t)=>e||t instanceof Ot&&t),null)||this.closestFunction()!==this&&this.ownerContext&&this.ownerContext.currentCondition}get currentContext(){return this.entryStack.reduce(((e,t)=>e||t instanceof Lt&&t),null)}get currentUnit(){return this.entryStack.reduce(((e,t)=>e||t instanceof Nt&&t),null)}get currentEntry(){return this.entryStack[0]}pushEntry(e,t){this.entries.unshift(e),this.entryStack.unshift(e);let i=t(e);return this.entryStack.shift(),e instanceof Nt&&!e.generatable()&&(this.entries=this.entries.filter((t=>t!==e))),i}createScope(e,t){let i=new Tt(this,this.nextId("scope"),e);return this.pushEntry(i,t)}createCondition(e,t){let i=new Ot(this,this.nextId("condition"),e);return this.pushEntry(i,t)}defineContext(e,t){let i=new Lt(this,this.nextId("context"),e);return this.pushEntry(i,t)}defineUnit(e,t){let i=new Nt(this,this.nextId("unit"),e);return this.pushEntry(i,t)}defineMemo(e){let t=new kt(this,this.nextId("memo"),e);return this.memos.unshift(t),t}getLabelInfo(){let e,t,i=this.type;return(this.ownerScope||{}).label?({label:{name:e},type:t}=this.ownerScope):"Iteration"===i&&this.ownerUnit.ownerScope.label&&({label:{name:e},type:t}=this.ownerUnit.ownerScope),{type:i,label:e,target:t}}get hoistedAwaitKeyword(){return this._hoistedAwaitKeyword}get hoistedExitStatements(){return this._hoistedExitStatements}hoistAwaitKeyword(){["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression"].includes(this.type)||(this._hoistedAwaitKeyword=!0,this.ownerUnit&&this.ownerUnit.hoistAwaitKeyword())}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.ownerUnit)return this.ownerUnit.hoistExitStatement(e,t)}generatable(){return this.references.length||this instanceof Lt}generate(e,t={}){if(!e||!this.generatable())return e;this.generated=!0;let i,r,s=Et.identifier(this.ownerUnit.getSubscriptIdentifier("$unit",!0));t.isFunctionUnit?i=e:this.inSequence?i=Et.arrowFuncExpr(null,[s],e,this.hoistedAwaitKeyword,!0):(r=Array.isArray(e)?Et.blockStmt(e):Et.blockStmt([e]),i=Et.arrowFuncExpr(null,[s],r,this.hoistedAwaitKeyword));let n=[Et.literal(this.id),...t.args||[],i],a=Et.callExpr(s,n);if(this.hoistedAwaitKeyword&&(a=Et.awaitExpr(a)),this.inSequence||t.generateForArgument)return a;let o=this;a=Et.exprStmt(a),a.comments=[{type:"Line",value:{toString:()=>o.lineage,trim(){return this.toString()}}}];let h=[a];if(this.hookExpr=h,!(this.ownerScope||{}).singleStatementScope){let e,t,i=[],r=(e,i)=>{let r=Et.ifStmt(e,i);t?t.alternate=r:(t=r,h.push(r))};if(this.hoistedExitStatements.forEach(((t,n)=>{if(["break","continue"].includes(n.value)&&!i.includes(n.value)&&t.arg){let e=t.arg,a=Et.callExpr(Et.memberExpr(s,Et.identifier("exiting")),[n,e]),o=Et.exprStmt(Et.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=Et.callExpr(Et.memberExpr(s,Et.identifier("exiting"))),t=Et.exprStmt(Et.identifier("return"));r(e,t)}}return h}get lineage(){let e=this.ownerUnit&&this.ownerUnit.lineage;return this.ownerUnit&&!this.generated?e:`${e?e+"/":""}${this.id}`}toJson(e=!1){let t={id:this.id,lineage:this.lineage,type:this.type,signals:{},effects:{},sideEffects:!!this.sideEffects.length||void 0,$sideEffects:!0===this.$sideEffects||void 0,subUnits:{},conditions:{},hoistedAwaitKeyword:this.hoistedAwaitKeyword,loc:this.loc};this.references.forEach((i=>{let r;i instanceof It?r=t.signals:i instanceof Pt&&(r=t.effects),r[i.id]=i.toJson(e)}));let i=this.lineage.split("/").length,r=e=>e.reduce(((e,t)=>e.subUnits[t]),t);return this.entries.slice(0).reverse().forEach((t=>{t instanceof Nt&&t.generated?r(t.lineage.split("/").slice(i,-1)).subUnits[t.id]=t.toJson(e):t instanceof Ot&&(r(t.ownerUnit.lineage.split("/").slice(i)).conditions[t.id]=t.toJson(e))})),t}}class Lt extends Nt{}class Mt{constructor(e={}){this.params=e,this.locations=[],this._locStart=this.params.locStart||0,this.deferredTasks=[]}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}serialize(e,t={}){return function(e,t){const i=new vt(t);return i.generator[e.type](e,i),i.output}(e,{comments:!0,...t})}generate(e){let t={type:"Global"},i=new Lt(null,"#",{...t,params:this.params});i.defineSubscriptIdentifier("$unit",["$x"]);let[r]=i.createScope(t,(()=>this.generateNodes(i,[e])));return this.deferredTasks.forEach((e=>e())),{source:this.serialize(r),graph:i.toJson(!1),identifier:i.getSubscriptIdentifier("$unit"),locations:this.locations,ast:r}}generateNodes(e,t,i=!1){const r=t.length;r>1&&(t=t.reduce(((e,t)=>"FunctionDeclaration"===t.type?[t].concat(e):e.concat(t)),[]));const s=n=>{if(n===r)return[];let a,o=!1,h=()=>(o=!0,s(n+1));if(t[n]){let r=()=>this.generateNode(e,t[n],i);!this[`generate${t[n].type}`]||i&&!["Identifier","FunctionDeclaration","FunctionExpression"].includes(t[n].type)||(r=()=>this[`generate${t[n].type}`].call(this,e,t[n],h)),a=r()}else a=[t[n]];return o||(a=[].concat(a).concat(h())),a};return s(0)}generateNode(e,t,i=!1){return Object.keys(t).reduce(((r,s)=>{let n=t[s];return Array.isArray(n)?n=this.generateNodes(e,n,i):"object"==typeof n&&n&&([n]=this.generateNodes(e,[n],i)),{...r,[s]:n}}),{})}generateProgram(e,t){let i={type:t.type},r=e.createScope(i,(()=>this.generateNodes(e,t.body)));return{...t,body:r}}generateMethodDefinition(e,t){let i=this.generateNode(e,t.value,!0);return Et.methodDefinition(t.key,i,t.kind,t.static,t.computed)}generateFunctionDeclaration(e,t){return this.generateFunction(Et.funcDeclaration,...arguments)}generateFunctionExpression(e,t){return this.generateFunction(Et.funcExpr,...arguments)}generateArrowFunctionExpression(e,t){return this.generateFunction(Et.arrowFuncExpr,...arguments)}generateFunction(e,t,i){const r=(e,t)=>e?t.effectReference({type:i.type},(()=>this.generateNodes(t,[e])),!1):[e],s=(e,s,n)=>t.defineContext({type:i.type,isSubscriptFunction:i.isSubscriptFunction},(t=>t.createScope({type:i.type},(()=>(e=r(e,t)[0],s=s.map((e=>{if("AssignmentPattern"===e.type){let i=this.generateNode(t,e.right),r={type:e.left.type},[s]=t.effectReference(r,(()=>this.generateNodes(t,[e.left])),!1);return Et.assignmentPattern(s,i)}let i={type:e.type};return[e]=t.effectReference(i,(()=>this.generateNodes(t,[e])),!1),e})),n="ArrowFunctionExpression"===i.type&&i.expression?this.generateNode(t,Et.blockStmt([Et.returnStmt(n)])):this.generateNode(t,n),[t,e,s,n])))));let n,a,o,h,c,l=Et.identifier(t.getSubscriptIdentifier("$unit",!0)),p=(e,t,r,s,n)=>t.generate(e.call(Et,r,[l].concat(s),n,i.async,i.expression,i.generator),{args:[Et.literal(i.type),Et.identifier(i.isSubscriptFunction?"true":"false")],isFunctionUnit:!0,generateForArgument:!0});if("FunctionDeclaration"===i.type){[o]=r(i.id,t),[a,,h,c]=s(null,i.params,i.body),n=p(Et.funcExpr,a,null,h,c);let u=Et.memberExpr(l,Et.identifier("functions")),d=(e,...t)=>Et.callExpr(Et.memberExpr(u,Et.identifier(e)),[o,...t]);n=[Et.exprStmt(d("define",n)),e.call(Et,o,h,Et.blockStmt([Et.returnStmt(Et.callExpr(Et.memberExpr(d("get"),Et.identifier("call")),[Et.thisExpr(),Et.spreadElement(Et.identifier("arguments"))]))]))]}else[a,o,h,c]=s(i.id,i.params,i.body),n=p(e,a,o,h,c);return this.deferredTasks.unshift((()=>{a.sideEffects.forEach((e=>{a.ownerScope.doSideEffectUpdates(e.reference,e.remainderRefs)}))})),n}generateVariableDeclaration(e,t){let i={type:t.type,kind:t.kind},r=[],s=(s,n,a)=>{let o,h,[c]=s.signalReference(i,(t=>(o=t,this.generateNodes(e,[n.init])))),[l]=s.effectReference(i,(t=>(h=t,this.generateNodes(e,[n.id]))));if(o.setAssignee(h),this.setLocation(s,n),a||"const"===t.kind||!n.init||!this.params.devMode&&!s.references.filter((e=>e instanceof It)).length)return Et.varDeclarator(l,c);["ObjectPattern","ArrayPattern"].includes(n.id.type);let p=Array.from(h.refs).map((e=>Et.varDeclarator(Et.identifier(e.path[0].name),null))),u=Et.assignmentExpr(l,c);return r.length?(r.push(Et.varDeclaration(t.kind,p),...s.generate(Et.exprStmt(u))),[]):(r.push(...s.generate(Et.exprStmt(u))),p)},n=e.currentUnit&&["ForStatement","ForOfStatement","ForInStatement"].includes(e.currentUnit.type),a=t.declarations.reduce(((t,r)=>n?t.concat(s(e.currentUnit,r,!0)):e.defineUnit(i,(e=>t.concat(s(e,r))))),[]);return a.length?[Et.varDeclaration(t.kind,a),...r]:r}generateIfStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let{consequent:s,alternate:n}=t,[a]=r.signalReference(i,(()=>this.generateNodes(e,[t.test]))),[o,h]=e.defineMemo({expr:a}).generate();return s=e.createCondition({when:h},(()=>this.generateNodes(e,[t.consequent]))),s="BlockStatement"!==s[0].type&&s.length>1?Et.blockStmt(s):s[0],t.alternate&&(n=e.createCondition({whenNot:h},(()=>this.generateNodes(e,[t.alternate]))),n=n[0]&&"BlockStatement"!==n[0].type&&n.length>1?Et.blockStmt(n):n[0]),this.setLocation(r,t),this.setLocation(h,t.test),r.generate(Et.ifStmt(o,s,n))}))}generateSwitchStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.discriminant]))),[n,a]=e.defineMemo({expr:s}).generate(),o=e.createScope(i,(()=>t.cases.reduce(((t,i)=>{let s=t.slice(-1)[0],n=i.consequent.some((e=>"BreakStatement"===e.type)),[o]=r.signalReference({type:i.type},(()=>this.generateNodes(e,[i.test]))),[h,c]=e.defineMemo({expr:o}).generate(),l={switch:a,cases:[c]};return s&&!s.hasBreak&&l.cases.push(...s.condition.cases),this.setLocation(c,i.test),t.concat({caseNode:i,$test:h,condition:l,hasBreak:n})}),[]).map((({caseNode:t,$test:i,condition:r})=>{let s=e.createCondition(r,(()=>this.generateNodes(e,t.consequent)));return Et.switchCase(i,s)}))));return this.setLocation(r,t),this.setLocation(a,t.discriminant),r.generate(Et.switchStmt(n,o))}))}generateWhileStatement(e,t){return this.generateLoopStmtA(Et.whileStmt,...arguments)}generateDoWhileStatement(e,t){return this.generateLoopStmtA(Et.doWhileStmt,...arguments)}generateForStatement(e,t){return this.generateLoopStmtA(Et.forStmt,...arguments)}generateLoopStmtA(e,t,i){let r={type:i.type};return t.defineUnit({type:i.type},(s=>(this.setLocation(s,i),s.defineSubscriptIdentifier("$counter",["$x_index"]),t.createScope({type:"Iteration"},(()=>{let n,a,o,h;return"ForStatement"===i.type?([a,o,h]=s.signalReference(r,(()=>this.generateNodes(t,[i.init,i.test,i.update]))),n=t=>e.call(Et,a,o,h,t)):([o]=s.signalReference(r,(()=>this.generateNodes(t,[i.test]))),n=t=>e.call(Et,o,t)),t.defineContext({type:"Iteration",isIteration:!0},(e=>{let t;this.setLocation(e,i.body);let[r]=this.generateNodes(e,[i.body]);r.body.length&&([t,r]=this.composeLoopStmt(e,r));let a=[].concat(t||[]).concat(n(Et.blockStmt(r)));return s.generate(a)}))})))))}composeLoopStmt(e,t,i={}){let r=[i.disposeCallback],s=[],n=[],a=[],o=t.body.slice(0);if(!i.iterationId){i.iterationId=Et.identifier(e.getSubscriptIdentifier("$counter",!0));let t=Et.varDeclarator(Et.clone(i.iterationId),Et.literal(-1)),n=Et.updateExpr("++",Et.clone(i.iterationId),!1);s.push(t),a.push(n),r.push((()=>a.pop()))}return n.length&&(a.push(Et.varDeclaration("let",n)),r.push((()=>a.splice(-1)))),a.push(...e.generate(o,{args:[i.iterationId],disposeCallback:()=>r.forEach((e=>e&&e()))})),s=s.length?Et.varDeclaration("let",s):null,[s,a]}generateForOfStatement(e,t){return this.generateLoopStmtB(Et.forOfStmt,...arguments)}generateForInStatement(e,t){return this.generateLoopStmtB(Et.forInStmt,...arguments)}generateLoopStmtB(e,t,i){let r={type:i.type};return t.defineUnit({type:i.type},(s=>(this.setLocation(s,i),s.defineSubscriptIdentifier("$counter",["ForInStatement"===i.type?"$x_key":"$x_index"]),t.createScope({type:"Iteration"},(()=>{let n,a;"VariableDeclaration"===i.left.type?([n]=this.generateNodes(t,[i.left]),a=n.declarations[0].id):([n]=s.affectedsReference(r,(()=>this.generateNodes(t,[i.left]))),a=n);let[o]=s.signalReference(r,(()=>this.generateNodes(t,[i.right])));return t.defineContext({type:"Iteration",isIteration:!0},(r=>{this.setLocation(r,i.body);let[h]=this.generateNodes(r,[i.body]),c=e.call(Et,n,o,h),l=[];if(h.body.length){let s=e=>this.composeLoopStmt(r,h,{disposeCallback:()=>{c.left=n},...e}),p=n,u=h;if("ForOfStatement"===i.type)[l,u]=s({});else if("Identifier"===a.type)[l,u]=s({iterationId:a});else{let e,r=Et.identifier(t.getSubscriptIdentifier("$counter"));[l,u]=s({iterationId:r}),p=Et.varDeclaration("let",[Et.varDeclarator(Et.clone(r),null)]),e="VariableDeclaration"===i.left.type?Et.varDeclaration(n.kind,[Et.varDeclarator(a,Et.clone(r))]):Et.exprStmt(Et.sequenceExpr([Et.assignmentExpr(a,Et.clone(r),"=")])),u=[e].concat(u)}c=e.call(Et,p,o,Et.blockStmt(u))}return s.generate([].concat(l||[]).concat(c))}))})))))}generateLabeledStatement(e,t){e.subscriptIdentifiersNoConflict(t.label);let i={type:t.type,label:t.label};return t.body.type.endsWith("Statement")?e.createScope({type:t.body.type,label:t.label},(i=>{if("BlockStatement"===t.body.type){let i=this.generateNodes(e,t.body.body);return Et.labeledStmt(t.label,Et.blockStmt(i))}i.singleStatementScope=!0;let[r]=this.generateNodes(e,[t.body]);return Et.labeledStmt(t.label,r)})):e.defineUnit(i,(i=>{this.setLocation(i,t.body);let[r]=this.generateNodes(e,[t.body]);return Et.labeledStmt(t.label,i.generate(r))}))}generateBreakStatement(e,t){return this.generateExitStmt(Et.breakStmt,...arguments)}generateContinueStatement(e,t){return this.generateExitStmt(Et.continueStmt,...arguments)}generateExitStmt(e,t,i){let r=t.currentUnit.closest(["Iteration","SwitchStatement","LabeledStatement"]);if(r&&"SwitchStatement"===r.type&&"BreakStatement"===i.type&&!i.label)return e.call(Et,null);let s=Et.identifier(t.getSubscriptIdentifier("$unit",!0)),n=Et.literal("BreakStatement"===i.type?"break":"continue"),a=i.label?Et.literal(i.label.name):Et.identifier("null"),o=Et.exprStmt(Et.callExpr(Et.memberExpr(s,Et.identifier("exit")),[n,a]));return t.currentUnit.hoistExitStatement(n,a),[o,Et.returnStmt()]}generateReturnStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.argument]))),n=Et.identifier(e.getSubscriptIdentifier("$unit",!0)),a=Et.literal("return"),o=s||Et.identifier("undefined"),h=Et.exprStmt(Et.callExpr(Et.memberExpr(n,Et.identifier("exit")),[a,o]));return r.hoistExitStatement(a,Et.identifier("true")),r.generate([h,Et.returnStmt()])}))}generateBlockStatement(e,t){return e.createScope({type:t.type},(()=>{let i=this.generateNodes(e,t.body);return Et.blockStmt(i)}))}generateExpressionStatement(e,t){let i={type:t.type};return e.defineUnit(i,(r=>{this.setLocation(r,t.expression);let[s]=r.signalReference(i,(()=>this.generateNodes(e,[t.expression])));return r.generate(Et.exprStmt(s))}))}generateSequenceExpression(e,t){let i=t.expressions.map(((i,r)=>{let s={type:i.type,inSequence:!0};return r===t.expressions.length-1?([i]=e.currentUnit.chainableReference(s,(()=>this.generateNodes(e,[i]))),i):e.defineUnit(s,(t=>(this.setLocation(t,i),[i]=t.signalReference(s,(()=>this.generateNodes(e,[i]))),"Identifier"===i.type?i:t.generate(i))))}));return Et.sequenceExpr(i)}generateAssignmentExpression(e,t){let i,r,s={type:t.type,kind:t.operator},[n]=e.currentUnit.signalReference(s,(r=>(i=r,this.generateNodes(e,[t.right])))),[a]=e.currentUnit.embeddableEffectReference(s,(i=>(r=i,this.generateNodes(e,[t.left]))));return i.setAssignee(r),Et.assignmentExpr(a,n,t.operator)}generateUpdateExpression(e,t){return this.generateMutationExpr(Et.updateExpr,...arguments)}generateUnaryExpression(e,t){if("delete"===t.operator)return this.generateMutationExpr(Et.unaryExpr,...arguments);let i={type:t.type,kind:t.operator},[r]=e.currentUnit.signalReference(i,(()=>this.generateNodes(e,[t.argument])));return Et.unaryExpr(t.operator,r,t.prefix)}generateMutationExpr(e,t,i){let r={type:i.type,kind:i.operator},[s]=t.currentUnit.effectReference(r,(()=>this.generateNodes(t,[i.argument])));return e.call(Et,i.operator,s,i.prefix)}generateBinaryExpression(e,t){let[i]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.left]))),[r]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.right])));return Et.binaryExpr(t.operator,i,r)}generateLogicalExpression(e,t){let i={type:t.type,kind:t.operator},[r]=e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.left]))),[s,n]=e.defineMemo({expr:r}).generate(),a="||"===t.operator?{whenNot:n}:{when:n},[o]=e.createCondition(a,(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.right])))));return this.setLocation(n,t.left),Et.logicalExpr(t.operator,s,o)}generateConditionalExpression(e,t){let i={type:t.type},[r]=e.currentUnit.signalReference(i,(()=>this.generateNodes(e,[t.test]))),[s,n]=e.defineMemo({expr:r}).generate(),[a]=e.createCondition({when:n},(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.consequent]))))),[o]=e.createCondition({whenNot:n},(()=>e.currentUnit.chainableReference(i,(()=>this.generateNodes(e,[t.alternate])))));return this.setLocation(n,t.test),Et.condExpr(s,a,o)}generateArrayPattern(e,t){let i=t.elements.map(((t,i)=>([t]=e.currentUnit.currentReference.withDestructure({name:i},(()=>this.generateNodes(e,[t]))),t)));return Et.arrayPattern(i)}generateObjectPattern(e,t){let i=t.properties.map((t=>{let{key:i,value:r}=t;t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i]))));let s={name:t.key.name};return t.computed&&("Literal"===t.key.type?s={name:t.key.value}:[i,s]=e.defineMemo({expr:i}).generate()),[r]=e.currentUnit.currentReference.withDestructure(s,(()=>this.generateNodes(e,[r]))),this.setLocation(s,t.key),Et.property(i,r,t.kind,t.shorthand,t.computed,t.method)}));return Et.objectPattern(i)}generateMemberExpression(e,t){let{property:i}=t;t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i]))));let r={name:t.property.name};t.computed&&("Literal"===t.property.type?r={name:t.property.value}:[i,r]=e.defineMemo({expr:i}).generate());let[s]=e.currentUnit.currentReference.withProperty(r,(()=>this.generateNodes(e,[t.object])));return this.setLocation(r,t.property),Et.memberExpr(s,i,t.computed,t.optional)}generateThisExpression(e,t){return this.generateIdentifier(...arguments)}generateIdentifier(e,t){"Identifier"===t.type&&e.subscriptIdentifiersNoConflict(t);let i={name:"Identifier"===t.type?t.name:"this"};this.setLocation(i,t);const r=e.closestFunction();let s=(e.currentUnit||e).currentReference;if(s)do{(!r||r.isSubscriptFunction||s instanceof Pt)&&s.addRef().unshift(i)}while(s=s.contextReference);return"Identifier"===t.type?Et.identifier(t.name):Et.thisExpr()}generateSpreadElement(e,t){return this.generateArgumentExpr(Et.spreadElement,...arguments)}generateAwaitExpression(e,t){return e.currentUnit.hoistAwaitKeyword(),this.generateArgumentExpr(Et.awaitExpr,...arguments)}generateArgumentExpr(e,t,i){let[r]=t.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(t,[i.argument])));return e.call(Et,r)}generateCallExpression(e,t){return this.generateCallExpr(Et.callExpr,...arguments)}generateNewExpression(e,t){return this.generateCallExpr(Et.newExpr,...arguments)}generateCallExpr(e,t,i){let[r]=t.currentUnit.signalReference({type:i.callee.type},(()=>this.generateNodes(t,[i.callee]))),s=i.arguments.map((e=>t.currentUnit.signalReference({type:e.type},(()=>this.generateNodes(t,[e])[0]))));return e.call(Et,r,s,i.optional)}generateParenthesizedExpression(e,t){return this.generateExprExpr(Et.parensExpr,...arguments)}generateChainExpression(e,t){return this.generateExprExpr(Et.chainExpr,...arguments)}generateExprExpr(e,t,i){let[r]=this.generateNodes(t,[i.expression]);return e.call(Et,r)}generateArrayExpression(e,t){let i=t.elements.map((t=>e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t])[0]))));return Et.arrayExpr(i)}generateObjectExpression(e,t){let i=this.generateNodes(e,t.properties);return Et.objectExpr(i)}generateProperty(e,t){let{key:i,value:r}=t;return t.computed&&([i]=e.currentUnit.signalReference({type:i.type},(()=>this.generateNodes(e,[i])))),[r]=e.currentUnit.signalReference({type:r.type},(()=>this.generateNodes(e,[r]))),Et.property(i,r,t.kind,t.shorthand,t.computed,!1)}generateTaggedTemplateExpression(e,t){let[i,r]=e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[t.tag,t.quasi])));return Et.taggedTemplateExpr(i,r)}generateTemplateLiteral(e,t){let i=t.expressions.map((i=>e.currentUnit.signalReference({type:t.type},(()=>this.generateNodes(e,[i])[0]))));return Et.templateLiteral(t.quasis,i)}generateTryStatement(e,t){let[i,r,s]=this.generateNodes(e,[t.block,t.handler,t.finalizer]);return Et.tryStmt(i,r,s)}generateCatchClause(e,t){let[i]=this.generateNodes(e,[t.body]);return Et.catchClause(t.param,i)}generateThrowStatement(e,t){return this.generateArgumentExpr(Et.throwStmt,...arguments)}}class Rt{constructor(e,t,i,r={},s=null,n=null){this.ownerUnit=e,this.graph=t,this.callee=i,this.params=r,this.exits=n||new Map,this.$thread=s||{entries:new Map,sequence:[],ownerUnit:this},this.subUnits=new Map,this.unit=function(e,t,i=null,r=null){if(!this.graph.subUnits[e])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child unit ${e}.`);let s,n,o,h=this.graph.subUnits[e],c={...this.params,isIterationUnit:3===arguments.length,iterationId:3===arguments.length&&t,isFunctionUnit:4===arguments.length,functionType:4===arguments.length&&t,isSubscriptFunction:4===arguments.length&&i,functionScope:this.params.isFunctionUnit&&this.graph.lineage||this.params.functionScope};if(c.isIterationUnit){let t=new Rt(this,h,i,c,this.$thread,this.exits),r=this.subUnits.get(e);return r||(r=new Map,this.subUnits.set(e,r)),r.has(c.iterationId)&&r.get(c.iterationId).dispose(),r.set(c.iterationId,t),t.call()}return this.subUnits.has(e)&&this.subUnits.get(e).dispose(),c.isFunctionUnit?(s=r,o=n=new Rt(this,h,s,c),"FunctionDeclaration"!==c.functionType&&(o=s instanceof(async()=>{}).constructor?async function(){return n.call(this,...arguments)}:function(){return n.call(this,...arguments)},a(o,n))):(s=t,n=new Rt(this,h,s,c,this.$thread,this.exits),o=n.call()),this.subUnits.set(e,n),o}.bind(this),this.unit.memo=Object.create(null),this.unit.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.unit.exit=function(e,t){this.exits.set(e,t)}.bind(this),this.unit.functions=new Map,this.unit.functions.define=(e,t)=>{this.unit.functions.set(e,t),a(e,t,!0)};const a=(e,t,i=!1)=>{i||(Object.defineProperty(e,"length",{configurable:!0,value:t.callee.length-1}),Object.defineProperty(e,"name",{configurable:!0,value:t.callee.name})),t.params.isSubscriptFunction&&(e.thread=t.thread.bind(t),e.dispose=t.dispose.bind(t),Object.defineProperty(e,"runtime",{value:t}),Object.defineProperty(e,"sideEffects",{configurable:!0,value:t.graph.sideEffects||""}),Object.defineProperty(e,"subscriptSource",{configurable:!0,value:t.graph.subscriptSource||""}),Object.defineProperty(e,"originalSource",{configurable:!0,value:t.graph.originalSource||""}))}}fire(e,t,i){if(this.ownerUnit)return this.ownerUnit.fire(e,t,i)}call(e,...t){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);let i=this.callee.call(e,this.unit,...t);if(this.graph.$sideEffects)for(let e in this.graph.effects)for(let t of this.graph.effects[e].refs)this.buildThread([],t,[],0,!0);if(!this.ownerUnit||this.params.isFunctionUnit){let e=this.exits.get("return");this.exits.clear(),void 0!==e&&(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.subUnits.size)throw new Error(`Unit ${this.graph.lineage} is not an iterator.`);let t,[[,i]]=this.subUnits,r=(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=r(t,(()=>e.call()));else for(let s of e){let e=i.get(s)||i.get(parseInt(s));e&&(t=r(t,(()=>e.call())))}return t}thread(...e){if(this.disposed)return!1;this.$thread.active=!0;for(let t in this.graph.effects)for(let i of this.graph.effects[t].refs)for(let t of e){let[e,r,s]=this.matchRefs(t,i);e&&this.buildThread(t,i,s,r)}return this.runThread()}runThread(){let e,t,i,r=(e,t)=>{if(["ForOfStatement","ForInStatement"].includes(e.graph.type)&&t.every((e=>e.executionPlan.isIterationUnitTarget))){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()},s=(e,t)=>e instanceof Promise?e.then(t):t();for(;(t=this.$thread.sequence.shift())&&(i=[...this.$thread.entries.get(t)])&&this.$thread.entries.delete(t);)e=s(e,(()=>{if(t.disposed||!t.filterRefs(i).length)return;this.$thread.current=t;let e=r(t,i);return s(e,(()=>{for(let e of i)[].concat(e.executionPlan.assigneeRef||e.executionPlan.assigneeRefs||[]).forEach((e=>{t.buildThread([],e,[],0)}))})),e}));return s(e,(()=>{let e=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,e}))}buildThread(e,t,i,r=0,s=!1){let n=r>0;if(this.ownerUnit){if(!this.compute(i))return;if(void 0!==t.condition&&!this.assert(t.condition))return}else n||(n=i.length||void 0!==t.condition);let a=s?t.$subscriptions:t.subscriptions;Object.keys(a).forEach((t=>{let[i,r]=t.split(":"),s=i=>{i&&i.selectRefs(r,a[t],n?e:null)},o=this.locate(i);Array.isArray(o)?o.forEach(s):s(o)}))}selectRefs(e,t,i=null){let r=this.$thread,s=this.graph.signals[e],n=(e,t)=>e.graph.lineage.localeCompare(t.graph.lineage,void 0,{numeric:!0}),a=(e,t=[],i={})=>{if(!r.active)return;if(r.current&&n(this,r.current)<0)return;let s=r.entries.get(this);if(s||(s=new Set,r.entries.set(this,s),r.sequence.push(this),r.sequence.sort(n)),s.add({...e,computes:t,executionPlan:i}),!i.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){i.assigneeRefs=[];for(let e in this.graph.effects)i.assigneeRefs.push(...this.graph.effects[e].refs)}};for(let e of t){let t=s.refs[e];if(!i){a(t);continue}let[r,n,o]=this.matchRefs(i,t);if(!r)continue;if(n<=0){a(t,o);continue}let h=i.slice(-n),c="assignee"in s?this.graph.effects[s.assignee]:null;c?c.refs.forEach((e=>{if(e.depth.length){let[i,r,s]=this.matchRefs(h,e.depth),n=o.concat(s);if(i&&r>0){let t=e.path.concat(h.slice(-r));this.buildThread(t,e,n,r)}else i&&a(t,n,{assigneeRef:e})}else{let t=e.path.concat(h);this.buildThread(t,e,o,n)}})):(1!==n||"ForOfStatement"!==this.graph.type)&&(1!==n||"ForInStatement"!==this.graph.type)||a(t,o,{isIterationUnitTarget:!0,iterationTarget:h[0]})}}filterRefs(e){return e.filter((e=>{if(this.compute(e.computes)&&(void 0===e.condition||this.assert(e.condition)))return!0}))}matchRefs(e,t){let i,r,s,n;Array.isArray(e)?(i=e,r=e.dotSafe?e.join("."):void 0):(i=e.path,r=e.$path),Array.isArray(t)?(s=t,n=t.dotSafe?t.join("."):void 0):(s=t.path,n=t.$path);let a=i.length-s.length;if(a>0&&([i,s,r,n]=[s,i,n,r]),r&&n)return[`${n}.`.startsWith(`${r}.`),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,r="object"==typeof t&&"memoId"in t;return i||r?(o.push((s=>(i?s[e.memoId]:h(e))===(r?s[t.memoId]:h(t)))),!0):h(e)===h(t)})(t,s[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("/"),r=this.subUnits.get(parseInt(i.shift()));if(i.length){if(r instanceof Map)return Array.from(r).reduce(((t,[i,r])=>t.concat(r.locate(e))),[]);if(r)return r.locate(e)}return r}return this.ownerUnit?this.ownerUnit.locate(e):void 0}compute(e){return!e.some((e=>!1===e(this.unit.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.unit.memo;return!(void 0!==t.parent&&!this.assert(t.parent))&&(void 0!==t.switch?t.cases.some((e=>i[e]===i[t.switch])):void 0!==t.whenNot?!i[t.whenNot]:void 0===t.when||i[t.when])}dispose(){this.params.isFunctionUnit||(this.subUnits.forEach(((e,t)=>{e instanceof Map?(e.forEach((e=>e.dispose())),e.clear()):e.dispose()})),this.subUnits.clear(),delete this.ownerUnit,delete this.callee,delete this.params,delete this.unit.memo,this.disposed=!0)}}class Dt extends Rt{static create(e,t=[],i={}){const r=new(e.graph.hoistedAwaitKeyword?Object.getPrototypeOf((async function(){})).constructor:Function)(e.identifier,...t,e.source);return new this(null,e.graph,r,i)}constructor(e,t,i,r={},s=null){super(e,t,i,{},s),this.observers=[]}observe(e,t){this.params.devMode,this.observers.push({unitUrl:e,callback:t})}fire(e,t,i){(this.observers||[]).forEach((r=>{r.unitUrl===e&&r.callback(t,i)}))}}function Vt(e){let t=e.split(/\n/g);if(t.length>1){for(;!t[0].trim().length;)t.shift();let e=t[0].split(/[^\s]/)[0].length;if(e)return t.map(((i,r)=>{let s=i.substring(0,e);return s.trim().length?"}"===s.trim()&&r===t.length-1?"}":i:i.substring(e)})).join("\n")}return e}function jt(...e){let t="object"==typeof e[e.length-1]?e.pop():{};t.compiler={...jt.compilerParams,...t.compiler||{}},t.runtime={...jt.runtimeParams,...t.runtime||{}};let i,r=Vt(e.pop()||""),s=e;if(jt.cache[r]&&!t.compiler.devMode&&Wt(s,jt.cache[r][1])&&$t(t.compiler,jt.cache[r][2]))[i,s]=jt.cache[r];else{let e=Ft(r);i=new Mt(t.compiler).generate(e),jt.cache[r]=[i,s,t.compiler]}return Ut(this,i,e,t.runtime,r)}jt.cache={},jt.compilerParams={globalsNoObserve:[],globalsOnlyPaths:!1,compact:2},jt.runtimeParams={},jt.cloneCache={},jt.clone=function(e,t=null,i={},r={}){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 s,n,a,o,h=Vt(e.toString()),c=h;if(h.startsWith("async ")&&(s=!0,c=c.substring(6)),!c.startsWith("function ")&&!c.startsWith("function(")){if(c.trim().startsWith("[")){let t,i=c.split(/\](?:[\s]+)?\(/g).filter((e=>e));[t,c]=i.reduce(((t,r,s)=>{if(Array.isArray(t))return t;r=`${t}${r||""}]`;try{return Ft(r),[r,`${e.name}(${i.slice(s+1).join("] (")}`]}catch(e){return`${r} (`}}),"")}c="function "+c}if(jt.cloneCache[c]&&!i.devMode&&$t(i,jt.cloneCache[c][3]))[n,a,o]=jt.cloneCache[c];else{let e=Ft(c).body[0],t=e.body.start+1;"\n"===c.substr(t,1)&&(t+=1);let r=new Mt({...i,...jt.compilerParams,locStart:-t});a=e.params.map((e=>r.serialize(e))),n=r.generate({type:"Program",body:e.body.body}),!n.graph.hoistedAwaitKeyword&&s&&(n.graph.hoistedAwaitKeyword=!0),o=c.substring(t,e.body.end-1),jt.cloneCache[c]=[n,a,o,i]}return Ut(t,n,a,r,o,e.name)};const Ut=function(e,t,i=[],r={},s=null,n=null){let a=Dt.create(t,i,{...r,...jt.runtimeParams}),o=function(...t){return a.call(void 0===this?e:this,...t)};o.thread=a.thread.bind(a),o.dispose=a.dispose.bind(a),Object.defineProperty(o,"runtime",{value:a}),Object.defineProperty(o,"sideEffects",{configurable:!0,value:a.graph.sideEffects}),Object.defineProperty(o,"subscriptSource",{configurable:!0,value:t.source}),Object.defineProperty(o,"originalSource",{configurable:!0,value:s}),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(", ")}) {${s}}`,o},Bt=new Map,Ft=function(e,t={}){t={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,...t};let i=Bt.get(e);return i||(i=Or.parse(e,t),Bt.set(e,i)),i},Wt=(e,t)=>"object"==typeof e&&e&&"object"==typeof t&&t?$t(e,t):Array.isArray(e)&&Array.isArray(t)&&e.length===t.length?e.every((e=>t.some((t=>Wt(e,t))))):e===t,$t=function(e,t){for(let i in e)if(!Wt(e[i],t[i]))return!1;return!0},Ht=e=>class extends(e||class{}){static get subscriptMethods(){return[]}static implementMethod(e,t){return jt.clone(e,t)}constructor(){super();const e=this.constructor;e.subscriptMethods.forEach((t=>{if(!this[t])throw new Error(`${t} is not a method.`);if("constructor"===t)throw new Error("Class constructors cannot be subscript methods.");this[t]=e.implementMethod(this[t],this)}))}};var qt={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"},Gt="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",zt={5:Gt,"5module":Gt+" export import",6:Gt+" const class extends export import super"},Kt=/^in(stanceof)?$/,Qt="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Jt="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Xt=new RegExp("["+Qt+"]"),Yt=new RegExp("["+Qt+Jt+"]");Qt=Jt=null;var Zt=[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],ei=[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 ti(e,t){for(var i=65536,r=0;r<t.length;r+=2){if((i+=t[r])>e)return!1;if((i+=t[r+1])>=e)return!0}}function ii(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Xt.test(String.fromCharCode(e)):!1!==t&&ti(e,Zt)))}function ri(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Yt.test(String.fromCharCode(e)):!1!==t&&(ti(e,Zt)||ti(e,ei)))))}var si=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 ni(e,t){return new si(e,{beforeExpr:!0,binop:t})}var ai={beforeExpr:!0},oi={startsExpr:!0},hi={};function ci(e,t){return void 0===t&&(t={}),t.keyword=e,hi[e]=new si(e,t)}var li={num:new si("num",oi),regexp:new si("regexp",oi),string:new si("string",oi),name:new si("name",oi),privateId:new si("privateId",oi),eof:new si("eof"),bracketL:new si("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new si("]"),braceL:new si("{",{beforeExpr:!0,startsExpr:!0}),braceR:new si("}"),parenL:new si("(",{beforeExpr:!0,startsExpr:!0}),parenR:new si(")"),comma:new si(",",ai),semi:new si(";",ai),colon:new si(":",ai),dot:new si("."),question:new si("?",ai),questionDot:new si("?."),arrow:new si("=>",ai),template:new si("template"),invalidTemplate:new si("invalidTemplate"),ellipsis:new si("...",ai),backQuote:new si("`",oi),dollarBraceL:new si("${",{beforeExpr:!0,startsExpr:!0}),eq:new si("=",{beforeExpr:!0,isAssign:!0}),assign:new si("_=",{beforeExpr:!0,isAssign:!0}),incDec:new si("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new si("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ni("||",1),logicalAND:ni("&&",2),bitwiseOR:ni("|",3),bitwiseXOR:ni("^",4),bitwiseAND:ni("&",5),equality:ni("==/!=/===/!==",6),relational:ni("</>/<=/>=",7),bitShift:ni("<</>>/>>>",8),plusMin:new si("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ni("%",10),star:ni("*",10),slash:ni("/",10),starstar:new si("**",{beforeExpr:!0}),coalesce:ni("??",1),_break:ci("break"),_case:ci("case",ai),_catch:ci("catch"),_continue:ci("continue"),_debugger:ci("debugger"),_default:ci("default",ai),_do:ci("do",{isLoop:!0,beforeExpr:!0}),_else:ci("else",ai),_finally:ci("finally"),_for:ci("for",{isLoop:!0}),_function:ci("function",oi),_if:ci("if"),_return:ci("return",ai),_switch:ci("switch"),_throw:ci("throw",ai),_try:ci("try"),_var:ci("var"),_const:ci("const"),_while:ci("while",{isLoop:!0}),_with:ci("with"),_new:ci("new",{beforeExpr:!0,startsExpr:!0}),_this:ci("this",oi),_super:ci("super",oi),_class:ci("class",oi),_extends:ci("extends",ai),_export:ci("export"),_import:ci("import",oi),_null:ci("null",oi),_true:ci("true",oi),_false:ci("false",oi),_in:ci("in",{beforeExpr:!0,binop:7}),_instanceof:ci("instanceof",{beforeExpr:!0,binop:7}),_typeof:ci("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ci("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ci("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},pi=/\r\n?|\n|\u2028|\u2029/,ui=new RegExp(pi.source,"g");function di(e){return 10===e||13===e||8232===e||8233===e}function fi(e,t,i){void 0===i&&(i=e.length);for(var r=t;r<i;r++){var s=e.charCodeAt(r);if(di(s))return r<i-1&&13===s&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var mi=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gi=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yi=Object.prototype,bi=yi.hasOwnProperty,xi=yi.toString,vi=Object.hasOwn||function(e,t){return bi.call(e,t)},wi=Array.isArray||function(e){return"[object Array]"===xi.call(e)};function Si(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Ei=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ki=function(e,t){this.line=e,this.column=t};ki.prototype.offset=function(e){return new ki(this.line,this.column+e)};var Ci=function(e,t,i){this.start=t,this.end=i,null!==e.sourceFile&&(this.source=e.sourceFile)};function _i(e,t){for(var i=1,r=0;;){var s=fi(e,r,t);if(s<0)return new ki(i,t-r);++i,r=s}}var Pi={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},Ai=!1;function Ii(e,t){return 2|(e?4:0)|(t?8:0)}var Ti=function(e,t,i){this.options=e=function(e){var t={};for(var i in Pi)t[i]=e&&vi(e,i)?e[i]:Pi[i];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Ai&&"object"==typeof console&&console.warn&&(Ai=!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),wi(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return wi(t.onComment)&&(t.onComment=function(e,t){return function(i,r,s,n,a,o){var h={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(h.loc=new Ci(this,a,o)),e.ranges&&(h.range=[s,n]),t.push(h)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=Si(zt[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=qt[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=Si(r);var s=(r?r+" ":"")+qt.strict;this.reservedWordsStrict=Si(s),this.reservedWordsStrictBind=Si(s+" "+qt.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(pi).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=li.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=[]},Oi={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}};Ti.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Oi.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Oi.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Oi.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Oi.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},Oi.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(64&t)>0||i||this.options.allowSuperOutsideMethod},Oi.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Oi.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Oi.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(258&t)>0||i},Oi.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},Ti.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var i=this,r=0;r<e.length;r++)i=e[r](i);return i},Ti.parse=function(e,t){return new this(t,e).parse()},Ti.parseExpressionAt=function(e,t,i){var r=new this(i,e,t);return r.nextToken(),r.parseExpression()},Ti.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(Ti.prototype,Oi);var Ni=Ti.prototype,Li=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function Mi(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Ni.strictDirective=function(e){for(;;){gi.lastIndex=e,e+=gi.exec(this.input)[0].length;var t=Li.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){gi.lastIndex=e+t[0].length;var i=gi.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return";"===s||"}"===s||pi.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||"!"===s&&"="===this.input.charAt(r+1))}e+=t[0].length,gi.lastIndex=e,e+=gi.exec(this.input)[0].length,";"===this.input[e]&&e++}},Ni.eat=function(e){return this.type===e&&(this.next(),!0)},Ni.isContextual=function(e){return this.type===li.name&&this.value===e&&!this.containsEsc},Ni.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Ni.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Ni.canInsertSemicolon=function(){return this.type===li.eof||this.type===li.braceR||pi.test(this.input.slice(this.lastTokEnd,this.start))},Ni.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ni.semicolon=function(){this.eat(li.semi)||this.insertSemicolon()||this.unexpected()},Ni.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Ni.expect=function(e){this.eat(e)||this.unexpected()},Ni.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},Ni.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")}},Ni.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},Ni.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")},Ni.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Ri=Ti.prototype;Ri.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==li.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,s=Object.keys(this.undefinedExports);r<s.length;r+=1){var n=s[r];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 Di={kind:"loop"},Vi={kind:"switch"};Ri.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;gi.lastIndex=this.pos;var t=gi.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(91===r||92===r||r>55295&&r<56320)return!0;if(e)return!1;if(123===r)return!0;if(ii(r,!0)){for(var s=i+1;ri(r=this.input.charCodeAt(s),!0);)++s;if(92===r||r>55295&&r<56320)return!0;var n=this.input.slice(i,s);if(!Kt.test(n))return!0}return!1},Ri.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;gi.lastIndex=this.pos;var e,t=gi.exec(this.input),i=this.pos+t[0].length;return!(pi.test(this.input.slice(this.pos,i))||"function"!==this.input.slice(i,i+8)||i+8!==this.input.length&&(ri(e=this.input.charCodeAt(i+8))||e>55295&&e<56320))},Ri.parseStatement=function(e,t,i){var r,s=this.type,n=this.startNode();switch(this.isLet(e)&&(s=li._var,r="let"),s){case li._break:case li._continue:return this.parseBreakContinueStatement(n,s.keyword);case li._debugger:return this.parseDebuggerStatement(n);case li._do:return this.parseDoStatement(n);case li._for:return this.parseForStatement(n);case li._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case li._class:return e&&this.unexpected(),this.parseClass(n,!0);case li._if:return this.parseIfStatement(n);case li._return:return this.parseReturnStatement(n);case li._switch:return this.parseSwitchStatement(n);case li._throw:return this.parseThrowStatement(n);case li._try:return this.parseTryStatement(n);case li._const:case li._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(n,r);case li._while:return this.parseWhileStatement(n);case li._with:return this.parseWithStatement(n);case li.braceL:return this.parseBlock(!0,n);case li.semi:return this.parseEmptyStatement(n);case li._export:case li._import:if(this.options.ecmaVersion>10&&s===li._import){gi.lastIndex=this.pos;var a=gi.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'")),s===li._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 s===li.name&&"Identifier"===l.type&&this.eat(li.colon)?this.parseLabeledStatement(n,c,l,e):this.parseExpressionStatement(n,l)}},Ri.parseBreakContinueStatement=function(e,t){var i="break"===t;this.next(),this.eat(li.semi)||this.insertSemicolon()?e.label=null:this.type!==li.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var s=this.labels[r];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(i||"loop"===s.kind))break;if(e.label&&i)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")},Ri.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Ri.parseDoStatement=function(e){return this.next(),this.labels.push(Di),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(li._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(li.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Ri.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Di),this.enterScope(0),this.expect(li.parenL),this.type===li.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===li._var||this.type===li._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,"VariableDeclaration"),(this.type===li._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===li._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var n=this.isContextual("let"),a=!1,o=new Mi,h=this.parseExpression(!(t>-1)||"await",o);return this.type===li._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===li._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))},Ri.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Ui|(i?0:Bi),!1,t)},Ri.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(li._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Ri.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(li.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Ri.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(li.braceL),this.labels.push(Vi),this.enterScope(0);for(var i=!1;this.type!==li.braceR;)if(this.type===li._case||this.type===li._default){var r=this.type===li._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(li.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")},Ri.parseThrowStatement=function(e){return this.next(),pi.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 ji=[];Ri.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===li._catch){var t=this.startNode();if(this.next(),this.eat(li.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(li.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(li._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Ri.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Ri.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Di),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Ri.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")},Ri.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Ri.parseLabeledStatement=function(e,t,i,r){for(var s=0,n=this.labels;s<n.length;s+=1)n[s].name===t&&this.raise(i.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===li._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(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")},Ri.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Ri.parseBlock=function(e,t,i){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(li.braceL),e&&this.enterScope(0);this.type!==li.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Ri.parseFor=function(e,t){return e.init=t,this.expect(li.semi),e.test=this.type===li.semi?null:this.parseExpression(),this.expect(li.semi),e.update=this.type===li.parenR?null:this.parseExpression(),this.expect(li.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Ri.parseForIn=function(e,t){var i=this.type===li._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(li.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")},Ri.parseVar=function(e,t,i){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(li.eq)?r.init=this.parseMaybeAssign(t):"const"!==i||this.type===li._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===li._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(li.comma))break}return e},Ri.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Ui=1,Bi=2;function Fi(e,t){var i=t.key.name,r=e[i],s="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(s=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===s||"iset"===r&&"iget"===s||"sget"===r&&"sset"===s||"sset"===r&&"sget"===s?(e[i]="true",!1):!!r||(e[i]=s,!1)}function Wi(e,t){var i=e.computed,r=e.key;return!i&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}Ri.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===li.star&&t&Bi&&this.unexpected(),e.generator=this.eat(li.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Ui&&(e.id=4&t&&this.type!==li.name?null:this.parseIdent(),!e.id||t&Bi||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(Ii(e.async,e.generator)),t&Ui||(e.id=this.type===li.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,s),this.yieldPos=n,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&Ui?"FunctionDeclaration":"FunctionExpression")},Ri.parseFunctionParams=function(e){this.expect(li.parenL),e.params=this.parseBindingList(li.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ri.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),n=!1;for(s.body=[],this.expect(li.braceL);this.type!==li.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(s.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&&Fi(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Ri.parseClassElement=function(e){if(this.eat(li.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=!1,n=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(li.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===li.star?o=!0:r="static"}if(i.static=o,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==li.star||this.canInsertSemicolon()?r="async":n=!0),!r&&(t>=9||!n)&&this.eat(li.star)&&(s=!0),!r&&!n&&!s){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=h:r=h)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===li.parenL||"method"!==a||s||n){var c=!i.static&&Wi(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,s,n,l)}else this.parseClassField(i);return i},Ri.isClassElementNameStart=function(){return this.type===li.name||this.type===li.privateId||this.type===li.num||this.type===li.string||this.type===li.bracketL||this.type.keyword},Ri.parseClassElementName=function(e){this.type===li.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)},Ri.parseClassMethod=function(e,t,i,r){var s=e.key;"constructor"===e.kind?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&Wi(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,r);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")},Ri.parseClassField=function(e){if(Wi(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Wi(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(li.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")},Ri.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==li.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Ri.parseClassId=function(e,t){this.type===li.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Ri.parseClassSuper=function(e){e.superClass=this.eat(li._extends)?this.parseExprSubscripts(!1):null},Ri.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Ri.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,i=e.used,r=this.privateNameStack.length,s=0===r?null:this.privateNameStack[r-1],n=0;n<i.length;++n){var a=i[n];vi(t,a.name)||(s?s.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},Ri.parseExport=function(e,t){if(this.next(),this.eat(li.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!==li.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(li._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===li._function||(i=this.isAsyncFunction())){var r=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(r,4|Ui,!1,i)}else if(this.type===li._class){var s=this.startNode();e.declaration=this.parseClass(s,"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!==li.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")},Ri.checkExport=function(e,t,i){e&&(vi(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)},Ri.checkPatternExport=function(e,t){var i=t.type;if("Identifier"===i)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===i)for(var r=0,s=t.properties;r<s.length;r+=1){var n=s[r];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)},Ri.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s.id)}},Ri.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Ri.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(li.braceL);!this.eat(li.braceR);){if(i)i=!1;else if(this.expect(li.comma),this.afterTrailingComma(li.braceR))break;var r=this.startNode();r.local=this.parseModuleExportName(),r.exported=this.eatContextual("as")?this.parseModuleExportName():r.local,this.checkExport(e,r.exported["Identifier"===r.exported.type?"name":"value"],r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},Ri.parseImport=function(e){return this.next(),this.type===li.string?(e.specifiers=ji,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===li.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Ri.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===li.name){var i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(li.comma))return e}if(this.type===li.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(li.braceL);!this.eat(li.braceR);){if(t)t=!1;else if(this.expect(li.comma),this.afterTrailingComma(li.braceR))break;var s=this.startNode();s.imported=this.parseModuleExportName(),this.eatContextual("as")?s.local=this.parseIdent():(this.checkUnreserved(s.imported),s.local=s.imported),this.checkLValSimple(s.local,2),e.push(this.finishNode(s,"ImportSpecifier"))}return e},Ri.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===li.string){var e=this.parseLiteral(this.value);return Ei.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Ri.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)},Ri.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 $i=Ti.prototype;$i.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 r=0,s=e.properties;r<s.length;r+=1){var n=s[r];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},$i.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var s=e[r];s&&this.toAssignable(s,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},$i.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},$i.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==li.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},$i.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case li.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(li.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case li.braceL:return this.parseObj(!0)}return this.parseIdent()},$i.parseBindingList=function(e,t,i){for(var r=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(li.comma),t&&this.type===li.comma)r.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===li.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),r.push(n),this.type===li.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),r.push(a)}return r},$i.parseBindingListItem=function(e){return e},$i.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(li.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},$i.checkLValSimple=function(e,t,i){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(vi(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":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},$i.checkLValPattern=function(e,t,i){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,s=e.properties;r<s.length;r+=1){var n=s[r];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)}},$i.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 Hi=function(e,t,i,r,s){this.token=e,this.isExpr=!!t,this.preserveSpace=!!i,this.override=r,this.generator=!!s},qi={b_stat:new Hi("{",!1),b_expr:new Hi("{",!0),b_tmpl:new Hi("${",!1),p_stat:new Hi("(",!1),p_expr:new Hi("(",!0),q_tmpl:new Hi("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new Hi("function",!1),f_expr:new Hi("function",!0),f_expr_gen:new Hi("function",!0,!1,null,!0),f_gen:new Hi("function",!1,!1,null,!0)},Gi=Ti.prototype;Gi.initialContext=function(){return[qi.b_stat]},Gi.curContext=function(){return this.context[this.context.length-1]},Gi.braceIsBlock=function(e){var t=this.curContext();return t===qi.f_expr||t===qi.f_stat||(e!==li.colon||t!==qi.b_stat&&t!==qi.b_expr?e===li._return||e===li.name&&this.exprAllowed?pi.test(this.input.slice(this.lastTokEnd,this.start)):e===li._else||e===li.semi||e===li.eof||e===li.parenR||e===li.arrow||(e===li.braceL?t===qi.b_stat:e!==li._var&&e!==li._const&&e!==li.name&&!this.exprAllowed):!t.isExpr)},Gi.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},Gi.updateContext=function(e){var t,i=this.type;i.keyword&&e===li.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr},Gi.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},li.parenR.updateContext=li.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===qi.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},li.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?qi.b_stat:qi.b_expr),this.exprAllowed=!0},li.dollarBraceL.updateContext=function(){this.context.push(qi.b_tmpl),this.exprAllowed=!0},li.parenL.updateContext=function(e){var t=e===li._if||e===li._for||e===li._with||e===li._while;this.context.push(t?qi.p_stat:qi.p_expr),this.exprAllowed=!0},li.incDec.updateContext=function(){},li._function.updateContext=li._class.updateContext=function(e){!e.beforeExpr||e===li._else||e===li.semi&&this.curContext()!==qi.p_stat||e===li._return&&pi.test(this.input.slice(this.lastTokEnd,this.start))||(e===li.colon||e===li.braceL)&&this.curContext()===qi.b_stat?this.context.push(qi.f_stat):this.context.push(qi.f_expr),this.exprAllowed=!1},li.backQuote.updateContext=function(){this.curContext()===qi.q_tmpl?this.context.pop():this.context.push(qi.q_tmpl),this.exprAllowed=!1},li.star.updateContext=function(e){if(e===li._function){var t=this.context.length-1;this.context[t]===qi.f_expr?this.context[t]=qi.f_expr_gen:this.context[t]=qi.f_gen}this.exprAllowed=!0},li.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==li.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var zi=Ti.prototype;function Ki(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Ki(e.expression)}zi.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,s=e.key;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===n&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[r="$"+r];a?("init"===n?this.strict&&a.init||a.get||a.set:a.init||a[n])&&this.raiseRecoverable(s.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[n]=!0}}},zi.parseExpression=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===li.comma){var n=this.startNodeAt(i,r);for(n.expressions=[s];this.eat(li.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return s},zi.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,s=-1,n=-1,a=-1;t?(s=t.parenthesizedAssign,n=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Mi,r=!0);var o=this.start,h=this.startLoc;this.type!==li.parenL&&this.type!==li.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===li.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===li.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 r&&this.checkExpressionErrors(t,!0),s>-1&&(t.parenthesizedAssign=s),n>-1&&(t.trailingComma=n),c},zi.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(li.question)){var n=this.startNodeAt(i,r);return n.test=s,n.consequent=this.parseMaybeAssign(),this.expect(li.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return s},zi.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||s.start===i&&"ArrowFunctionExpression"===s.type?s:this.parseExprOp(s,i,r,-1,e)},zi.parseExprOp=function(e,t,i,r,s){var n=this.type.binop;if(null!=n&&(!s||this.type!==li._in)&&n>r){var a=this.type===li.logicalOR||this.type===li.logicalAND,o=this.type===li.coalesce;o&&(n=li.logicalAND.binop);var h=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,s),c,l,n,s),u=this.buildBinary(t,i,e,p,h,a||o);return(a&&this.type===li.coalesce||o&&(this.type===li.logicalOR||this.type===li.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,t,i,r,s)}return e},zi.buildBinary=function(e,t,i,r,s,n){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=i,a.operator=s,a.right=r,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")},zi.parseMaybeUnary=function(e,t,i,r){var s,n=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),h=this.type===li.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,h,r),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&&Ki(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(o,h?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==li.privateId){if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(n,a);c.operator=this.value,c.prefix=!1,c.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==li._in&&this.unexpected();return i||!this.eat(li.starstar)?s:t?void this.unexpected(this.lastTokStart):this.buildBinary(n,a,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},zi.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===s.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return s;var n=this.parseSubscripts(s,i,r,!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},zi.parseSubscripts=function(e,t,i,r,s){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,r,n,a,s);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}},zi.parseSubscript=function(e,t,i,r,s,n,a){var o=this.options.ecmaVersion>=11,h=o&&this.eat(li.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(li.bracketL);if(c||h&&this.type!==li.parenL&&this.type!==li.backQuote||this.eat(li.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(li.bracketR)):this.type===li.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(!r&&this.eat(li.parenL)){var p=new Mi,u=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(li.parenR,this.options.ecmaVersion>=8,!1,p);if(s&&!h&&!this.canInsertSemicolon()&&this.eat(li.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===li.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},zi.parseExprAtom=function(e,t){this.type===li.slash&&this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case li._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==li.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==li.dot&&this.type!==li.bracketL&&this.type!==li.parenL&&this.unexpected(),this.finishNode(i,"Super");case li._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case li.name:var s=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(li._function))return this.overrideContext(qi.f_expr),this.parseFunction(this.startNodeAt(s,n),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(li.arrow))return this.parseArrowExpression(this.startNodeAt(s,n),[o],!1,t);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===li.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(li.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,n),[o],!0,t)}return o;case li.regexp:var h=this.value;return(i=this.parseLiteral(h.value)).regex={pattern:h.pattern,flags:h.flags},i;case li.num:case li.string:return this.parseLiteral(this.value);case li._null:case li._true:case li._false:return(i=this.startNode()).value=this.type===li._null?null:this.type===li._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case li.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),l;case li.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(li.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case li.braceL:return this.overrideContext(qi.b_expr),this.parseObj(!1,e);case li._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case li._class:return this.parseClass(this.startNode(),!1);case li._new:return this.parseNew();case li.backQuote:return this.parseTemplate();case li._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},zi.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 li.parenL:return this.parseDynamicImport(e);case li.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},zi.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(li.parenR)){var t=this.start;this.eat(li.comma)&&this.eat(li.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},zi.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")},zi.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")},zi.parseParenExpression=function(){this.expect(li.parenL);var e=this.parseExpression();return this.expect(li.parenR),e},zi.parseParenAndDistinguishExpression=function(e,t){var i,r=this.start,s=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 Mi,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==li.parenR;){if(l?l=!1:this.expect(li.comma),n&&this.afterTrailingComma(li.parenR,!0)){p=!0;break}if(this.type===li.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===li.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(li.parenR),e&&!this.canInsertSemicolon()&&this.eat(li.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(r,s,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(r,s);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}return i},zi.parseParenItem=function(e){return e},zi.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var Qi=[];zi.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(li.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 r=this.start,s=this.startLoc,n=this.type===li._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,s,!0,!1),n&&"ImportExpression"===e.callee.type&&this.raise(r,"Cannot use new with import()"),this.eat(li.parenL)?e.arguments=this.parseExprList(li.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Qi,this.finishNode(e,"NewExpression")},zi.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===li.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===li.backQuote,this.finishNode(i,"TemplateElement")},zi.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 r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===li.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(li.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(li.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")},zi.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===li.name||this.type===li.num||this.type===li.string||this.type===li.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===li.star)&&!pi.test(this.input.slice(this.lastTokEnd,this.start))},zi.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(li.braceR);){if(r)r=!1;else if(this.expect(li.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(li.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")},zi.parseProperty=function(e,t){var i,r,s,n,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(li.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===li.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(this.type===li.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),a.argument=this.parseMaybeAssign(!1,t),this.type===li.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)&&(s=this.start,n=this.startLoc),e||(i=this.eat(li.star)));var o=this.containsEsc;return this.parsePropertyName(a),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(a)?(r=!0,i=this.options.ecmaVersion>=9&&this.eat(li.star),this.parsePropertyName(a,t)):r=!1,this.parsePropertyValue(a,e,i,r,s,n,t,o),this.finishNode(a,"Property")},zi.parsePropertyValue=function(e,t,i,r,s,n,a,o){if((i||r)&&this.type===li.colon&&this.unexpected(),this.eat(li.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===li.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r);else if(t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===li.comma||this.type===li.braceR||this.type===li.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=s),e.kind="init",t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===li.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(i||r)&&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")}},zi.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(li.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(li.bracketR),e.key;e.computed=!1}return e.key=this.type===li.num||this.type===li.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},zi.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},zi.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Ii(t,r.generator)|(i?128:0)),this.expect(li.parenL),r.params=this.parseBindingList(li.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},zi.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|Ii(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,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},zi.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==li.braceL,n=this.strict,a=!1;if(s)e.body=this.parseMaybeAssign(r),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()},zi.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1)if("Identifier"!==i[t].type)return!1;return!0},zi.checkParams=function(e,t){for(var i=Object.create(null),r=0,s=e.params;r<s.length;r+=1){var n=s[r];this.checkLValInnerPattern(n,1,t?null:i)}},zi.parseExprList=function(e,t,i,r){for(var s=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(li.comma),t&&this.afterTrailingComma(e))break;var a=void 0;i&&this.type===li.comma?a=null:this.type===li.ellipsis?(a=this.parseSpread(r),r&&this.type===li.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),s.push(a)}return s},zi.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===r&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,i).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},zi.parseIdent=function(e,t){var i=this.startNode();return this.type===li.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},zi.parsePrivateIdent=function(){var e=this.startNode();return this.type===li.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},zi.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===li.semi||this.canInsertSemicolon()||this.type!==li.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(li.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},zi.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 Ji=Ti.prototype;Ji.raise=function(e,t){var i=_i(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r},Ji.raiseRecoverable=Ji.raise,Ji.curPosition=function(){if(this.options.locations)return new ki(this.curLine,this.pos-this.lineStart)};var Xi=Ti.prototype,Yi=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Xi.enterScope=function(e){this.scopeStack.push(new Yi(e))},Xi.exitScope=function(){this.scopeStack.pop()},Xi.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Xi.declareName=function(e,t,i){var r=!1;if(2===t){var s=this.currentScope();r=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var n=this.currentScope();r=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){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")},Xi.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Xi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Xi.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Xi.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 Zi=function(e,t,i){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ci(e,i)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},er=Ti.prototype;function tr(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}er.startNode=function(){return new Zi(this,this.start,this.startLoc)},er.startNodeAt=function(e,t){return new Zi(this,e,t)},er.finishNode=function(e,t){return tr.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},er.finishNodeAt=function(e,t,i,r){return tr.call(this,e,t,i,r)},er.copyNode=function(e){var t=new Zi(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var ir,rr,sr="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",nr=sr+" Extended_Pictographic",ar={9:sr,10:nr,11:nr,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"},or="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",hr="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",cr=hr+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",lr=cr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",pr={9:hr,10:cr,11:lr,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"},ur={};for(var dr=0,fr=[9,10,11,12,13];dr<fr.length;dr+=1)rr=void 0,(rr=ur[ir=fr[dr]]={binary:Si(ar[ir]+" "+or),nonBinary:{General_Category:Si(or),Script:Si(pr[ir])}}).nonBinary.Script_Extensions=rr.nonBinary.Script,rr.nonBinary.gc=rr.nonBinary.General_Category,rr.nonBinary.sc=rr.nonBinary.Script,rr.nonBinary.scx=rr.nonBinary.Script_Extensions;var mr=Ti.prototype,gr=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=ur[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 yr(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function br(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function xr(e){return e>=65&&e<=90||e>=97&&e<=122}function vr(e){return xr(e)||95===e}function wr(e){return vr(e)||Sr(e)}function Sr(e){return e>=48&&e<=57}function Er(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function kr(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Cr(e){return e>=48&&e<=55}gr.prototype.reset=function(e,t,i){var r=-1!==i.indexOf("u");this.start=0|e,this.source=t+"",this.flags=i,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},gr.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},gr.prototype.at=function(e,t){void 0===t&&(t=!1);var i=this.source,r=i.length;if(e>=r)return-1;var s=i.charCodeAt(e);if(!t&&!this.switchU||s<=55295||s>=57344||e+1>=r)return s;var n=i.charCodeAt(e+1);return n>=56320&&n<=57343?(s<<10)+n-56613888:s},gr.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var i=this.source,r=i.length;if(e>=r)return r;var s,n=i.charCodeAt(e);return!t&&!this.switchU||n<=55295||n>=57344||e+1>=r||(s=i.charCodeAt(e+1))<56320||s>57343?e+1:e+2},gr.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},gr.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},gr.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},gr.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},mr.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=0;r<i.length;r++){var s=i.charAt(r);-1===t.indexOf(s)&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(s,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},mr.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},mr.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 r=i[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},mr.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")},mr.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},mr.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)},mr.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},mr.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},mr.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},mr.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return-1!==s&&s<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1},mr.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)},mr.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},mr.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},mr.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},mr.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)},mr.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},mr.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!br(t)&&(e.lastIntValue=t,e.advance(),!0)},mr.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;-1!==(i=e.current())&&!br(i);)e.advance();return e.pos!==t},mr.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))},mr.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")}},mr.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},mr.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=yr(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=yr(e.lastIntValue);return!0}return!1},mr.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),function(e){return ii(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},mr.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),function(e){return ri(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},mr.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)},mr.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},mr.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},mr.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)},mr.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},mr.regexp_eatZero=function(e){return 48===e.current()&&!Sr(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},mr.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)},mr.regexp_eatControlLetter=function(e){var t=e.current();return!!xr(t)&&(e.lastIntValue=t%32,e.advance(),!0)},mr.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var i,r=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(s&&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(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(i=e.lastIntValue)>=0&&i<=1114111)return!0;s&&e.raise("Invalid unicode escape"),e.pos=r}return!1},mr.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))},mr.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},mr.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},mr.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 r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s),!0}return!1},mr.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){vi(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")},mr.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},mr.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";vr(t=e.current());)e.lastStringValue+=yr(t),e.advance();return""!==e.lastStringValue},mr.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";wr(t=e.current());)e.lastStringValue+=yr(t),e.advance();return""!==e.lastStringValue},mr.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},mr.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},mr.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")}}},mr.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||Cr(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},mr.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)},mr.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Sr(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},mr.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},mr.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Sr(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t},mr.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Er(i=e.current());)e.lastIntValue=16*e.lastIntValue+kr(i),e.advance();return e.pos!==t},mr.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},mr.regexp_eatOctalDigit=function(e){var t=e.current();return Cr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},mr.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var s=e.current();if(!Er(s))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+kr(s),e.advance()}return!0};var _r=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Ci(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Pr=Ti.prototype;function Ar(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Ir(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Pr.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 _r(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Pr.getToken=function(){return this.next(),new _r(this)},"undefined"!=typeof Symbol&&(Pr[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===li.eof,value:t}}}}),Pr.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(li.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Pr.readToken=function(e){return ii(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Pr.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},Pr.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 r=void 0,s=t;(r=fi(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())},Pr.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!di(r);)r=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())},Pr.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&&mi.test(String.fromCharCode(e))))break e;++this.pos}}},Pr.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)},Pr.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(li.ellipsis)):(++this.pos,this.finishToken(li.dot))},Pr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(li.assign,2):this.finishOp(li.slash,1)},Pr.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=42===e?li.star:li.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++i,r=li.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(li.assign,i+1):this.finishOp(r,i)},Pr.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(li.assign,3):this.finishOp(124===e?li.logicalOR:li.logicalAND,2):61===t?this.finishOp(li.assign,2):this.finishOp(124===e?li.bitwiseOR:li.bitwiseAND,1)},Pr.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(li.assign,2):this.finishOp(li.bitwiseXOR,1)},Pr.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&&!pi.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(li.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(li.assign,2):this.finishOp(li.plusMin,1)},Pr.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(li.assign,i+1):this.finishOp(li.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(li.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Pr.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(li.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(li.arrow)):this.finishOp(61===e?li.eq:li.prefix,1)},Pr.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(li.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(li.assign,3):this.finishOp(li.coalesce,2)}return this.finishOp(li.question,1)},Pr.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,ii(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(li.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ir(e)+"'")},Pr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(li.parenL);case 41:return++this.pos,this.finishToken(li.parenR);case 59:return++this.pos,this.finishToken(li.semi);case 44:return++this.pos,this.finishToken(li.comma);case 91:return++this.pos,this.finishToken(li.bracketL);case 93:return++this.pos,this.finishToken(li.bracketR);case 123:return++this.pos,this.finishToken(li.braceL);case 125:return++this.pos,this.finishToken(li.braceR);case 58:return++this.pos,this.finishToken(li.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(li.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(li.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ir(e)+"'")},Pr.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)},Pr.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(pi.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var s=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 gr(this));o.reset(i,s,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(s,a)}catch(e){}return this.finishToken(li.regexp,{pattern:s,flags:a,value:h})},Pr.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&void 0===t,s=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(r&&95===l)s&&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 r&&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},Pr.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=Ar(this.input.slice(t,this.pos)),++this.pos):ii(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(li.num,i)},Pr.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 r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&110===r){var s=Ar(this.input.slice(t,this.pos));return++this.pos,ii(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(li.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),46!==r||i||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||i||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),ii(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(li.num,a)},Pr.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},Pr.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(di(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(li.string,t)};var Tr={};Pr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Tr)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Pr.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Tr;this.raise(e,t)},Pr.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!==li.template&&this.type!==li.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(li.template,e)):36===i?(this.pos+=2,this.finishToken(li.dollarBraceL)):(++this.pos,this.finishToken(li.backQuote));if(92===i)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(di(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}},Pr.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(li.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Pr.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 Ir(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 r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return di(t)?"":String.fromCharCode(t)}},Pr.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return null===i&&this.invalidStringToken(t,"Bad character escape sequence"),i},Pr.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(ri(s,r))this.pos+=s<=65535?1:2;else{if(92!==s)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?ii:ri)(a,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ir(a),i=this.pos}t=!1}return e+this.input.slice(i,this.pos)},Pr.readWord=function(){var e=this.readWord1(),t=li.name;return this.keywords.test(e)&&(t=hi[e]),this.finishToken(t,e)},Ti.acorn={Parser:Ti,version:"8.7.0",defaultOptions:Pi,Position:ki,SourceLocation:Ci,getLineInfo:_i,Node:Zi,TokenType:si,tokTypes:li,keywordTypes:hi,TokContext:Hi,tokContexts:qi,isIdentifierChar:ri,isIdentifierStart:ii,Token:_r,isNewLine:di,lineBreak:pi,lineBreakG:ui,nonASCIIwhitespace:mi};const Or=Ti.extend((function(e){let t=!1,i=!1,r=!1;return class extends e{parseFunction(e,t,i,r,s){return"**"===this.type.label&&(e.isSubscriptFunction=!0,this.next()),super.parseFunction(e,t,i,r,s)}isClassElementNameStart(){return"**"===this.type.label&&(t=!0,this.next()),super.isClassElementNameStart()}isAsyncProp(e){return"**"===this.type.label&&(t=!0,this.next()),super.isAsyncProp(e)}eat(e){return(r&&":"===e.label||(r||i)&&"*"===e.label)&&"**"===this.type.label?(t=!0,this.next(),!1):super.eat(e)}parseProperty(e,i){r=!0;let s=super.parseProperty(e,i);return r=!1,t&&(s.value.isSubscriptFunction=!0,t=!1),s}parseClassElement(e){i=!0;let r=super.parseClassElement(e);return i=!1,t&&(r.value.isSubscriptFunction=!0,t=!1),r}}})),Nr=e=>class extends(Ht(e)){static get subscriptParams(){return{globalsAutoObserve:["document"]}}static get subscriptMethods(){return[]}static expose(e,i){let r=t(e,"oohtml","subscripts"),s=i.name;return s||(s=[...r.keys()].filter((e=>a(e))).length),r.set(s,i),i}static implementMethod(e,t){let i=super.implementMethod(e,t);return this.expose(t,i)}static implementScript(e,t){let i=(e.textContent||"").trim();return this.expose(t,jt.call(t,i))}static doConnectedCallback(e){if("undefined"==typeof WebQit||!WebQit.Observer)return;const i=t(e,"oohtml","subscripts"),r=(e,t,r=[])=>{i.forEach((t=>t.thread(...e.map((e=>r.concat(e.path))))))};(this.subscriptParams.globalsAutoObserve||[]).forEach((t=>{WebQit.Observer.observe(globalThis[t],(e=>r(e,0,[t])),{subtree:!0,diff:!0,tags:[e,"subscript-element",t],unique:!0})})),WebQit.Observer.observe(e,(e=>r(e,0,["this"])),{subtree:!0,diff:!0,tags:[e,"subscript-element","this"],unique:!0})}static doDisconnectedCallback(e){"undefined"!=typeof WebQit&&WebQit.Observer&&((this.subscriptParams.globalsAutoObserve||[]).forEach((t=>{WebQit.Observer.unobserve(globalThis[t],null,null,{subtree:!0,tags:[e,"subscript-element",t]})})),WebQit.Observer.unobserve(e,null,null,{subtree:!0,tags:[e,"subscript-element","this"]}))}connectedCallback(){this.constructor.doConnectedCallback(this),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){this.constructor.doDisconnectedCallback(this),super.disconnectedCallback&&super.disconnectedCallback()}get subscripts(){return t(this,"oohtml","subscripts")}};function Lr(e=null,i=!1){const r=Oe.call(this);if(i)return void r.DOM.ready((()=>{Lr.call(this,e,!1)}));const s=r.DOM.mutations,n=We.call(this,{selectors:{script:'script[type="subscript"]'},api:{bind:"bind",unbind:"unbind"},script:{}},e),a=Nr(class{});s.onPresent(n.get("selectors.script"),(e=>{let i=e.parentNode;if(!i)return;let r=t(i,"oohtml","subscript").get("embeds");if(r||(r=new WeakSet,t(i,"oohtml","subscript").set("embeds",r)),r.has(e))return;a.implementScript(e,i)(),a.doConnectedCallback(i),r.add(e);let n=s.onRemoved(i,(()=>{a.doDisconnectedCallback(i),r.delete(e),n.disconnect()}),{ignoreTransients:!0})})),r.OOHTML||(r.OOHTML={}),r.OOHTML.SubscriptElement=Nr}(function(e=null,t=!1){const i=Oe.call(this);i.OOHTML||(i.OOHTML={},Ke.call(this,e,t),Je.call(this,e,t),et.call(this,e,t),tt.call(this,e,t),Lr.call(this,e,t),i.Observer=ae)}).call(window)})();
2
2
  //# sourceMappingURL=main.js.map