mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
30 lines
223 KiB
JavaScript
30 lines
223 KiB
JavaScript
"use strict";(()=>{var or=Object.create;var mt=Object.defineProperty;var cr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var lr=Object.getPrototypeOf,ur=Object.prototype.hasOwnProperty;var hr=(t,e,i)=>e in t?mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ui=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yt=(t,e)=>{for(var i in e)mt(t,i,{get:e[i],enumerable:!0})},dr=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of pr(e))!ur.call(t,r)&&r!==i&&mt(t,r,{get:()=>e[r],enumerable:!(n=cr(e,r))||n.enumerable});return t};var Bt=(t,e,i)=>(i=t!=null?or(lr(t)):{},dr(e||!t||!t.__esModule?mt(i,"default",{value:t,enumerable:!0}):i,t));var Ut=(t,e,i)=>(hr(t,typeof e!="symbol"?e+"":e,i),i);var jt=ui((Tn,di)=>{"use strict";function B(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function hi(t,e){for(var i="",n=0,r=-1,s=0,o,a=0;a<=t.length;++a){if(a<t.length)o=t.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(r===a-1||s===1))if(r!==a-1&&s===2){if(i.length<2||n!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var p=i.lastIndexOf("/");if(p!==i.length-1){p===-1?(i="",n=0):(i=i.slice(0,p),n=i.length-1-i.lastIndexOf("/")),r=a,s=0;continue}}else if(i.length===2||i.length===1){i="",n=0,r=a,s=0;continue}}e&&(i.length>0?i+="/..":i="..",n=2)}else i.length>0?i+="/"+t.slice(r+1,a):i=t.slice(r+1,a),n=a-r-1;r=a,s=0}else o===46&&s!==-1?++s:s=-1}return i}function mr(t,e){var i=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return i?i===e.root?i+n:i+t+n:n}var z={resolve:function(){for(var e="",i=!1,n,r=arguments.length-1;r>=-1&&!i;r--){var s;r>=0?s=arguments[r]:(n===void 0&&(n=process.cwd()),s=n),B(s),s.length!==0&&(e=s+"/"+e,i=s.charCodeAt(0)===47)}return e=hi(e,!i),i?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(B(e),e.length===0)return".";var i=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=hi(e,!i),e.length===0&&!i&&(e="."),e.length>0&&n&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return B(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,i=0;i<arguments.length;++i){var n=arguments[i];B(n),n.length>0&&(e===void 0?e=n:e+="/"+n)}return e===void 0?".":z.normalize(e)},relative:function(e,i){if(B(e),B(i),e===i||(e=z.resolve(e),i=z.resolve(i),e===i))return"";for(var n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var r=e.length,s=r-n,o=1;o<i.length&&i.charCodeAt(o)===47;++o);for(var a=i.length,p=a-o,u=s<p?s:p,h=-1,m=0;m<=u;++m){if(m===u){if(p>u){if(i.charCodeAt(o+m)===47)return i.slice(o+m+1);if(m===0)return i.slice(o+m)}else s>u&&(e.charCodeAt(n+m)===47?h=m:m===0&&(h=0));break}var g=e.charCodeAt(n+m),w=i.charCodeAt(o+m);if(g!==w)break;g===47&&(h=m)}var E="";for(m=n+h+1;m<=r;++m)(m===r||e.charCodeAt(m)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+i.slice(o+h):(o+=h,i.charCodeAt(o)===47&&++o,i.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(B(e),e.length===0)return".";for(var i=e.charCodeAt(0),n=i===47,r=-1,s=!0,o=e.length-1;o>=1;--o)if(i=e.charCodeAt(o),i===47){if(!s){r=o;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":e.slice(0,r)},basename:function(e,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');B(e);var n=0,r=-1,s=!0,o;if(i!==void 0&&i.length>0&&i.length<=e.length){if(i.length===e.length&&i===e)return"";var a=i.length-1,p=-1;for(o=e.length-1;o>=0;--o){var u=e.charCodeAt(o);if(u===47){if(!s){n=o+1;break}}else p===-1&&(s=!1,p=o+1),a>=0&&(u===i.charCodeAt(a)?--a===-1&&(r=o):(a=-1,r=p))}return n===r?r=p:r===-1&&(r=e.length),e.slice(n,r)}else{for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!s){n=o+1;break}}else r===-1&&(s=!1,r=o+1);return r===-1?"":e.slice(n,r)}},extname:function(e){B(e);for(var i=-1,n=0,r=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var p=e.charCodeAt(a);if(p===47){if(!s){n=a+1;break}continue}r===-1&&(s=!1,r=a+1),p===46?i===-1?i=a:o!==1&&(o=1):i!==-1&&(o=-1)}return i===-1||r===-1||o===0||o===1&&i===r-1&&i===n+1?"":e.slice(i,r)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return mr("/",e)},parse:function(e){B(e);var i={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return i;var n=e.charCodeAt(0),r=n===47,s;r?(i.root="/",s=1):s=0;for(var o=-1,a=0,p=-1,u=!0,h=e.length-1,m=0;h>=s;--h){if(n=e.charCodeAt(h),n===47){if(!u){a=h+1;break}continue}p===-1&&(u=!1,p=h+1),n===46?o===-1?o=h:m!==1&&(m=1):o!==-1&&(m=-1)}return o===-1||p===-1||m===0||m===1&&o===p-1&&o===a+1?p!==-1&&(a===0&&r?i.base=i.name=e.slice(1,p):i.base=i.name=e.slice(a,p)):(a===0&&r?(i.name=e.slice(1,o),i.base=e.slice(1,p)):(i.name=e.slice(a,o),i.base=e.slice(a,p)),i.ext=e.slice(o,p)),a>0?i.dir=e.slice(0,a-1):r&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};z.posix=z;di.exports=z});var Di=ui((ws,rt)=>{"use strict";var K={decodeValues:!0,map:!1,silent:!1};function oe(t){return typeof t=="string"&&!!t.trim()}function ce(t,e){var i=t.split(";").filter(oe),n=i.shift(),r=on(n),s=r.name,o=r.value;e=e?Object.assign({},K,e):K;try{o=e.decodeValues?decodeURIComponent(o):o}catch(p){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+o+"'. Set options.decodeValues to false to disable this feature.",p)}var a={name:s,value:o};return i.forEach(function(p){var u=p.split("="),h=u.shift().trimLeft().toLowerCase(),m=u.join("=");h==="expires"?a.expires=new Date(m):h==="max-age"?a.maxAge=parseInt(m,10):h==="secure"?a.secure=!0:h==="httponly"?a.httpOnly=!0:h==="samesite"?a.sameSite=m:a[h]=m}),a}function on(t){var e="",i="",n=t.split("=");return n.length>1?(e=n.shift(),i=n.join("=")):i=t,{name:e,value:i}}function Oi(t,e){if(e=e?Object.assign({},K,e):K,!t)return e.map?{}:[];if(t.headers)if(typeof t.headers.getSetCookie=="function")t=t.headers.getSetCookie();else if(t.headers["set-cookie"])t=t.headers["set-cookie"];else{var i=t.headers[Object.keys(t.headers).find(function(r){return r.toLowerCase()==="set-cookie"})];!i&&t.headers.cookie&&!e.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),t=i}if(Array.isArray(t)||(t=[t]),e=e?Object.assign({},K,e):K,e.map){var n={};return t.filter(oe).reduce(function(r,s){var o=ce(s,e);return r[o.name]=o,r},n)}else return t.filter(oe).map(function(r){return ce(r,e)})}function cn(t){if(Array.isArray(t))return t;if(typeof t!="string")return[];var e=[],i=0,n,r,s,o,a;function p(){for(;i<t.length&&/\s/.test(t.charAt(i));)i+=1;return i<t.length}function u(){return r=t.charAt(i),r!=="="&&r!==";"&&r!==","}for(;i<t.length;){for(n=i,a=!1;p();)if(r=t.charAt(i),r===","){for(s=i,i+=1,p(),o=i;i<t.length&&u();)i+=1;i<t.length&&t.charAt(i)==="="?(a=!0,i=o,e.push(t.substring(n,s)),n=i):i=s+1}else i+=1;(!a||i>=t.length)&&e.push(t.substring(n,t.length))}return e}rt.exports=Oi;rt.exports.parse=Oi;rt.exports.parseString=ce;rt.exports.splitCookiesString=cn});var yi=Bt(jt()),ft={"application/ecmascript":{source:"apache",compressible:!0,extensions:["ecma"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/http":{source:"iana"},"application/javascript":{source:"apache",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/mp4":{source:"iana",extensions:["mp4","mpg4","mp4s","m4p"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/sql":{source:"iana",extensions:["sql"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-gzip":{source:"apache"},"application/x-javascript":{compressible:!0},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/red":{source:"iana"},"audio/rtx":{source:"iana"},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/webp":{source:"iana",extensions:["webp"]},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/ecmascript":{source:"apache"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"text/markdown":{source:"iana",compressible:!0,extensions:["md","markdown"]}},fi=/^\s*([^;\s]*)(?:;|\s|$)/,yr=/^text\//i,O={};function mi(t){if(!t||typeof t!="string")return!1;var e=fi.exec(t),i=e&&ft[e[1].toLowerCase()];return i&&i.charset?i.charset:!(!e||!yr.test(e[1]))&&"UTF-8"}function fr(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?O.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var i=O.charset(e);i&&(e+="; charset="+i.toLowerCase())}return e}function gr(t){if(!t||typeof t!="string")return!1;var e=fi.exec(t),i=e&&O.extensions[e[1].toLowerCase()];return!(!i||!i.length)&&i[0]}function _r(t){if(!t||typeof t!="string")return!1;var e=(0,yi.extname)("x."+t).toLowerCase().substr(1);return e&&O.types[e]||!1}function xr(t,e){var i=["nginx","apache",void 0,"iana"];Object.keys(ft).forEach(function(n){var r=ft[n],s=r.extensions;if(s&&s.length){t[n]=s;for(var o=0;o<s.length;o++){var a=s[o];if(e[a]){var p=i.indexOf(ft[e[a]].source),u=i.indexOf(r.source);if(e[a]!=="application/octet-stream"&&(p>u||p===u&&e[a].substr(0,12)==="application/"))continue}e[a]=n}}})}O.charset=mi,O.charsets={lookup:mi},O.contentType=fr,O.extension=gr,O.extensions=Object.create(null),O.lookup=_r,O.types=Object.create(null),xr(O.extensions,O.types);var gi=O;var gn=Bt(jt(),1);var gt={};yt(gt,{deleteDB:()=>Ar,openDB:()=>zt,unwrap:()=>Z,wrap:()=>D});var wr=(t,e)=>e.some(i=>t instanceof i),_i,xi;function br(){return _i||(_i=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function vr(){return xi||(xi=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var wi=new WeakMap,Ht=new WeakMap,bi=new WeakMap,Ft=new WeakMap,qt=new WeakMap;function Er(t){let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{i(D(t.result)),r()},o=()=>{n(t.error),r()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(i=>{i instanceof IDBCursor&&wi.set(i,t)}).catch(()=>{}),qt.set(e,t),e}function Sr(t){if(Ht.has(t))return;let e=new Promise((i,n)=>{let r=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{i(),r()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Ht.set(t,e)}var Wt={get(t,e,i){if(t instanceof IDBTransaction){if(e==="done")return Ht.get(t);if(e==="objectStoreNames")return t.objectStoreNames||bi.get(t);if(e==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return D(t[e])},set(t,e,i){return t[e]=i,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function vi(t){Wt=t(Wt)}function kr(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...i){let n=t.call(Z(this),e,...i);return bi.set(n,e.sort?e.sort():[e]),D(n)}:vr().includes(t)?function(...e){return t.apply(Z(this),e),D(wi.get(this))}:function(...e){return D(t.apply(Z(this),e))}}function Cr(t){return typeof t=="function"?kr(t):(t instanceof IDBTransaction&&Sr(t),wr(t,br())?new Proxy(t,Wt):t)}function D(t){if(t instanceof IDBRequest)return Er(t);if(Ft.has(t))return Ft.get(t);let e=Cr(t);return e!==t&&(Ft.set(t,e),qt.set(e,t)),e}var Z=t=>qt.get(t);function zt(t,e,{blocked:i,upgrade:n,blocking:r,terminated:s}={}){let o=indexedDB.open(t,e),a=D(o);return n&&o.addEventListener("upgradeneeded",p=>{n(D(o.result),p.oldVersion,p.newVersion,D(o.transaction),p)}),i&&o.addEventListener("blocked",p=>i(p.oldVersion,p.newVersion,p)),a.then(p=>{s&&p.addEventListener("close",()=>s()),r&&p.addEventListener("versionchange",u=>r(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}function Ar(t,{blocked:e}={}){let i=indexedDB.deleteDatabase(t);return e&&i.addEventListener("blocked",n=>e(n.oldVersion,n)),D(i).then(()=>{})}var Lr=["get","getKey","getAll","getAllKeys","count"],Pr=["put","add","delete","clear"],Gt=new Map;function Ei(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Gt.get(e))return Gt.get(e);let i=e.replace(/FromIndex$/,""),n=e!==i,r=Pr.includes(i);if(!(i in(n?IDBIndex:IDBObjectStore).prototype)||!(r||Lr.includes(i)))return;let s=async function(o,...a){let p=this.transaction(o,r?"readwrite":"readonly"),u=p.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[i](...a),r&&p.done]))[0]};return Gt.set(e,s),s}vi(t=>({...t,get:(e,i,n)=>Ei(e,i)||t.get(e,i,n),has:(e,i)=>!!Ei(e,i)||t.has(e,i)}));var _t={};yt(_t,{decode:()=>Kt,encode:()=>Xt});var{encode:Xt,decode:Kt}={encode(t){if(!t)return t;t=t.toString();let e=Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),i,n,r,s,o="",a=t.length%3;for(let p=0;p<t.length;){if((n=t.charCodeAt(p++))>255||(r=t.charCodeAt(p++))>255||(s=t.charCodeAt(p++))>255)throw new TypeError("invalid character found");i=n<<16|r<<8|s,o+=e[i>>18&63]+e[i>>12&63]+e[i>>6&63]+e[63&i]}return encodeURIComponent(a?o.slice(0,a-3)+"===".substr(a):o)},decode(t){if(!t)return t;let e={0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,"+":62,"/":63,"=":64},i;t=(t=decodeURIComponent(t.toString())).replace(/\s+/g,""),t+="==".slice(2-(3&t.length));let n,r,s="";for(let o=0;o<t.length;)i=e[t.charAt(o++)]<<18|e[t.charAt(o++)]<<12|(n=e[t.charAt(o++)])<<6|(r=e[t.charAt(o++)]),s+=n===64?String.fromCharCode(i>>16&255):r===64?String.fromCharCode(i>>16&255,i>>8&255):String.fromCharCode(i>>16&255,i>>8&255,255&i);return s}};function Ir(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function T(t,e,i){return t(i={path:e,exports:{},require:function(n,r){return Tr(n,r??i.path)}},i.exports),i.exports}function Tr(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var C=T(function(t,e){e.__esModule=!0,e.isIdentifierChar=function(m,g){return m<48?m===36:m<58||!(m<65)&&(m<91||(m<97?m===95:m<123||(m<=65535?m>=170&&o.test(String.fromCharCode(m)):g!==!1&&(u(m,a)||u(m,p)))))},e.isIdentifierStart=function(m,g){return m<65?m===36:m<91||(m<97?m===95:m<123||(m<=65535?m>=170&&s.test(String.fromCharCode(m)):g!==!1&&u(m,a)))},e.reservedWords=e.keywords=e.keywordRelationalOperator=void 0,e.reservedWords={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"};let i="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";e.keywords={5:i,"5module":i+" export import",6:i+" const class extends export import super"},e.keywordRelationalOperator=/^in(stanceof)?$/;let n="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",r="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",s=RegExp("["+n+"]"),o=RegExp("["+n+r+"]");n=r=null;let a=[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],p=[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 u(h,m){let g=65536;for(let w=0;w<m.length;w+=2){if((g+=m[w])>h)return!1;if((g+=m[w+1])>=h)return!0}}}),l=T(function(t,e){e.__esModule=!0,e.types=e.keywords=e.TokenType=void 0;class i{constructor(h,m={}){this.label=h,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop||null,this.updateContext=null}}function n(u,h){return new i(u,{beforeExpr:!0,binop:h})}e.TokenType=i;let r={beforeExpr:!0},s={startsExpr:!0},o={};function a(u,h={}){return h.keyword=u,o[u]=new i(u,h)}e.keywords=o;let p={num:new i("num",s),regexp:new i("regexp",s),string:new i("string",s),name:new i("name",s),privateId:new i("privateId",s),eof:new i("eof"),bracketL:new i("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new i("]"),braceL:new i("{",{beforeExpr:!0,startsExpr:!0}),braceR:new i("}"),parenL:new i("(",{beforeExpr:!0,startsExpr:!0}),parenR:new i(")"),comma:new i(",",r),semi:new i(";",r),colon:new i(":",r),dot:new i("."),question:new i("?",r),questionDot:new i("?."),arrow:new i("=>",r),template:new i("template"),invalidTemplate:new i("invalidTemplate"),ellipsis:new i("...",r),backQuote:new i("`",s),dollarBraceL:new i("${",{beforeExpr:!0,startsExpr:!0}),eq:new i("=",{beforeExpr:!0,isAssign:!0}),assign:new i("_=",{beforeExpr:!0,isAssign:!0}),incDec:new i("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new i("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:n("||",1),logicalAND:n("&&",2),bitwiseOR:n("|",3),bitwiseXOR:n("^",4),bitwiseAND:n("&",5),equality:n("==/!=/===/!==",6),relational:n("</>/<=/>=",7),bitShift:n("<</>>/>>>",8),plusMin:new i("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:n("%",10),star:n("*",10),slash:n("/",10),starstar:new i("**",{beforeExpr:!0}),coalesce:n("??",1),_break:a("break"),_case:a("case",r),_catch:a("catch"),_continue:a("continue"),_debugger:a("debugger"),_default:a("default",r),_do:a("do",{isLoop:!0,beforeExpr:!0}),_else:a("else",r),_finally:a("finally"),_for:a("for",{isLoop:!0}),_function:a("function",s),_if:a("if"),_return:a("return",r),_switch:a("switch"),_throw:a("throw",r),_try:a("try"),_var:a("var"),_const:a("const"),_while:a("while",{isLoop:!0}),_with:a("with"),_new:a("new",{beforeExpr:!0,startsExpr:!0}),_this:a("this",s),_super:a("super",s),_class:a("class",s),_extends:a("extends",r),_export:a("export"),_import:a("import",s),_null:a("null",s),_true:a("true",s),_false:a("false",s),_in:a("in",{beforeExpr:!0,binop:7}),_instanceof:a("instanceof",{beforeExpr:!0,binop:7}),_typeof:a("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:a("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:a("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})};e.types=p}),S=T(function(t,e){e.__esModule=!0,e.isNewLine=r,e.lineBreakG=e.lineBreak=void 0,e.nextLineBreak=function(o,a,p=o.length){for(let u=a;u<p;u++){let h=o.charCodeAt(u);if(r(h))return u<p-1&&h===13&&o.charCodeAt(u+1)===10?u+2:u+1}return-1},e.skipWhiteSpace=e.nonASCIIwhitespace=void 0;let i=/\r\n?|\n|\u2028|\u2029/;e.lineBreak=i;let n=RegExp(i.source,"g");function r(s){return s===10||s===13||s===8232||s===8233}e.lineBreakG=n,e.nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,e.skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g}),I=T(function(t,e){e.__esModule=!0,e.loneSurrogate=e.isArray=e.hasOwn=void 0,e.wordsRegexp=function(p){return RegExp("^(?:"+p.replace(/ /g,"|")+")$")};let i=Object.prototype,n=i.hasOwnProperty,r=i.toString,s=Object.hasOwn||((a,p)=>n.call(a,p));e.hasOwn=s;let o=Array.isArray||(a=>r.call(a)==="[object Array]");e.isArray=o,e.loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/}),V=T(function(t,e){e.__esModule=!0,e.SourceLocation=e.Position=void 0,e.getLineInfo=function(r,s){for(let o=1,a=0;;){let p=(0,S.nextLineBreak)(r,a,s);if(p<0)return new i(o,s-a);++o,a=p}};class i{constructor(r,s){this.line=r,this.column=s}offset(r){return new i(this.line,this.column+r)}}e.Position=i,e.SourceLocation=class{constructor(r,s,o){this.start=s,this.end=o,r.sourceFile!==null&&(this.source=r.sourceFile)}}}),Yt=T(function(t,e){e.__esModule=!0,e.defaultOptions=void 0,e.getOptions=function(s){var o,a;let p={};for(let u in i)p[u]=s&&(0,I.hasOwn)(s,u)?s[u]:i[u];if(p.ecmaVersion==="latest"?p.ecmaVersion=1e8:p.ecmaVersion==null?(!n&&typeof console=="object"&&console.warn&&(n=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
Defaulting to 2020, but this will stop working in the future.`)),p.ecmaVersion=11):p.ecmaVersion>=2015&&(p.ecmaVersion-=2009),p.allowReserved==null&&(p.allowReserved=p.ecmaVersion<5),(0,I.isArray)(p.onToken)){let u=p.onToken;p.onToken=h=>u.push(h)}return(0,I.isArray)(p.onComment)&&(p.onComment=(o=p,a=p.onComment,function(u,h,m,g,w,E){let c={type:u?"Block":"Line",value:h,start:m,end:g};o.locations&&(c.loc=new V.SourceLocation(this,w,E)),o.ranges&&(c.range=[m,g]),a.push(c)})),p};let i={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};e.defaultOptions=i;let n=!1}),_=T(function(t,e){e.__esModule=!0,e.SCOPE_VAR=e.SCOPE_TOP=e.SCOPE_SUPER=e.SCOPE_SIMPLE_CATCH=e.SCOPE_GENERATOR=e.SCOPE_FUNCTION=e.SCOPE_DIRECT_SUPER=e.SCOPE_CLASS_STATIC_BLOCK=e.SCOPE_ASYNC=e.SCOPE_ARROW=e.BIND_VAR=e.BIND_SIMPLE_CATCH=e.BIND_OUTSIDE=e.BIND_NONE=e.BIND_LEXICAL=e.BIND_FUNCTION=void 0,e.functionFlags=function(n,r){return 2|(n?4:0)|(r?8:0)},e.SCOPE_VAR=259,e.SCOPE_CLASS_STATIC_BLOCK=256,e.SCOPE_DIRECT_SUPER=128,e.SCOPE_SUPER=64,e.SCOPE_SIMPLE_CATCH=32,e.SCOPE_ARROW=16,e.SCOPE_GENERATOR=8,e.SCOPE_ASYNC=4,e.SCOPE_FUNCTION=2,e.SCOPE_TOP=1,e.BIND_OUTSIDE=5,e.BIND_SIMPLE_CATCH=4,e.BIND_FUNCTION=3,e.BIND_LEXICAL=2,e.BIND_VAR=1,e.BIND_NONE=0}),P=T(function(t,e){e.__esModule=!0,e.Parser=void 0,e.Parser=class{constructor(n,r,s){this.options=n=(0,Yt.getOptions)(n),this.sourceFile=n.sourceFile,this.keywords=(0,I.wordsRegexp)(C.keywords[n.ecmaVersion>=6?6:n.sourceType==="module"?"5module":5]);let o="";n.allowReserved!==!0&&(o=C.reservedWords[n.ecmaVersion>=6?6:n.ecmaVersion===5?5:3],n.sourceType==="module"&&(o+=" await")),this.reservedWords=(0,I.wordsRegexp)(o);let a=(o?o+" ":"")+C.reservedWords.strict;this.reservedWordsStrict=(0,I.wordsRegexp)(a),this.reservedWordsStrictBind=(0,I.wordsRegexp)(a+" "+C.reservedWords.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
|
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(S.lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=l.types.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=n.sourceType==="module",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),this.pos===0&&n.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(_.SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]}parse(){let n=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(n)}get inFunction(){return(this.currentVarScope().flags&_.SCOPE_FUNCTION)>0}get inGenerator(){return(this.currentVarScope().flags&_.SCOPE_GENERATOR)>0&&!this.currentVarScope().inClassFieldInit}get inAsync(){return(this.currentVarScope().flags&_.SCOPE_ASYNC)>0&&!this.currentVarScope().inClassFieldInit}get canAwait(){for(let n=this.scopeStack.length-1;n>=0;n--){let r=this.scopeStack[n];if(r.inClassFieldInit||r.flags&_.SCOPE_CLASS_STATIC_BLOCK)return!1;if(r.flags&_.SCOPE_FUNCTION)return(r.flags&_.SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction}get allowSuper(){let n=this.currentThisScope(),r=n.flags,s=n.inClassFieldInit;return(r&_.SCOPE_SUPER)>0||s||this.options.allowSuperOutsideMethod}get allowDirectSuper(){return(this.currentThisScope().flags&_.SCOPE_DIRECT_SUPER)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}get allowNewDotTarget(){let n=this.currentThisScope(),r=n.flags,s=n.inClassFieldInit;return(r&(_.SCOPE_FUNCTION|_.SCOPE_CLASS_STATIC_BLOCK))>0||s}get inClassStaticBlock(){return(this.currentVarScope().flags&_.SCOPE_CLASS_STATIC_BLOCK)>0}static extend(...n){let r=this;for(let s=0;s<n.length;s++)r=n[s](r);return r}static parse(n,r){return new this(r,n).parse()}static parseExpressionAt(n,r,s){let o=new this(s,n,r);return o.nextToken(),o.parseExpression()}static tokenizer(n,r){return new this(r,n)}}}),bt=T(function(t,e){e.__esModule=!0,e.DestructuringErrors=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};let i=P.Parser.prototype,n=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;i.strictDirective=function(r){for(;;){S.skipWhiteSpace.lastIndex=r,r+=S.skipWhiteSpace.exec(this.input)[0].length;let s=n.exec(this.input.slice(r));if(!s||(s[1]||s[2])==="use strict")return!1;r+=s[0].length,S.skipWhiteSpace.lastIndex=r,r+=S.skipWhiteSpace.exec(this.input)[0].length,this.input[r]===";"&&r++}},i.eat=function(r){return this.type===r&&(this.next(),!0)},i.isContextual=function(r){return this.type===l.types.name&&this.value===r&&!this.containsEsc},i.eatContextual=function(r){return!!this.isContextual(r)&&(this.next(),!0)},i.expectContextual=function(r){this.eatContextual(r)||this.unexpected()},i.canInsertSemicolon=function(){return this.type===l.types.eof||this.type===l.types.braceR||S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},i.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},i.semicolon=function(){this.eat(l.types.semi)||this.insertSemicolon()||this.unexpected()},i.afterTrailingComma=function(r,s){if(this.type===r)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),s||this.next(),!0},i.expect=function(r){this.eat(r)||this.unexpected()},i.unexpected=function(r){this.raise(r??this.start,"Unexpected token")},i.checkPatternErrors=function(r,s){if(!r)return;r.trailingComma>-1&&this.raiseRecoverable(r.trailingComma,"Comma is not permitted after the rest element");let o=s?r.parenthesizedAssign:r.parenthesizedBind;o>-1&&this.raiseRecoverable(o,"Parenthesized pattern")},i.checkExpressionErrors=function(r,s){if(!r)return!1;let o=r.shorthandAssign,a=r.doubleProto;if(!s)return o>=0||a>=0;o>=0&&this.raise(o,"Shorthand property assignments are valid only in destructuring patterns"),a>=0&&this.raiseRecoverable(a,"Redefinition of __proto__ property")},i.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")},i.isSimpleAssignTarget=function(r){return r.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(r.expression):r.type==="Identifier"||r.type==="MemberExpression"}});function J(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=Rr(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rr(t,e){if(t){if(typeof t=="string")return Si(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Si(t,e)}}function Si(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var x=P.Parser.prototype;x.parseTopLevel=function(t){let e=Object.create(null);for(t.body||(t.body=[]);this.type!==l.types.eof;){let r=this.parseStatement(null,!0,e);t.body.push(r)}if(this.inModule)for(var i=0,n=Object.keys(this.undefinedExports);i<n.length;i++){let r=n[i];this.raiseRecoverable(this.undefinedExports[r].start,`Export '${r}' is not defined`)}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var Zt={kind:"loop"},Nr={kind:"switch"};x.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.skipWhiteSpace.lastIndex=this.pos;let e=S.skipWhiteSpace.exec(this.input),i=this.pos+e[0].length,n=this.input.charCodeAt(i);if(n===91||n===92||n>55295&&n<56320)return!0;if(t)return!1;if(n===123)return!0;if((0,C.isIdentifierStart)(n,!0)){let r=i+1;for(;(0,C.isIdentifierChar)(n=this.input.charCodeAt(r),!0);)++r;if(n===92||n>55295&&n<56320)return!0;let s=this.input.slice(i,r);if(!C.keywordRelationalOperator.test(s))return!0}return!1},x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.skipWhiteSpace.lastIndex=this.pos;let t=S.skipWhiteSpace.exec(this.input),e=this.pos+t[0].length,i;return!S.lineBreak.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!((0,C.isIdentifierChar)(i=this.input.charCodeAt(e+8))||i>55295&&i<56320))},x.parseStatement=function(t,e,i){let n=this.type,r=this.startNode(),s;switch(this.isLet(t)&&(n=l.types._var,s="let"),n){case l.types._break:case l.types._continue:return this.parseBreakContinueStatement(r,n.keyword);case l.types._debugger:return this.parseDebuggerStatement(r);case l.types._do:return this.parseDoStatement(r);case l.types._for:return this.parseForStatement(r);case l.types._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case l.types._class:return t&&this.unexpected(),this.parseClass(r,!0);case l.types._if:return this.parseIfStatement(r);case l.types._return:return this.parseReturnStatement(r);case l.types._switch:return this.parseSwitchStatement(r);case l.types._throw:return this.parseThrowStatement(r);case l.types._try:return this.parseTryStatement(r);case l.types._const:case l.types._var:return s=s||this.value,t&&s!=="var"&&this.unexpected(),this.parseVarStatement(r,s);case l.types._while:return this.parseWhileStatement(r);case l.types._with:return this.parseWithStatement(r);case l.types.braceL:return this.parseBlock(!0,r);case l.types.semi:return this.parseEmptyStatement(r);case l.types._export:case l.types._import:if(this.options.ecmaVersion>10&&n===l.types._import){S.skipWhiteSpace.lastIndex=this.pos;let p=S.skipWhiteSpace.exec(this.input),u=this.pos+p[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||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'")),n===l.types._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);let o=this.value,a=this.parseExpression();return n===l.types.name&&a.type==="Identifier"&&this.eat(l.types.colon)?this.parseLabeledStatement(r,o,a,t):this.parseExpressionStatement(r,a)}},x.parseBreakContinueStatement=function(t,e){let i=e==="break";this.next(),this.eat(l.types.semi)||this.insertSemicolon()?t.label=null:this.type!==l.types.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());let n=0;for(;n<this.labels.length;++n){let r=this.labels[n];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||t.label&&i))break}return n===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},x.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},x.parseDoStatement=function(t){return this.next(),this.labels.push(Zt),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(l.types._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(l.types.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},x.parseForStatement=function(t){this.next();let e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Zt),this.enterScope(0),this.expect(l.types.parenL),this.type===l.types.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);let i=this.isLet();if(this.type===l.types._var||this.type===l.types._const||i){let a=this.startNode(),p=i?"let":this.value;return this.next(),this.parseVar(a,!0,p),this.finishNode(a,"VariableDeclaration"),(this.type===l.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&a.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===l.types._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,a)):(e>-1&&this.unexpected(e),this.parseFor(t,a))}let n=this.isContextual("let"),r=!1,s=new bt.DestructuringErrors,o=this.parseExpression(!(e>-1)||"await",s);return this.type===l.types._in||(r=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===l.types._in?e>-1&&this.unexpected(e):t.await=e>-1),n&&r&&this.raise(o.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(o,!1,s),this.checkLValPattern(o),this.parseForIn(t,o)):(this.checkExpressionErrors(s,!0),e>-1&&this.unexpected(e),this.parseFor(t,o))},x.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,tt|(i?0:Jt),!1,e)},x.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(l.types._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},x.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(l.types.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},x.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(l.types.braceL),this.labels.push(Nr),this.enterScope(0);let e;for(let i=!1;this.type!==l.types.braceR;)if(this.type===l.types._case||this.type===l.types._default){let n=this.type===l.types._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),n?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(l.types.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},x.parseThrowStatement=function(t){return this.next(),S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Or=[];x.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===l.types._catch){let e=this.startNode();if(this.next(),this.eat(l.types.parenL)){e.param=this.parseBindingAtom();let i=e.param.type==="Identifier";this.enterScope(i?_.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(e.param,i?_.BIND_SIMPLE_CATCH:_.BIND_LEXICAL),this.expect(l.types.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(l.types._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},x.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},x.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Zt),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},x.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},x.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},x.parseLabeledStatement=function(t,e,i,n){for(var r,s=J(this.labels);!(r=s()).done;)r.value.name===e&&this.raise(i.start,"Label '"+e+"' is already declared");let o=this.type.isLoop?"loop":this.type===l.types._switch?"switch":null;for(let a=this.labels.length-1;a>=0;a--){let p=this.labels[a];if(p.statementStart===t.start)p.statementStart=this.start,p.kind=o;else break}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},x.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},x.parseBlock=function(t=!0,e=this.startNode(),i){for(e.body=[],this.expect(l.types.braceL),t&&this.enterScope(0);this.type!==l.types.braceR;){let n=this.parseStatement(null);e.body.push(n)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},x.parseFor=function(t,e){return t.init=e,this.expect(l.types.semi),t.test=this.type===l.types.semi?null:this.parseExpression(),this.expect(l.types.semi),t.update=this.type===l.types.parenR?null:this.parseExpression(),this.expect(l.types.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},x.parseForIn=function(t,e){let i=this.type===l.types._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,`${i?"for-in":"for-of"} loop variable declaration may not have an initializer`),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(l.types.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},x.parseVar=function(t,e,i){for(t.declarations=[],t.kind=i;;){let n=this.startNode();if(this.parseVarId(n,i),this.eat(l.types.eq)?n.init=this.parseMaybeAssign(e):i!=="const"||this.type===l.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")?n.id.type==="Identifier"||e&&(this.type===l.types._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(l.types.comma))break}return t},x.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?_.BIND_VAR:_.BIND_LEXICAL,!1)};var tt=1,Jt=2;function Dr(t,e){let i=e.key.name,n=t[i],r="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(r=(e.static?"s":"i")+e.kind),n==="iget"&&r==="iset"||n==="iset"&&r==="iget"||n==="sget"&&r==="sset"||n==="sset"&&r==="sget"?(t[i]="true",!1):!!n||(t[i]=r,!1)}function xt(t,e){let i=t.computed,n=t.key;return!i&&(n.type==="Identifier"&&n.name===e||n.type==="Literal"&&n.value===e)}function Qt(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=Mr(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mr(t,e){if(t){if(typeof t=="string")return ki(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ki(t,e)}}function ki(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}x.parseFunction=function(t,e,i,n,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===l.types.star&&e&Jt&&this.unexpected(),t.generator=this.eat(l.types.star)),this.options.ecmaVersion>=8&&(t.async=!!n),e&tt&&(t.id=4&e&&this.type!==l.types.name?null:this.parseIdent(),t.id&&!(e&Jt)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?_.BIND_VAR:_.BIND_LEXICAL:_.BIND_FUNCTION));let s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,_.functionFlags)(t.async,t.generator)),e&tt||(t.id=this.type===l.types.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(t,e&tt?"FunctionDeclaration":"FunctionExpression")},x.parseFunctionParams=function(t){this.expect(l.types.parenL),t.params=this.parseBindingList(l.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},x.parseClass=function(t,e){this.next();let i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);let n=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(l.types.braceL);this.type!==l.types.braceR;){let o=this.parseClassElement(t.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&Dr(n,o)&&this.raiseRecoverable(o.key.start,`Identifier '#${o.key.name}' has already been declared`))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},x.parseClassElement=function(t){if(this.eat(l.types.semi))return null;let e=this.options.ecmaVersion,i=this.startNode(),n="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(l.types.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===l.types.star?a=!0:n="static"}if(i.static=a,!n&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===l.types.star)&&!this.canInsertSemicolon()?s=!0:n="async"),!n&&(e>=9||!s)&&this.eat(l.types.star)&&(r=!0),!n&&!s&&!r){let p=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=p:n=p)}if(n?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=n,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===l.types.parenL||o!=="method"||r||s){let p=!i.static&&xt(i,"constructor");p&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=p?"constructor":o,this.parseClassMethod(i,r,s,p&&t)}else this.parseClassField(i);return i},x.isClassElementNameStart=function(){return this.type===l.types.name||this.type===l.types.privateId||this.type===l.types.num||this.type===l.types.string||this.type===l.types.bracketL||this.type.keyword},x.parseClassElementName=function(t){this.type===l.types.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)},x.parseClassMethod=function(t,e,i,n){let r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&xt(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");let s=t.value=this.parseMethod(e,i,n);return t.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),t.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),t.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")},x.parseClassField=function(t){if(xt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&xt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(l.types.eq)){let e=this.currentThisScope(),i=e.inClassFieldInit;e.inClassFieldInit=!0,t.value=this.parseMaybeAssign(),e.inClassFieldInit=i}else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")},x.parseClassStaticBlock=function(t){t.body=[];let e=this.labels;for(this.labels=[],this.enterScope(_.SCOPE_CLASS_STATIC_BLOCK|_.SCOPE_SUPER);this.type!==l.types.braceR;){let i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")},x.parseClassId=function(t,e){this.type===l.types.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,_.BIND_LEXICAL,!1)):(e===!0&&this.unexpected(),t.id=null)},x.parseClassSuper=function(t){t.superClass=this.eat(l.types._extends)?this.parseExprSubscripts(!1):null},x.enterClassBody=function(){let t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared},x.exitClassBody=function(){let t=this.privateNameStack.pop(),e=t.declared,i=t.used,n=this.privateNameStack.length,r=n===0?null:this.privateNameStack[n-1];for(let s=0;s<i.length;++s){let o=i[s];(0,I.hasOwn)(e,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,`Private field '#${o.name}' must be declared in an enclosing class`))}},x.parseExport=function(t,e){if(this.next(),this.eat(l.types.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==l.types.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(l.types._default)){this.checkExport(e,"default",this.lastTokStart);let r;if(this.type===l.types._function||(r=this.isAsyncFunction())){let s=this.startNode();this.next(),r&&this.next(),t.declaration=this.parseFunction(s,4|tt,!1,r)}else if(this.type===l.types._class){let s=this.startNode();t.declaration=this.parseClass(s,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==l.types.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var i,n=J(t.specifiers);!(i=n()).done;){let r=i.value;this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},x.checkExport=function(t,e,i){t&&((0,I.hasOwn)(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},x.checkPatternExport=function(t,e){let i=e.type;if(i==="Identifier")this.checkExport(t,e.name,e.start);else if(i==="ObjectPattern")for(var n,r=J(e.properties);!(n=r()).done;){let a=n.value;this.checkPatternExport(t,a)}else if(i==="ArrayPattern")for(var s,o=J(e.elements);!(s=o()).done;){let a=s.value;a&&this.checkPatternExport(t,a)}else i==="Property"?this.checkPatternExport(t,e.value):i==="AssignmentPattern"?this.checkPatternExport(t,e.left):i==="RestElement"?this.checkPatternExport(t,e.argument):i==="ParenthesizedExpression"&&this.checkPatternExport(t,e.expression)},x.checkVariableExport=function(t,e){if(t)for(var i,n=J(e);!(i=n()).done;){let r=i.value;this.checkPatternExport(t,r.id)}},x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},x.parseExportSpecifiers=function(t){let e=[],i=!0;for(this.expect(l.types.braceL);!this.eat(l.types.braceR);){if(i)i=!1;else if(this.expect(l.types.comma),this.afterTrailingComma(l.types.braceR))break;let n=this.startNode();n.local=this.parseModuleExportName(),n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local,this.checkExport(t,n.exported[n.exported.type==="Identifier"?"name":"value"],n.exported.start),e.push(this.finishNode(n,"ExportSpecifier"))}return e},x.parseImport=function(t){return this.next(),this.type===l.types.string?(t.specifiers=Or,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===l.types.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},x.parseImportSpecifiers=function(){let t=[],e=!0;if(this.type===l.types.name){let i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,_.BIND_LEXICAL),t.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(l.types.comma))return t}if(this.type===l.types.star){let i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,_.BIND_LEXICAL),t.push(this.finishNode(i,"ImportNamespaceSpecifier")),t}for(this.expect(l.types.braceL);!this.eat(l.types.braceR);){if(e)e=!1;else if(this.expect(l.types.comma),this.afterTrailingComma(l.types.braceR))break;let i=this.startNode();i.imported=this.parseModuleExportName(),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLValSimple(i.local,_.BIND_LEXICAL),t.push(this.finishNode(i,"ImportSpecifier"))}return t},x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===l.types.string){let t=this.parseLiteral(this.value);return I.loneSurrogate.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)},x.adaptDirectivePrologue=function(t){for(let e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},x.isDirectiveCandidate=function(t){return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var $=P.Parser.prototype;$.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var n,r=Qt(t.properties);!(n=r()).done;){let s=n.value;this.toAssignable(s,e),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},$.toAssignableList=function(t,e){let i=t.length;for(let n=0;n<i;n++){let r=t[n];r&&this.toAssignable(r,e)}if(i){let n=t[i-1];this.options.ecmaVersion===6&&e&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return t},$.parseSpread=function(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},$.parseRestBinding=function(){let t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==l.types.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},$.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case l.types.bracketL:let t=this.startNode();return this.next(),t.elements=this.parseBindingList(l.types.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case l.types.braceL:return this.parseObj(!0)}return this.parseIdent()},$.parseBindingList=function(t,e,i){let n=[],r=!0;for(;!this.eat(t);)if(r?r=!1:this.expect(l.types.comma),e&&this.type===l.types.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===l.types.ellipsis){let s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else{let s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),n.push(s)}}return n},$.parseBindingListItem=function(t){return t},$.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(l.types.eq))return i;let n=this.startNodeAt(t,e);return n.left=i,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},$.checkLValSimple=function(t,e=_.BIND_NONE,i){let n=e!==_.BIND_NONE;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(n?"Binding ":"Assigning to ")+t.name+" in strict mode"),n&&(e===_.BIND_LEXICAL&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&((0,I.hasOwn)(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),e!==_.BIND_OUTSIDE&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":n&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(n?"Binding":"Assigning to")+" rvalue")}},$.checkLValPattern=function(t,e=_.BIND_NONE,i){switch(t.type){case"ObjectPattern":for(var n,r=Qt(t.properties);!(n=r()).done;){let a=n.value;this.checkLValInnerPattern(a,e,i)}break;case"ArrayPattern":for(var s,o=Qt(t.elements);!(s=o()).done;){let a=s.value;a&&this.checkLValInnerPattern(a,e,i)}break;default:this.checkLValSimple(t,e,i)}},$.checkLValInnerPattern=function(t,e=_.BIND_NONE,i){switch(t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var X=T(function(t,e){e.__esModule=!0,e.types=e.TokContext=void 0;class i{constructor(o,a,p,u,h){this.token=o,this.isExpr=!!a,this.preserveSpace=!!p,this.override=u,this.generator=!!h}}e.TokContext=i;let n={b_stat:new i("{",!1),b_expr:new i("{",!0),b_tmpl:new i("${",!1),p_stat:new i("(",!1),p_expr:new i("(",!0),q_tmpl:new i("`",!0,!0,s=>s.tryReadTemplateToken()),f_stat:new i("function",!1),f_expr:new i("function",!0),f_expr_gen:new i("function",!0,!1,null,!0),f_gen:new i("function",!1,!1,null,!0)};e.types=n;let r=P.Parser.prototype;r.initialContext=function(){return[n.b_stat]},r.curContext=function(){return this.context[this.context.length-1]},r.braceIsBlock=function(s){let o=this.curContext();return o===n.f_expr||o===n.f_stat||(s===l.types.colon&&(o===n.b_stat||o===n.b_expr)?!o.isExpr:s===l.types._return||s===l.types.name&&this.exprAllowed?S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):s===l.types._else||s===l.types.semi||s===l.types.eof||s===l.types.parenR||s===l.types.arrow||(s===l.types.braceL?o===n.b_stat:s!==l.types._var&&s!==l.types._const&&s!==l.types.name&&!this.exprAllowed))},r.inGeneratorContext=function(){for(let s=this.context.length-1;s>=1;s--){let o=this.context[s];if(o.token==="function")return o.generator}return!1},r.updateContext=function(s){let o,a=this.type;a.keyword&&s===l.types.dot?this.exprAllowed=!1:(o=a.updateContext)?o.call(this,s):this.exprAllowed=a.beforeExpr},r.overrideContext=function(s){this.curContext()!==s&&(this.context[this.context.length-1]=s)},l.types.parenR.updateContext=l.types.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}let s=this.context.pop();s===n.b_stat&&this.curContext().token==="function"&&(s=this.context.pop()),this.exprAllowed=!s.isExpr},l.types.braceL.updateContext=function(s){this.context.push(this.braceIsBlock(s)?n.b_stat:n.b_expr),this.exprAllowed=!0},l.types.dollarBraceL.updateContext=function(){this.context.push(n.b_tmpl),this.exprAllowed=!0},l.types.parenL.updateContext=function(s){let o=s===l.types._if||s===l.types._for||s===l.types._with||s===l.types._while;this.context.push(o?n.p_stat:n.p_expr),this.exprAllowed=!0},l.types.incDec.updateContext=function(){},l.types._function.updateContext=l.types._class.updateContext=function(s){!s.beforeExpr||s===l.types._else||s===l.types.semi&&this.curContext()!==n.p_stat||s===l.types._return&&S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(s===l.types.colon||s===l.types.braceL)&&this.curContext()===n.b_stat?this.context.push(n.f_stat):this.context.push(n.f_expr),this.exprAllowed=!1},l.types.backQuote.updateContext=function(){this.curContext()===n.q_tmpl?this.context.pop():this.context.push(n.q_tmpl),this.exprAllowed=!1},l.types.star.updateContext=function(s){if(s===l.types._function){let o=this.context.length-1;this.context[o]===n.f_expr?this.context[o]=n.f_expr_gen:this.context[o]=n.f_gen}this.exprAllowed=!0},l.types.name.updateContext=function(s){let o=!1;this.options.ecmaVersion>=6&&s!==l.types.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(o=!0),this.exprAllowed=o}});function Ci(t,e){var i=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=$r(t))||e&&t&&typeof t.length=="number"){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $r(t,e){if(t){if(typeof t=="string")return Ai(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ai(t,e)}}function Ai(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var v=P.Parser.prototype;function Ii(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&Ii(t.expression)}v.checkPropClash=function(t,e,i){if(this.options.ecmaVersion>=9&&t.type==="SpreadElement"||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))return;let n=t.key,r;switch(n.type){case"Identifier":r=n.name;break;case"Literal":r=String(n.value);break;default:return}let s=t.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&s==="init"&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),e.proto=!0);return}let o=e[r="$"+r];if(o){let a;(a=s==="init"?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(n.start,"Redefinition of property")}else o=e[r]={init:!1,get:!1,set:!1};o[s]=!0},v.parseExpression=function(t,e){let i=this.start,n=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===l.types.comma){let s=this.startNodeAt(i,n);for(s.expressions=[r];this.eat(l.types.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return r},v.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}let n=!1,r=-1,s=-1,o=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new bt.DestructuringErrors,n=!0);let a=this.start,p=this.startLoc;(this.type===l.types.parenL||this.type===l.types.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");let u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,a,p)),this.type.isAssign){let h=this.startNodeAt(a,p);return h.operator=this.value,this.type===l.types.eq&&(u=this.toAssignable(u,!1,e)),n||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=u.start&&(e.shorthandAssign=-1),this.type===l.types.eq?this.checkLValPattern(u):this.checkLValSimple(u),h.left=u,this.next(),h.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(h,"AssignmentExpression")}return n&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),u},v.parseMaybeConditional=function(t,e){let i=this.start,n=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(l.types.question)){let s=this.startNodeAt(i,n);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(l.types.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r},v.parseExprOps=function(t,e){let i=this.start,n=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,n,-1,t)},v.parseExprOp=function(t,e,i,n,r){let s=this.type.binop;if(s!=null&&(!r||this.type!==l.types._in)&&s>n){let o=this.type===l.types.logicalOR||this.type===l.types.logicalAND,a=this.type===l.types.coalesce;a&&(s=l.types.logicalAND.binop);let p=this.value;this.next();let u=this.start,h=this.startLoc,m=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),u,h,s,r),g=this.buildBinary(e,i,t,m,p,o||a);return(o&&this.type===l.types.coalesce||a&&(this.type===l.types.logicalOR||this.type===l.types.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(g,e,i,n,r)}return t},v.buildBinary=function(t,e,i,n,r,s){n.type==="PrivateIdentifier"&&this.raise(n.start,"Private identifier can only be left side of binary expression");let o=this.startNodeAt(t,e);return o.left=i,o.operator=r,o.right=n,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},v.parseMaybeUnary=function(t,e,i,n){let r=this.start,s=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(n),e=!0;else if(this.type.prefix){let a=this.startNode(),p=this.type===l.types.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,p,n),this.checkExpressionErrors(t,!0),p?this.checkLValSimple(a.argument):this.strict&&a.operator==="delete"&&a.argument.type==="Identifier"?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):a.operator==="delete"&&Ii(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(a,p?"UpdateExpression":"UnaryExpression")}else if(e||this.type!==l.types.privateId){if(o=this.parseExprSubscripts(t,n),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){let a=this.startNodeAt(r,s);a.operator=this.value,a.prefix=!1,a.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(a,"UpdateExpression")}}else(n||this.privateNameStack.length===0)&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==l.types._in&&this.unexpected();return!i&&this.eat(l.types.starstar)?e?void this.unexpected(this.lastTokStart):this.buildBinary(r,s,o,this.parseMaybeUnary(null,!1,!1,n),"**",!1):o},v.parseExprSubscripts=function(t,e){let i=this.start,n=this.startLoc,r=this.parseExprAtom(t,e);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;let s=this.parseSubscripts(r,i,n,!1,e);return t&&s.type==="MemberExpression"&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1),t.trailingComma>=s.start&&(t.trailingComma=-1)),s},v.parseSubscripts=function(t,e,i,n,r){let s=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,o=!1;for(;;){let a=this.parseSubscript(t,e,i,n,s,o,r);if(a.optional&&(o=!0),a===t||a.type==="ArrowFunctionExpression"){if(o){let p=this.startNodeAt(e,i);p.expression=a,a=this.finishNode(p,"ChainExpression")}return a}t=a}},v.parseSubscript=function(t,e,i,n,r,s,o){let a=this.options.ecmaVersion>=11,p=a&&this.eat(l.types.questionDot);n&&p&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let u=this.eat(l.types.bracketL);if(u||p&&this.type!==l.types.parenL&&this.type!==l.types.backQuote||this.eat(l.types.dot)){let h=this.startNodeAt(e,i);h.object=t,u?(h.property=this.parseExpression(),this.expect(l.types.bracketR)):this.type===l.types.privateId&&t.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!u,a&&(h.optional=p||h.object.optional),t=this.finishNode(h,"MemberExpression")}else if(!n&&this.eat(l.types.parenL)){let h=new bt.DestructuringErrors,m=this.yieldPos,g=this.awaitPos,w=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let E=this.parseExprList(l.types.parenR,this.options.ecmaVersion>=8,!1,h);if(r&&!p&&!this.canInsertSemicolon()&&this.eat(l.types.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=m,this.awaitPos=g,this.awaitIdentPos=w,this.parseArrowExpression(this.startNodeAt(e,i),E,!0,o);this.checkExpressionErrors(h,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=g||this.awaitPos,this.awaitIdentPos=w||this.awaitIdentPos;let c=this.startNodeAt(e,i);c.callee=t,c.arguments=E,a&&(c.optional=p),t=this.finishNode(c,"CallExpression")}else if(this.type===l.types.backQuote){(p||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let h=this.startNodeAt(e,i);h.tag=t,h.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(h,"TaggedTemplateExpression")}return t},v.parseExprAtom=function(t,e){this.type===l.types.slash&&this.readRegexp();let i,n=this.potentialArrowAt===this.start;switch(this.type){case l.types._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==l.types.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==l.types.dot&&this.type!==l.types.bracketL&&this.type!==l.types.parenL&&this.unexpected(),this.finishNode(i,"Super");case l.types._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case l.types.name:let r=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&a.name==="async"&&!this.canInsertSemicolon()&&this.eat(l.types._function))return this.overrideContext(X.types.f_expr),this.parseFunction(this.startNodeAt(r,s),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(l.types.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[a],!1,e);if(this.options.ecmaVersion>=8&&a.name==="async"&&this.type===l.types.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return a=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(l.types.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[a],!0,e)}return a;case l.types.regexp:let p=this.value;return(i=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},i;case l.types.num:case l.types.string:return this.parseLiteral(this.value);case l.types._null:case l.types._true:case l.types._false:return(i=this.startNode()).value=this.type===l.types._null?null:this.type===l.types._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case l.types.parenL:let u=this.start,h=this.parseParenAndDistinguishExpression(n,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(t.parenthesizedAssign=u),t.parenthesizedBind<0&&(t.parenthesizedBind=u)),h;case l.types.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(l.types.bracketR,!0,!0,t),this.finishNode(i,"ArrayExpression");case l.types.braceL:return this.overrideContext(X.types.b_expr),this.parseObj(!1,t);case l.types._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case l.types._class:return this.parseClass(this.startNode(),!1);case l.types._new:return this.parseNew();case l.types.backQuote:return this.parseTemplate();case l.types._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},v.parseExprImport=function(){let t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");let e=this.parseIdent(!0);switch(this.type){case l.types.parenL:return this.parseDynamicImport(t);case l.types.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}},v.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(l.types.parenR)){let e=this.start;this.eat(l.types.comma)&&this.eat(l.types.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},v.parseImportMeta=function(t){this.next();let e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},v.parseLiteral=function(t){let e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},v.parseParenExpression=function(){this.expect(l.types.parenL);let t=this.parseExpression();return this.expect(l.types.parenR),t},v.parseParenAndDistinguishExpression=function(t,e){let i=this.start,n=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();let o=this.start,a=this.startLoc,p=[],u=!0,h=!1,m=new bt.DestructuringErrors,g=this.yieldPos,w=this.awaitPos,E;for(this.yieldPos=0,this.awaitPos=0;this.type!==l.types.parenR;){if(u?u=!1:this.expect(l.types.comma),s&&this.afterTrailingComma(l.types.parenR,!0)){h=!0;break}if(this.type===l.types.ellipsis){E=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,m,this.parseParenItem))}let c=this.lastTokEnd,d=this.lastTokEndLoc;if(this.expect(l.types.parenR),t&&!this.canInsertSemicolon()&&this.eat(l.types.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=g,this.awaitPos=w,this.parseParenArrowList(i,n,p,e);(!p.length||h)&&this.unexpected(this.lastTokStart),E&&this.unexpected(E),this.checkExpressionErrors(m,!0),this.yieldPos=g||this.yieldPos,this.awaitPos=w||this.awaitPos,p.length>1?((r=this.startNodeAt(o,a)).expressions=p,this.finishNodeAt(r,"SequenceExpression",c,d)):r=p[0]}else r=this.parseParenExpression();if(!this.options.preserveParens)return r;{let o=this.startNodeAt(i,n);return o.expression=r,this.finishNode(o,"ParenthesizedExpression")}},v.parseParenItem=function(t){return t},v.parseParenArrowList=function(t,e,i,n){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,n)};var Vr=[];v.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");let t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(l.types.dot)){t.meta=e;let s=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}let i=this.start,n=this.startLoc,r=this.type===l.types._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),i,n,!0,!1),r&&t.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(l.types.parenL)?t.arguments=this.parseExprList(l.types.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Vr,this.finishNode(t,"NewExpression")},v.parseTemplateElement=function({isTagged:t}){let e=this.startNode();return this.type===l.types.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),e.value={raw:this.value,cooked:null}):e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
`),cooked:this.value},this.next(),e.tail=this.type===l.types.backQuote,this.finishNode(e,"TemplateElement")},v.parseTemplate=function({isTagged:t=!1}={}){let e=this.startNode();this.next(),e.expressions=[];let i=this.parseTemplateElement({isTagged:t});for(e.quasis=[i];!i.tail;)this.type===l.types.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(l.types.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(l.types.braceR),e.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(e,"TemplateLiteral")},v.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===l.types.name||this.type===l.types.num||this.type===l.types.string||this.type===l.types.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===l.types.star)&&!S.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},v.parseObj=function(t,e){let i=this.startNode(),n=!0,r={};for(i.properties=[],this.next();!this.eat(l.types.braceR);){if(n)n=!1;else if(this.expect(l.types.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(l.types.braceR))break;let s=this.parseProperty(t,e);t||this.checkPropClash(s,r,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},v.parseProperty=function(t,e){let i=this.startNode(),n,r,s,o;if(this.options.ecmaVersion>=9&&this.eat(l.types.ellipsis))return t?(i.argument=this.parseIdent(!1),this.type===l.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(this.type===l.types.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),i.argument=this.parseMaybeAssign(!1,e),this.type===l.types.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(t||e)&&(s=this.start,o=this.startLoc),t||(n=this.eat(l.types.star)));let a=this.containsEsc;return this.parsePropertyName(i),!t&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(i)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(l.types.star),this.parsePropertyName(i,e)):r=!1,this.parsePropertyValue(i,t,n,r,s,o,e,a),this.finishNode(i,"Property")},v.parsePropertyValue=function(t,e,i,n,r,s,o,a){if((i||n)&&this.type===l.types.colon&&this.unexpected(),this.eat(l.types.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===l.types.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(i,n);else if(e||a||!(this.options.ecmaVersion>=5)||t.computed||t.key.type!=="Identifier"||t.key.name!=="get"&&t.key.name!=="set"||this.type===l.types.comma||this.type===l.types.braceR||this.type===l.types.eq)this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((i||n)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=r),t.kind="init",e?t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key)):this.type===l.types.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected();else{(i||n)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);let p=t.kind==="get"?0:1;if(t.value.params.length!==p){let u=t.value.start;t.kind==="get"?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}},v.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(l.types.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(l.types.bracketR),t.key;t.computed=!1}return t.key=this.type===l.types.num||this.type===l.types.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},v.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},v.parseMethod=function(t,e,i){let n=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=t),this.options.ecmaVersion>=8&&(n.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,_.functionFlags)(e,n.generator)|_.SCOPE_SUPER|(i?_.SCOPE_DIRECT_SUPER:0)),this.expect(l.types.parenL),n.params=this.parseBindingList(l.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")},v.parseArrowExpression=function(t,e,i,n){let r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope((0,_.functionFlags)(i,!1)|_.SCOPE_ARROW),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,n),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")},v.parseFunctionBody=function(t,e,i,n){let r=e&&this.type!==l.types.braceL,s=this.strict,o=!1;if(r)t.body=this.parseMaybeAssign(n),t.expression=!0,this.checkParams(t,!1);else{let a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!s||a)&&(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");let p=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!s&&!o&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,_.BIND_OUTSIDE),t.body=this.parseBlock(!1,void 0,o&&!s),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=p}this.exitScope()},v.isSimpleParamList=function(t){for(var e,i=Ci(t);!(e=i()).done;)if(e.value.type!=="Identifier")return!1;return!0},v.checkParams=function(t,e){let i=Object.create(null);for(var n,r=Ci(t.params);!(n=r()).done;){let s=n.value;this.checkLValInnerPattern(s,_.BIND_VAR,e?null:i)}},v.parseExprList=function(t,e,i,n){let r=[],s=!0;for(;!this.eat(t);){if(s)s=!1;else if(this.expect(l.types.comma),e&&this.afterTrailingComma(t))break;let o;i&&this.type===l.types.comma?o=null:this.type===l.types.ellipsis?(o=this.parseSpread(n),n&&this.type===l.types.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):o=this.parseMaybeAssign(!1,n),r.push(o)}return r},v.checkUnreserved=function({start:t,end:e,name:i}){if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(t,`Cannot use ${i} in class static initialization block`),this.keywords.test(i)&&this.raise(t,`Unexpected keyword '${i}'`),this.options.ecmaVersion<6&&this.input.slice(t,e).indexOf("\\")!==-1)return;(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||i!=="await"||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,`The keyword '${i}' is reserved`))},v.parseIdent=function(t,e){let i=this.startNode();return this.type===l.types.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,(i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(i,"Identifier"),t||(this.checkUnreserved(i),i.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=i.start)),i},v.parsePrivateIdent=function(){let t=this.startNode();return this.type===l.types.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(t.start,`Private field '#${t.name}' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(t),t},v.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);let e=this.startNode();return this.next(),this.type===l.types.semi||this.canInsertSemicolon()||this.type!==l.types.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(l.types.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},v.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);let e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var wt=P.Parser.prototype;wt.raise=function(t,e){let i=(0,V.getLineInfo)(this.input,t),n=SyntaxError(e+=" ("+i.line+":"+i.column+")");throw n.pos=t,n.loc=i,n.raisedAt=this.pos,n},wt.raiseRecoverable=wt.raise,wt.curPosition=function(){if(this.options.locations)return new V.Position(this.curLine,this.pos-this.lineStart)};var F=P.Parser.prototype,te=class{constructor(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1}};F.enterScope=function(t){this.scopeStack.push(new te(t))},F.exitScope=function(){this.scopeStack.pop()},F.treatFunctionsAsVarInScope=function(t){return t.flags&_.SCOPE_FUNCTION||!this.inModule&&t.flags&_.SCOPE_TOP},F.declareName=function(t,e,i){let n=!1;if(e===_.BIND_LEXICAL){let r=this.currentScope();n=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&_.SCOPE_TOP&&delete this.undefinedExports[t]}else if(e===_.BIND_SIMPLE_CATCH)this.currentScope().lexical.push(t);else if(e===_.BIND_FUNCTION){let r=this.currentScope();n=this.treatFunctionsAsVar?r.lexical.indexOf(t)>-1:r.lexical.indexOf(t)>-1||r.var.indexOf(t)>-1,r.functions.push(t)}else for(let r=this.scopeStack.length-1;r>=0;--r){let s=this.scopeStack[r];if(s.lexical.indexOf(t)>-1&&!(s.flags&_.SCOPE_SIMPLE_CATCH&&s.lexical[0]===t)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(t)>-1){n=!0;break}if(s.var.push(t),this.inModule&&s.flags&_.SCOPE_TOP&&delete this.undefinedExports[t],s.flags&_.SCOPE_VAR)break}n&&this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)},F.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)},F.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},F.currentVarScope=function(){for(let t=this.scopeStack.length-1;;t--){let e=this.scopeStack[t];if(e.flags&_.SCOPE_VAR)return e}},F.currentThisScope=function(){for(let t=this.scopeStack.length-1;;t--){let e=this.scopeStack[t];if(e.flags&_.SCOPE_VAR&&!(e.flags&_.SCOPE_ARROW))return e}};var Li=T(function(t,e){e.__esModule=!0,e.Node=void 0;class i{constructor(o,a,p){this.type="",this.start=a,this.end=0,o.options.locations&&(this.loc=new V.SourceLocation(o,p)),o.options.directSourceFile&&(this.sourceFile=o.options.directSourceFile),o.options.ranges&&(this.range=[a,0])}}e.Node=i;let n=P.Parser.prototype;function r(s,o,a,p){return s.type=o,s.end=a,this.options.locations&&(s.loc.end=p),this.options.ranges&&(s.range[1]=a),s}n.startNode=function(){return new i(this,this.start,this.startLoc)},n.startNodeAt=function(s,o){return new i(this,s,o)},n.finishNode=function(s,o){return r.call(this,s,o,this.lastTokEnd,this.lastTokEndLoc)},n.finishNodeAt=function(s,o,a,p){return r.call(this,s,o,a,p)},n.copyNode=function(s){let o=new i(this,s.start,this.startLoc);for(let a in s)o[a]=s[a];return o}}),Br=T(function(t,e){e.__esModule=!0,e.default=void 0;let i="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",n=i+" Extended_Pictographic",r=n,s=r+" EBase EComp EMod EPres ExtPict",o={9:i,10:n,11:r,12:s,13:s},a="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",p="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",u=p+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",h=u+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",m=h+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",g={9:p,10:u,11:h,12:m,13:m+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"},w={};function E(y){let f=w[y]={binary:(0,I.wordsRegexp)(o[y]+" "+a),nonBinary:{General_Category:(0,I.wordsRegexp)(a),Script:(0,I.wordsRegexp)(g[y])}};f.nonBinary.Script_Extensions=f.nonBinary.Script,f.nonBinary.gc=f.nonBinary.General_Category,f.nonBinary.sc=f.nonBinary.Script,f.nonBinary.scx=f.nonBinary.Script_Extensions}for(var c=0,d=[9,10,11,12,13];c<d.length;c++){let y=d[c];E(y)}e.default=w,t.exports=e.default}),Ur=T(function(t,e){e.__esModule=!0,e.RegExpValidationState=void 0;var i,n=(i=Br,i&&i.__esModule?i:{default:i});function r(c,d){(d==null||d>c.length)&&(d=c.length);for(var y=0,f=Array(d);y<d;y++)f[y]=c[y];return f}let s=P.Parser.prototype;function o(c){return c<=65535?String.fromCharCode(c):String.fromCharCode(((c-=65536)>>10)+55296,(1023&c)+56320)}function a(c){return c===36||c>=40&&c<=43||c===46||c===63||c>=91&&c<=94||c>=123&&c<=125}function p(c){return c>=65&&c<=90||c>=97&&c<=122}function u(c){return p(c)||c===95}function h(c){return u(c)||m(c)}function m(c){return c>=48&&c<=57}function g(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function w(c){return c>=65&&c<=70?10+(c-65):c>=97&&c<=102?10+(c-97):c-48}function E(c){return c>=48&&c<=55}e.RegExpValidationState=class{constructor(d){this.parser=d,this.validFlags=`gim${d.options.ecmaVersion>=6?"uy":""}${d.options.ecmaVersion>=9?"s":""}${d.options.ecmaVersion>=13?"d":""}`,this.unicodeProperties=n.default[d.options.ecmaVersion>=13?13:d.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=[]}reset(d,y,f){let b=f.indexOf("u")!==-1;this.start=0|d,this.source=y+"",this.flags=f,this.switchU=b&&this.parser.options.ecmaVersion>=6,this.switchN=b&&this.parser.options.ecmaVersion>=9}raise(d){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /${this.source}/: ${d}`)}at(d,y=!1){let f=this.source,b=f.length;if(d>=b)return-1;let N=f.charCodeAt(d);if(!(y||this.switchU)||N<=55295||N>=57344||d+1>=b)return N;let L=f.charCodeAt(d+1);return L>=56320&&L<=57343?(N<<10)+L-56613888:N}nextIndex(d,y=!1){let f=this.source,b=f.length;if(d>=b)return b;let N=f.charCodeAt(d),L;return!(y||this.switchU)||N<=55295||N>=57344||d+1>=b||(L=f.charCodeAt(d+1))<56320||L>57343?d+1:d+2}current(d=!1){return this.at(this.pos,d)}lookahead(d=!1){return this.at(this.nextIndex(this.pos,d),d)}advance(d=!1){this.pos=this.nextIndex(this.pos,d)}eat(d,y=!1){return this.current(y)===d&&(this.advance(y),!0)}},s.validateRegExpFlags=function(c){let d=c.validFlags,y=c.flags;for(let f=0;f<y.length;f++){let b=y.charAt(f);d.indexOf(b)===-1&&this.raise(c.start,"Invalid regular expression flag"),y.indexOf(b,f+1)>-1&&this.raise(c.start,"Duplicate regular expression flag")}},s.validateRegExpPattern=function(c){this.regexp_pattern(c),!c.switchN&&this.options.ecmaVersion>=9&&c.groupNames.length>0&&(c.switchN=!0,this.regexp_pattern(c))},s.regexp_pattern=function(c){c.pos=0,c.lastIntValue=0,c.lastStringValue="",c.lastAssertionIsQuantifiable=!1,c.numCapturingParens=0,c.maxBackReference=0,c.groupNames.length=0,c.backReferenceNames.length=0,this.regexp_disjunction(c),c.pos!==c.source.length&&(c.eat(41)&&c.raise("Unmatched ')'"),(c.eat(93)||c.eat(125))&&c.raise("Lone quantifier brackets")),c.maxBackReference>c.numCapturingParens&&c.raise("Invalid escape");for(var d,y=function(b,N){var L=typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(L)return(L=L.call(b)).next.bind(L);if(Array.isArray(b)||(L=function(j,li){if(j){if(typeof j=="string")return r(j,li);var G=Object.prototype.toString.call(j).slice(8,-1);if(G==="Object"&&j.constructor&&(G=j.constructor.name),G==="Map"||G==="Set")return Array.from(j);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return r(j,li)}}(b))){L&&(b=L);var q=0;return function(){return q>=b.length?{done:!0}:{done:!1,value:b[q++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(c.backReferenceNames);!(d=y()).done;){let f=d.value;c.groupNames.indexOf(f)===-1&&c.raise("Invalid named capture referenced")}},s.regexp_disjunction=function(c){for(this.regexp_alternative(c);c.eat(124);)this.regexp_alternative(c);this.regexp_eatQuantifier(c,!0)&&c.raise("Nothing to repeat"),c.eat(123)&&c.raise("Lone quantifier brackets")},s.regexp_alternative=function(c){for(;c.pos<c.source.length&&this.regexp_eatTerm(c););},s.regexp_eatTerm=function(c){return this.regexp_eatAssertion(c)?(c.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(c)&&c.switchU&&c.raise("Invalid quantifier"),!0):(c.switchU?!!this.regexp_eatAtom(c):!!this.regexp_eatExtendedAtom(c))&&(this.regexp_eatQuantifier(c),!0)},s.regexp_eatAssertion=function(c){let d=c.pos;if(c.lastAssertionIsQuantifiable=!1,c.eat(94)||c.eat(36))return!0;if(c.eat(92)){if(c.eat(66)||c.eat(98))return!0;c.pos=d}if(c.eat(40)&&c.eat(63)){let y=!1;if(this.options.ecmaVersion>=9&&(y=c.eat(60)),c.eat(61)||c.eat(33))return this.regexp_disjunction(c),c.eat(41)||c.raise("Unterminated group"),c.lastAssertionIsQuantifiable=!y,!0}return c.pos=d,!1},s.regexp_eatQuantifier=function(c,d=!1){return!!this.regexp_eatQuantifierPrefix(c,d)&&(c.eat(63),!0)},s.regexp_eatQuantifierPrefix=function(c,d){return c.eat(42)||c.eat(43)||c.eat(63)||this.regexp_eatBracedQuantifier(c,d)},s.regexp_eatBracedQuantifier=function(c,d){let y=c.pos;if(c.eat(123)){let f=0,b=-1;if(this.regexp_eatDecimalDigits(c)&&(f=c.lastIntValue,c.eat(44)&&this.regexp_eatDecimalDigits(c)&&(b=c.lastIntValue),c.eat(125)))return b!==-1&&b<f&&!d&&c.raise("numbers out of order in {} quantifier"),!0;c.switchU&&!d&&c.raise("Incomplete quantifier"),c.pos=y}return!1},s.regexp_eatAtom=function(c){return this.regexp_eatPatternCharacters(c)||c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)},s.regexp_eatReverseSolidusAtomEscape=function(c){let d=c.pos;if(c.eat(92)){if(this.regexp_eatAtomEscape(c))return!0;c.pos=d}return!1},s.regexp_eatUncapturingGroup=function(c){let d=c.pos;if(c.eat(40)){if(c.eat(63)&&c.eat(58)){if(this.regexp_disjunction(c),c.eat(41))return!0;c.raise("Unterminated group")}c.pos=d}return!1},s.regexp_eatCapturingGroup=function(c){if(c.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(c):c.current()===63&&c.raise("Invalid group"),this.regexp_disjunction(c),c.eat(41))return c.numCapturingParens+=1,!0;c.raise("Unterminated group")}return!1},s.regexp_eatExtendedAtom=function(c){return c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)||this.regexp_eatInvalidBracedQuantifier(c)||this.regexp_eatExtendedPatternCharacter(c)},s.regexp_eatInvalidBracedQuantifier=function(c){return this.regexp_eatBracedQuantifier(c,!0)&&c.raise("Nothing to repeat"),!1},s.regexp_eatSyntaxCharacter=function(c){let d=c.current();return!!a(d)&&(c.lastIntValue=d,c.advance(),!0)},s.regexp_eatPatternCharacters=function(c){let d=c.pos,y=0;for(;(y=c.current())!==-1&&!a(y);)c.advance();return c.pos!==d},s.regexp_eatExtendedPatternCharacter=function(c){let d=c.current();return d!==-1&&d!==36&&(!(d>=40)||!(d<=43))&&d!==46&&d!==63&&d!==91&&d!==94&&d!==124&&(c.advance(),!0)},s.regexp_groupSpecifier=function(c){if(c.eat(63)){if(this.regexp_eatGroupName(c)){c.groupNames.indexOf(c.lastStringValue)!==-1&&c.raise("Duplicate capture group name"),c.groupNames.push(c.lastStringValue);return}c.raise("Invalid group")}},s.regexp_eatGroupName=function(c){if(c.lastStringValue="",c.eat(60)){if(this.regexp_eatRegExpIdentifierName(c)&&c.eat(62))return!0;c.raise("Invalid capture group name")}return!1},s.regexp_eatRegExpIdentifierName=function(c){if(c.lastStringValue="",this.regexp_eatRegExpIdentifierStart(c)){for(c.lastStringValue+=o(c.lastIntValue);this.regexp_eatRegExpIdentifierPart(c);)c.lastStringValue+=o(c.lastIntValue);return!0}return!1},s.regexp_eatRegExpIdentifierStart=function(c){var d;let y=c.pos,f=this.options.ecmaVersion>=11,b=c.current(f);return c.advance(f),b===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,f)&&(b=c.lastIntValue),d=b,(0,C.isIdentifierStart)(d,!0)||d===36||d===95?(c.lastIntValue=b,!0):(c.pos=y,!1)},s.regexp_eatRegExpIdentifierPart=function(c){var d;let y=c.pos,f=this.options.ecmaVersion>=11,b=c.current(f);return c.advance(f),b===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,f)&&(b=c.lastIntValue),d=b,(0,C.isIdentifierChar)(d,!0)||d===36||d===95||d===8204||d===8205?(c.lastIntValue=b,!0):(c.pos=y,!1)},s.regexp_eatAtomEscape=function(c){return!!(this.regexp_eatBackReference(c)||this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)||c.switchN&&this.regexp_eatKGroupName(c))||(c.switchU&&(c.current()===99&&c.raise("Invalid unicode escape"),c.raise("Invalid escape")),!1)},s.regexp_eatBackReference=function(c){let d=c.pos;if(this.regexp_eatDecimalEscape(c)){let y=c.lastIntValue;if(c.switchU)return y>c.maxBackReference&&(c.maxBackReference=y),!0;if(y<=c.numCapturingParens)return!0;c.pos=d}return!1},s.regexp_eatKGroupName=function(c){if(c.eat(107)){if(this.regexp_eatGroupName(c))return c.backReferenceNames.push(c.lastStringValue),!0;c.raise("Invalid named reference")}return!1},s.regexp_eatCharacterEscape=function(c){return this.regexp_eatControlEscape(c)||this.regexp_eatCControlLetter(c)||this.regexp_eatZero(c)||this.regexp_eatHexEscapeSequence(c)||this.regexp_eatRegExpUnicodeEscapeSequence(c,!1)||!c.switchU&&this.regexp_eatLegacyOctalEscapeSequence(c)||this.regexp_eatIdentityEscape(c)},s.regexp_eatCControlLetter=function(c){let d=c.pos;if(c.eat(99)){if(this.regexp_eatControlLetter(c))return!0;c.pos=d}return!1},s.regexp_eatZero=function(c){return!(c.current()!==48||m(c.lookahead()))&&(c.lastIntValue=0,c.advance(),!0)},s.regexp_eatControlEscape=function(c){let d=c.current();return d===116?(c.lastIntValue=9,c.advance(),!0):d===110?(c.lastIntValue=10,c.advance(),!0):d===118?(c.lastIntValue=11,c.advance(),!0):d===102?(c.lastIntValue=12,c.advance(),!0):d===114&&(c.lastIntValue=13,c.advance(),!0)},s.regexp_eatControlLetter=function(c){let d=c.current();return!!p(d)&&(c.lastIntValue=d%32,c.advance(),!0)},s.regexp_eatRegExpUnicodeEscapeSequence=function(c,d=!1){let y=c.pos,f=d||c.switchU;if(c.eat(117)){var b;if(this.regexp_eatFixedHexDigits(c,4)){let N=c.lastIntValue;if(f&&N>=55296&&N<=56319){let L=c.pos;if(c.eat(92)&&c.eat(117)&&this.regexp_eatFixedHexDigits(c,4)){let q=c.lastIntValue;if(q>=56320&&q<=57343)return c.lastIntValue=(N-55296)*1024+(q-56320)+65536,!0}c.pos=L,c.lastIntValue=N}return!0}if(f&&c.eat(123)&&this.regexp_eatHexDigits(c)&&c.eat(125)&&(b=c.lastIntValue,b>=0&&b<=1114111))return!0;f&&c.raise("Invalid unicode escape"),c.pos=y}return!1},s.regexp_eatIdentityEscape=function(c){if(c.switchU)return!!this.regexp_eatSyntaxCharacter(c)||!!c.eat(47)&&(c.lastIntValue=47,!0);let d=c.current();return d!==99&&(!c.switchN||d!==107)&&(c.lastIntValue=d,c.advance(),!0)},s.regexp_eatDecimalEscape=function(c){c.lastIntValue=0;let d=c.current();if(d>=49&&d<=57){do c.lastIntValue=10*c.lastIntValue+(d-48),c.advance();while((d=c.current())>=48&&d<=57);return!0}return!1},s.regexp_eatCharacterClassEscape=function(c){var d;let y=c.current();if(d=y,d===100||d===68||d===115||d===83||d===119||d===87)return c.lastIntValue=-1,c.advance(),!0;if(c.switchU&&this.options.ecmaVersion>=9&&(y===80||y===112)){if(c.lastIntValue=-1,c.advance(),c.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(c)&&c.eat(125))return!0;c.raise("Invalid property name")}return!1},s.regexp_eatUnicodePropertyValueExpression=function(c){let d=c.pos;if(this.regexp_eatUnicodePropertyName(c)&&c.eat(61)){let y=c.lastStringValue;if(this.regexp_eatUnicodePropertyValue(c)){let f=c.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(c,y,f),!0}}if(c.pos=d,this.regexp_eatLoneUnicodePropertyNameOrValue(c)){let y=c.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(c,y),!0}return!1},s.regexp_validateUnicodePropertyNameAndValue=function(c,d,y){(0,I.hasOwn)(c.unicodeProperties.nonBinary,d)||c.raise("Invalid property name"),c.unicodeProperties.nonBinary[d].test(y)||c.raise("Invalid property value")},s.regexp_validateUnicodePropertyNameOrValue=function(c,d){c.unicodeProperties.binary.test(d)||c.raise("Invalid property name")},s.regexp_eatUnicodePropertyName=function(c){let d=0;for(c.lastStringValue="";u(d=c.current());)c.lastStringValue+=o(d),c.advance();return c.lastStringValue!==""},s.regexp_eatUnicodePropertyValue=function(c){let d=0;for(c.lastStringValue="";h(d=c.current());)c.lastStringValue+=o(d),c.advance();return c.lastStringValue!==""},s.regexp_eatLoneUnicodePropertyNameOrValue=function(c){return this.regexp_eatUnicodePropertyValue(c)},s.regexp_eatCharacterClass=function(c){if(c.eat(91)){if(c.eat(94),this.regexp_classRanges(c),c.eat(93))return!0;c.raise("Unterminated character class")}return!1},s.regexp_classRanges=function(c){for(;this.regexp_eatClassAtom(c);){let d=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassAtom(c)){let y=c.lastIntValue;c.switchU&&(d===-1||y===-1)&&c.raise("Invalid character class"),d!==-1&&y!==-1&&d>y&&c.raise("Range out of order in character class")}}},s.regexp_eatClassAtom=function(c){let d=c.pos;if(c.eat(92)){if(this.regexp_eatClassEscape(c))return!0;if(c.switchU){let f=c.current();(f===99||E(f))&&c.raise("Invalid class escape"),c.raise("Invalid escape")}c.pos=d}let y=c.current();return y!==93&&(c.lastIntValue=y,c.advance(),!0)},s.regexp_eatClassEscape=function(c){let d=c.pos;if(c.eat(98))return c.lastIntValue=8,!0;if(c.switchU&&c.eat(45))return c.lastIntValue=45,!0;if(!c.switchU&&c.eat(99)){if(this.regexp_eatClassControlLetter(c))return!0;c.pos=d}return this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)},s.regexp_eatClassControlLetter=function(c){let d=c.current();return(!!m(d)||d===95)&&(c.lastIntValue=d%32,c.advance(),!0)},s.regexp_eatHexEscapeSequence=function(c){let d=c.pos;if(c.eat(120)){if(this.regexp_eatFixedHexDigits(c,2))return!0;c.switchU&&c.raise("Invalid escape"),c.pos=d}return!1},s.regexp_eatDecimalDigits=function(c){let d=c.pos,y=0;for(c.lastIntValue=0;m(y=c.current());)c.lastIntValue=10*c.lastIntValue+(y-48),c.advance();return c.pos!==d},s.regexp_eatHexDigits=function(c){let d=c.pos,y=0;for(c.lastIntValue=0;g(y=c.current());)c.lastIntValue=16*c.lastIntValue+w(y),c.advance();return c.pos!==d},s.regexp_eatLegacyOctalEscapeSequence=function(c){if(this.regexp_eatOctalDigit(c)){let d=c.lastIntValue;if(this.regexp_eatOctalDigit(c)){let y=c.lastIntValue;d<=3&&this.regexp_eatOctalDigit(c)?c.lastIntValue=64*d+8*y+c.lastIntValue:c.lastIntValue=8*d+y}else c.lastIntValue=d;return!0}return!1},s.regexp_eatOctalDigit=function(c){let d=c.current();return E(d)?(c.lastIntValue=d-48,c.advance(),!0):(c.lastIntValue=0,!1)},s.regexp_eatFixedHexDigits=function(c,d){let y=c.pos;c.lastIntValue=0;for(let f=0;f<d;++f){let b=c.current();if(!g(b))return c.pos=y,!1;c.lastIntValue=16*c.lastIntValue+w(b),c.advance()}return!0}}),Pi=T(function(t,e){e.__esModule=!0,e.Token=void 0;class i{constructor(p){this.type=p.type,this.value=p.value,this.start=p.start,this.end=p.end,p.options.locations&&(this.loc=new V.SourceLocation(p,p.startLoc,p.endLoc)),p.options.ranges&&(this.range=[p.start,p.end])}}e.Token=i;let n=P.Parser.prototype;function r(a){return typeof BigInt!="function"?null:BigInt(a.replace(/_/g,""))}function s(a){return a<=65535?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,(1023&a)+56320)}n.next=function(a){!a&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new i(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},n.getToken=function(){return this.next(),new i(this)},typeof Symbol<"u"&&(n[Symbol.iterator]=function(){return{next:()=>{let a=this.getToken();return{done:a.type===l.types.eof,value:a}}}}),n.nextToken=function(){let a=this.curContext();return a&&a.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(l.types.eof):a.override?a.override(this):void this.readToken(this.fullCharCodeAtPos())},n.readToken=function(a){return(0,C.isIdentifierStart)(a,this.options.ecmaVersion>=6)||a===92?this.readWord():this.getTokenFromCode(a)},n.fullCharCodeAtPos=function(){let a=this.input.charCodeAt(this.pos);if(a<=55295||a>=56320)return a;let p=this.input.charCodeAt(this.pos+1);return p<=56319||p>=57344?a:(a<<10)+p-56613888},n.skipBlockComment=function(){let a=this.options.onComment&&this.curPosition(),p=this.pos,u=this.input.indexOf("*/",this.pos+=2);if(u===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=u+2,this.options.locations)for(let h,m=p;(h=(0,S.nextLineBreak)(this.input,m,this.pos))>-1;)++this.curLine,m=this.lineStart=h;this.options.onComment&&this.options.onComment(!0,this.input.slice(p+2,u),p,this.pos,a,this.curPosition())},n.skipLineComment=function(a){let p=this.pos,u=this.options.onComment&&this.curPosition(),h=this.input.charCodeAt(this.pos+=a);for(;this.pos<this.input.length&&!(0,S.isNewLine)(h);)h=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(p+a,this.pos),p,this.pos,u,this.curPosition())},n.skipSpace=function(){t:for(;this.pos<this.input.length;){let a=this.input.charCodeAt(this.pos);switch(a){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++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 t}break;default:if(a>8&&a<14||a>=5760&&S.nonASCIIwhitespace.test(String.fromCharCode(a)))++this.pos;else break t}}},n.finishToken=function(a,p){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());let u=this.type;this.type=a,this.value=p,this.updateContext(u)},n.readToken_dot=function(){let a=this.input.charCodeAt(this.pos+1);if(a>=48&&a<=57)return this.readNumber(!0);let p=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&a===46&&p===46?(this.pos+=3,this.finishToken(l.types.ellipsis)):(++this.pos,this.finishToken(l.types.dot))},n.readToken_slash=function(){let a=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):a===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.slash,1)},n.readToken_mult_modulo_exp=function(a){let p=this.input.charCodeAt(this.pos+1),u=1,h=a===42?l.types.star:l.types.modulo;return this.options.ecmaVersion>=7&&a===42&&p===42&&(++u,h=l.types.starstar,p=this.input.charCodeAt(this.pos+2)),p===61?this.finishOp(l.types.assign,u+1):this.finishOp(h,u)},n.readToken_pipe_amp=function(a){let p=this.input.charCodeAt(this.pos+1);return p===a?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(l.types.assign,3):this.finishOp(a===124?l.types.logicalOR:l.types.logicalAND,2):p===61?this.finishOp(l.types.assign,2):this.finishOp(a===124?l.types.bitwiseOR:l.types.bitwiseAND,1)},n.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.bitwiseXOR,1)},n.readToken_plus_min=function(a){let p=this.input.charCodeAt(this.pos+1);return p===a?p===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||S.lineBreak.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(l.types.incDec,2):p===61?this.finishOp(l.types.assign,2):this.finishOp(l.types.plusMin,1)},n.readToken_lt_gt=function(a){let p=this.input.charCodeAt(this.pos+1),u=1;return p===a?(u=a===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+u)===61?this.finishOp(l.types.assign,u+1):this.finishOp(l.types.bitShift,u)):p!==33||a!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(p===61&&(u=2),this.finishOp(l.types.relational,u)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},n.readToken_eq_excl=function(a){let p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(l.types.equality,this.input.charCodeAt(this.pos+2)===61?3:2):a===61&&p===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(l.types.arrow)):this.finishOp(a===61?l.types.eq:l.types.prefix,1)},n.readToken_question=function(){let a=this.options.ecmaVersion;if(a>=11){let p=this.input.charCodeAt(this.pos+1);if(p===46){let u=this.input.charCodeAt(this.pos+2);if(u<48||u>57)return this.finishOp(l.types.questionDot,2)}if(p===63)return a>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(l.types.assign,3):this.finishOp(l.types.coalesce,2)}return this.finishOp(l.types.question,1)},n.readToken_numberSign=function(){let a=this.options.ecmaVersion,p=35;if(a>=13&&(++this.pos,p=this.fullCharCodeAtPos(),(0,C.isIdentifierStart)(p,!0)||p===92))return this.finishToken(l.types.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+s(p)+"'")},n.getTokenFromCode=function(a){switch(a){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(l.types.parenL);case 41:return++this.pos,this.finishToken(l.types.parenR);case 59:return++this.pos,this.finishToken(l.types.semi);case 44:return++this.pos,this.finishToken(l.types.comma);case 91:return++this.pos,this.finishToken(l.types.bracketL);case 93:return++this.pos,this.finishToken(l.types.bracketR);case 123:return++this.pos,this.finishToken(l.types.braceL);case 125:return++this.pos,this.finishToken(l.types.braceR);case 58:return++this.pos,this.finishToken(l.types.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(l.types.backQuote);case 48:let p=this.input.charCodeAt(this.pos+1);if(p===120||p===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(p===111||p===79)return this.readRadixNumber(8);if(p===98||p===66)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(a);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(a);case 124:case 38:return this.readToken_pipe_amp(a);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(a);case 60:case 62:return this.readToken_lt_gt(a);case 61:case 33:return this.readToken_eq_excl(a);case 63:return this.readToken_question();case 126:return this.finishOp(l.types.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+s(a)+"'")},n.finishOp=function(a,p){let u=this.input.slice(this.pos,this.pos+p);return this.pos+=p,this.finishToken(a,u)},n.readRegexp=function(){let a,p,u=this.pos;for(;;){this.pos>=this.input.length&&this.raise(u,"Unterminated regular expression");let c=this.input.charAt(this.pos);if(S.lineBreak.test(c)&&this.raise(u,"Unterminated regular expression"),a)a=!1;else{if(c==="[")p=!0;else if(c==="]"&&p)p=!1;else if(c==="/"&&!p)break;a=c==="\\"}++this.pos}let h=this.input.slice(u,this.pos);++this.pos;let m=this.pos,g=this.readWord1();this.containsEsc&&this.unexpected(m);let w=this.regexpState||(this.regexpState=new Ur.RegExpValidationState(this));w.reset(u,h,g),this.validateRegExpFlags(w),this.validateRegExpPattern(w);let E=null;try{E=RegExp(h,g)}catch{}return this.finishToken(l.types.regexp,{pattern:h,flags:g,value:E})},n.readInt=function(a,p,u){let h=this.options.ecmaVersion>=12&&p===void 0,m=u&&this.input.charCodeAt(this.pos)===48,g=this.pos,w=0,E=0;for(let c=0,d=p??1/0;c<d;++c,++this.pos){let y=this.input.charCodeAt(this.pos),f;if(h&&y===95){m&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),E===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),E=y;continue}if((f=y>=97?y-97+10:y>=65?y-65+10:y>=48&&y<=57?y-48:1/0)>=a)break;E=y,w=w*a+f}return h&&E===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===g||p!=null&&this.pos-g!==p?null:w},n.readRadixNumber=function(a){let p=this.pos;this.pos+=2;let u=this.readInt(a);return u==null&&this.raise(this.start+2,"Expected number in radix "+a),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(u=r(this.input.slice(p,this.pos)),++this.pos):(0,C.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.types.num,u)},n.readNumber=function(a){var p,u;let h=this.pos;a||this.readInt(10,void 0,!0)!==null||this.raise(h,"Invalid number");let m=this.pos-h>=2&&this.input.charCodeAt(h)===48;m&&this.strict&&this.raise(h,"Invalid number");let g=this.input.charCodeAt(this.pos);if(!m&&!a&&this.options.ecmaVersion>=11&&g===110){let E=r(this.input.slice(h,this.pos));return++this.pos,(0,C.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.types.num,E)}m&&/[89]/.test(this.input.slice(h,this.pos))&&(m=!1),g!==46||m||(++this.pos,this.readInt(10),g=this.input.charCodeAt(this.pos)),g!==69&&g!==101||m||(((g=this.input.charCodeAt(++this.pos))===43||g===45)&&++this.pos,this.readInt(10)===null&&this.raise(h,"Invalid number")),(0,C.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");let w=(p=this.input.slice(h,this.pos),(u=m)?parseInt(p,8):parseFloat(p.replace(/_/g,"")));return this.finishToken(l.types.num,w)},n.readCodePoint=function(){let a;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();let p=++this.pos;a=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,a>1114111&&this.invalidStringToken(p,"Code point out of bounds")}else a=this.readHexChar(4);return a},n.readString=function(a){let p="",u=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let h=this.input.charCodeAt(this.pos);if(h===a)break;h===92?(p+=this.input.slice(u,this.pos),p+=this.readEscapedChar(!1),u=this.pos):h===8232||h===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):((0,S.isNewLine)(h)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return p+=this.input.slice(u,this.pos++),this.finishToken(l.types.string,p)};let o={};n.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(a){if(a===o)this.readInvalidTemplateToken();else throw a}this.inTemplateElement=!1},n.invalidStringToken=function(a,p){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw o;this.raise(a,p)},n.readTmplToken=function(){let a="",p=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");let u=this.input.charCodeAt(this.pos);if(u===96||u===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===l.types.template||this.type===l.types.invalidTemplate)?u===36?(this.pos+=2,this.finishToken(l.types.dollarBraceL)):(++this.pos,this.finishToken(l.types.backQuote)):(a+=this.input.slice(p,this.pos),this.finishToken(l.types.template,a));if(u===92)a+=this.input.slice(p,this.pos),a+=this.readEscapedChar(!0),p=this.pos;else if((0,S.isNewLine)(u)){switch(a+=this.input.slice(p,this.pos),++this.pos,u){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:a+=`
|
|
`;break;default:a+=String.fromCharCode(u)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),p=this.pos}else++this.pos}},n.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(l.types.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},n.readEscapedChar=function(a){let p=this.input.charCodeAt(++this.pos);switch(++this.pos,p){case 110:return`
|
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return s(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++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"),a){let u=this.pos-1;return this.invalidStringToken(u,"Invalid escape sequence in template string"),null}default:if(p>=48&&p<=55){let u=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],h=parseInt(u,8);return h>255&&(h=parseInt(u=u.slice(0,-1),8)),this.pos+=u.length-1,p=this.input.charCodeAt(this.pos),(u!=="0"||p===56||p===57)&&(this.strict||a)&&this.invalidStringToken(this.pos-1-u.length,a?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(h)}return(0,S.isNewLine)(p)?"":String.fromCharCode(p)}},n.readHexChar=function(a){let p=this.pos,u=this.readInt(16,a);return u===null&&this.invalidStringToken(p,"Bad character escape sequence"),u},n.readWord1=function(){this.containsEsc=!1;let a="",p=!0,u=this.pos,h=this.options.ecmaVersion>=6;for(;this.pos<this.input.length;){let m=this.fullCharCodeAtPos();if((0,C.isIdentifierChar)(m,h))this.pos+=m<=65535?1:2;else if(m===92){this.containsEsc=!0,a+=this.input.slice(u,this.pos);let g=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;let w=this.readCodePoint();(p?C.isIdentifierStart:C.isIdentifierChar)(w,h)||this.invalidStringToken(g,"Invalid Unicode escape"),a+=this.input.substr(this.pos-6,6),u=this.pos}else break;p=!1}return a+this.input.slice(u,this.pos)},n.readWord=function(){let a=this.readWord1(),p=l.types.name;return this.keywords.test(a)&&(p=l.keywords[a]),this.finishToken(p,a)}}),k=T(function(t,e){e.__esModule=!0,e.parse=function(p,u){return P.Parser.parse(p,u)},e.parseExpressionAt=function(p,u,h){return P.Parser.parseExpressionAt(p,u,h)},e.tokenizer=function(p,u){return P.Parser.tokenizer(p,u)},e.version=void 0,e.Parser=P.Parser,e.defaultOptions=Yt.defaultOptions,e.Position=V.Position,e.SourceLocation=V.SourceLocation,e.getLineInfo=V.getLineInfo,e.Node=Li.Node,e.TokenType=l.TokenType,e.tokTypes=l.types,e.keywordTypes=l.keywords,e.TokContext=X.TokContext,e.tokContexts=X.types,e.isIdentifierChar=C.isIdentifierChar,e.isIdentifierStart=C.isIdentifierStart,e.Token=Pi.Token,e.isNewLine=S.isNewLine,e.lineBreak=S.lineBreak,e.lineBreakG=S.lineBreakG,e.nonASCIIwhitespace=S.nonASCIIwhitespace;var i=function(p,u){if(!u&&p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var h=n(u);if(h&&h.has(p))return h.get(p);var m={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in p)if(w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)){var E=g?Object.getOwnPropertyDescriptor(p,w):null;E&&(E.get||E.set)?Object.defineProperty(m,w,E):m[w]=p[w]}return m.default=p,h&&h.set(p,m),m}(I);function n(a){if(typeof WeakMap!="function")return null;var p=new WeakMap,u=new WeakMap;return(n=function(m){return m?u:p})(a)}let r="8.7.0";e.version=r,P.Parser.acorn={Parser:P.Parser,version:r,defaultOptions:Yt.defaultOptions,Position:V.Position,SourceLocation:V.SourceLocation,getLineInfo:V.getLineInfo,Node:Li.Node,TokenType:l.TokenType,tokTypes:l.types,keywordTypes:l.keywords,TokContext:X.TokContext,tokContexts:X.types,isIdentifierChar:C.isIdentifierChar,isIdentifierStart:C.isIdentifierStart,Token:Pi.Token,isNewLine:S.isNewLine,lineBreak:S.lineBreak,lineBreakG:S.lineBreakG,nonASCIIwhitespace:S.nonASCIIwhitespace};let s=i.wordsRegexp,o={};i.wordsRegexp=function(a){return o[a]||(o[a]=s(a)),o[a]}}),Bn=Ir(k),Un=k.Node,jn=k.Parser,Fn=k.Position,Hn=k.SourceLocation,Wn=k.TokContext,qn=k.Token,Gn=k.TokenType;var zn=k.defaultOptions,Xn=k.getLineInfo,Kn=k.isIdentifierChar,Qn=k.isIdentifierStart,Yn=k.isNewLine,Zn=k.keywordTypes,Jn=k.lineBreak,ts=k.lineBreakG,es=k.nonASCIIwhitespace,Ti=k.parse,is=k.parseExpressionAt,rs=k.tokContexts,ns=k.tokTypes,ss=k.tokenizer,as=k.version;var vt,jr=new Uint8Array(16);function ee(){if(!vt&&(vt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vt(jr)}var A=[];for(let t=0;t<256;++t)A.push((t+256).toString(16).slice(1));function Ri(t,e=0){return(A[t[e+0]]+A[t[e+1]]+A[t[e+2]]+A[t[e+3]]+"-"+A[t[e+4]]+A[t[e+5]]+"-"+A[t[e+6]]+A[t[e+7]]+"-"+A[t[e+8]]+A[t[e+9]]+"-"+A[t[e+10]]+A[t[e+11]]+A[t[e+12]]+A[t[e+13]]+A[t[e+14]]+A[t[e+15]]).toLowerCase()}var Fr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:Fr};function Hr(t,e,i){if(ie.randomUUID&&!e&&!t)return ie.randomUUID();t=t||{};let n=t.random||(t.rng||ee)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){i=i||0;for(let r=0;r<16;++r)e[i+r]=n[r];return e}return Ri(n)}var Et=Hr;var H=globalThis.WebSocket,Wr=globalThis.Request,qr=globalThis.Response,St={prototype:{send:H.prototype.send},CLOSED:H.CLOSED,CLOSING:H.CLOSING,CONNECTING:H.CONNECTING,OPEN:H.OPEN},Gr=20,zr=[101,204,205,304],Xr=[301,302,303,307,308];var re=class{},Kr="!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~";function Qr(t){for(let e=0;e<t.length;e++){let i=t[e];if(!Kr.includes(i))return!1}return!0}var ne=class extends re{constructor(){super();Ut(this,"callbacks",{});Ut(this,"uid",Et());if(!("ServiceWorkerGlobalScope"in self))throw new TypeError("Attempt to construct RemoteClient from outside a service worker");addEventListener("message",i=>{if(i.data.__remote_target===this.uid){let n=this.callbacks[i.data.__remote_id];n(i.data.__remote_value)}})}async send(i,n){let r=await self.clients.matchAll();if(r.length<1)throw new Error("no available clients");for(let s of r)s.postMessage({__remote_target:this.uid,__remote_id:n,__remote_value:i})}async sendWithResponse(i){let n=Et();return new Promise(r=>{this.callbacks[n]=r,this.send(i,n)})}connect(i,n,r,s,o){return new H("")}async request(i,n,r,s,o,a,p){let u=await this.sendWithResponse({type:"request",options:{method:i,requestHeaders:n,body:r,remote:s.toString()}}),h=new qr(zr.includes(u.status)?void 0:u.body,{status:u.status,statusText:u.statusText??void 0,headers:new Headers(u.headers)});return h.rawHeaders=u.headers,h.rawResponse=u,h}},Yr=Object.getOwnPropertyDescriptor(H.prototype,"readyState").get,Zr=["ws:","wss:"],et;function Jr(t){et=t}"ServiceWorkerGlobalScope"in self&&Jr(new ne);var it=class{constructor(...e){}createWebSocket(e,i=[],n){if(!et)throw new TypeError("A request was made before the client was ready!! This is a problem on the end of whoever set the bare client implementation");try{e=new URL(e)}catch{throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${e}' is invalid.`)}if(!Zr.includes(e.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${e.protocol}' is not allowed.`);Array.isArray(i)||(i=[i]),i=i.map(String);for(let h of i)if(!Qr(h))throw new DOMException(`Failed to construct 'WebSocket': The subprotocol '${h}' is invalid.`);let r=et.connect(e,i,async()=>{let h=typeof n.headers=="function"?await n.headers():n.headers||{},m=h instanceof Headers?Object.fromEntries(h):h;return m.Host=e.host,m.Pragma="no-cache",m["Cache-Control"]="no-cache",m.Upgrade="websocket",m.Connection="Upgrade",m},h=>{s=h.protocol,n.setCookiesCallback&&n.setCookiesCallback(h.setCookies)},h=>{o=h},n.webSocketImpl||H),s="",o=St.CONNECTING,a=()=>{let h=Yr.call(r);return h===St.OPEN?o:h};n.readyStateHook?n.readyStateHook(r,a):Object.defineProperty(r,"readyState",{get:a,configurable:!0,enumerable:!0});let p=()=>{if(a()===St.CONNECTING)return new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.")};n.sendErrorHook?n.sendErrorHook(r,p):r.send=function(...h){let m=p();if(m)throw m;St.prototype.send.call(this,...h)},n.urlHook?n.urlHook(r,e):Object.defineProperty(r,"url",{get:()=>e.toString(),configurable:!0,enumerable:!0});let u=()=>s;return n.protocolHook?n.protocolHook(r,u):Object.defineProperty(r,"protocol",{get:u,configurable:!0,enumerable:!0}),r}async fetch(e,i){let n=new Wr(e,i),r=i?.headers||n.headers,s=r instanceof Headers?Object.fromEntries(r):r,o=i?.duplex,a=i?.body||n.body,p=new URL(n.url);if(!et)throw new TypeError("A request was made before the client was ready!! This is a problem on the end of whoever set the bare client implementation");for(let u=0;;u++){"host"in s?s.host=p.host:s.Host=p.host;let h=await et.request(n.method,s,a,p,n.cache,o,n.signal);h.finalURL=p.toString();let m=i?.redirect||n.redirect;if(Xr.includes(h.status))switch(m){case"follow":{let g=h.headers.get("location");if(Gr>u&&g!==null){p=new URL(g,p);continue}else throw new TypeError("Failed to fetch")}case"error":throw new TypeError("Failed to fetch");case"manual":return h}else return h}}};async function Ni(...t){return new it}var ae={};yt(ae,{parse:()=>en,serialize:()=>se});var tn=Object.prototype.toString,kt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function en(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var i={},n=(e||{}).decode||rn,r=0;r<t.length;){var s=t.indexOf("=",r);if(s===-1)break;var o=t.indexOf(";",r);if(o===-1)o=t.length;else if(o<s){r=t.lastIndexOf(";",s-1)+1;continue}var a=t.slice(r,s).trim();if(i[a]===void 0){var p=t.slice(s+1,o).trim();p.charCodeAt(0)===34&&(p=p.slice(1,-1)),i[a]=an(p,n)}r=o+1}return i}function se(t,e,i){var n=i||{},r=n.encode||nn;if(typeof r!="function")throw new TypeError("option encode is invalid");if(!kt.test(t))throw new TypeError("argument name is invalid");var s=r(e);if(s&&!kt.test(s))throw new TypeError("argument val is invalid");var o=t+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!kt.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!kt.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){var p=n.expires;sn(p)&&!isNaN(p.valueOf())||(o+="; Expires="+new Date(0).toUTCString()),o+="; Expires="+p.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}function rn(t){return t.indexOf("%")!==-1?decodeURIComponent(t):t}function nn(t){return encodeURIComponent(t)}function sn(t){return tn.call(t)==="[object Date]"||t instanceof Date}function an(t,e){try{return e(t)}catch{return t}}var Gi=Bt(Di(),1);var W={};Object.defineProperty(W,"__esModule",{value:!0}),W.GENERATOR=W.EXPRESSIONS_PRECEDENCE=W.NEEDS_PARENTHESES=void 0;function pn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mi(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ln(t,e,i){return e&&Mi(t.prototype,e),i&&Mi(t,i),t}var un=JSON.stringify;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");var Ct={"||":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},M=17;W.NEEDS_PARENTHESES=M;var $i,Vi,Bi,Ui,ji,Fi,Hi={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:M,ClassExpression:M,FunctionExpression:M,ObjectExpression:M,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Q(t,e){var i=t.generator;if(t.write("("),e!=null&&e.length>0){i[e[0].type](e[0],t);for(var n=e.length,r=1;r<n;r++){var s=e[r];t.write(", "),i[s.type](s,t)}}t.write(")")}function Wi(t,e,i,n){var r=t.expressionsPrecedence[e.type];if(r===M)return!0;var s=t.expressionsPrecedence[i.type];return r!==s?!n&&r===15&&s===14&&i.operator==="**"||r<s:(r===13||r===14)&&(e.operator==="**"&&i.operator==="**"?!n:n?Ct[e.operator]<=Ct[i.operator]:Ct[e.operator]<Ct[i.operator])}function At(t,e,i,n){var r=t.generator;Wi(t,e,i,n)?(t.write("("),r[e.type](e,t),t.write(")")):r[e.type](e,t)}function hn(t,e,i,n){var r=e.split(`
|
|
`),s=r.length-1;if(t.write(r[0].trim()),s>0){t.write(n);for(var o=1;o<s;o++)t.write(i+r[o].trim()+n);t.write(i+r[s].trim())}}function R(t,e,i,n){for(var r=e.length,s=0;s<r;s++){var o=e[s];t.write(i),o.type[0]==="L"?t.write("// "+o.value.trim()+`
|
|
`,o):(t.write("/*"),hn(t,o.value,i,n),t.write("*/"+n))}}function dn(t){for(var e=t;e!=null;){var i=e.type;if(i[0]==="C"&&i[1]==="a")return!0;if(i[0]!=="M"||i[1]!=="e"||i[2]!=="m")return!1;e=e.object}}function pe(t,e){var i=t.generator,n=e.declarations;t.write(e.kind+" ");var r=n.length;if(r>0){i.VariableDeclarator(n[0],t);for(var s=1;s<r;s++)t.write(", "),i.VariableDeclarator(n[s],t)}}W.EXPRESSIONS_PRECEDENCE=Hi;var le={Program:function(t,e){var i=e.indent.repeat(e.indentLevel),n=e.lineEnd,r=e.writeComments;r&&t.comments!=null&&R(e,t.comments,i,n);for(var s=t.body,o=s.length,a=0;a<o;a++){var p=s[a];r&&p.comments!=null&&R(e,p.comments,i,n),e.write(i),this[p.type](p,e),e.write(n)}r&&t.trailingComments!=null&&R(e,t.trailingComments,i,n)},ParenthesizedExpression:function(t,e){e.write("("),this[t.expression.type](t.expression,e),e.write(")")},BlockStatement:Fi=function(t,e){var i=e.indent.repeat(e.indentLevel++),n=e.lineEnd,r=e.writeComments,s=i+e.indent;e.write("{");var o=t.body;if(o!=null&&o.length>0){e.write(n),r&&t.comments!=null&&R(e,t.comments,s,n);for(var a=o.length,p=0;p<a;p++){var u=o[p];r&&u.comments!=null&&R(e,u.comments,s,n),e.write(s),this[u.type](u,e),e.write(n)}e.write(i)}else r&&t.comments!=null&&(e.write(n),R(e,t.comments,s,n),e.write(i));r&&t.trailingComments!=null&&R(e,t.trailingComments,s,n),e.write("}"),e.indentLevel--},ClassBody:Fi,StaticBlock:function(t,e){e.write("static "),this.BlockStatement(t,e)},EmptyStatement:function(t,e){e.write(";")},ExpressionStatement:function(t,e){var i=e.expressionsPrecedence[t.expression.type];i===M||i===3&&t.expression.left.type[0]==="O"?(e.write("("),this[t.expression.type](t.expression,e),e.write(")")):this[t.expression.type](t.expression,e),e.write(";")},IfStatement:function(t,e){e.write("if ("),this[t.test.type](t.test,e),e.write(") "),this[t.consequent.type](t.consequent,e),t.alternate!=null&&(e.write(" else "),this[t.alternate.type](t.alternate,e))},LabeledStatement:function(t,e){this[t.label.type](t.label,e),e.write(": "),this[t.body.type](t.body,e)},BreakStatement:function(t,e){e.write("break"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},ContinueStatement:function(t,e){e.write("continue"),t.label!=null&&(e.write(" "),this[t.label.type](t.label,e)),e.write(";")},WithStatement:function(t,e){e.write("with ("),this[t.object.type](t.object,e),e.write(") "),this[t.body.type](t.body,e)},SwitchStatement:function(t,e){var i=e.indent.repeat(e.indentLevel++),n=e.lineEnd,r=e.writeComments;e.indentLevel++;var s=i+e.indent,o=s+e.indent;e.write("switch ("),this[t.discriminant.type](t.discriminant,e),e.write(") {"+n);for(var a=t.cases,p=a.length,u=0;u<p;u++){var h=a[u];r&&h.comments!=null&&R(e,h.comments,s,n),h.test?(e.write(s+"case "),this[h.test.type](h.test,e),e.write(":"+n)):e.write(s+"default:"+n);for(var m=h.consequent,g=m.length,w=0;w<g;w++){var E=m[w];r&&E.comments!=null&&R(e,E.comments,o,n),e.write(o),this[E.type](E,e),e.write(n)}}e.indentLevel-=2,e.write(i+"}")},ReturnStatement:function(t,e){e.write("return"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e)),e.write(";")},ThrowStatement:function(t,e){e.write("throw "),this[t.argument.type](t.argument,e),e.write(";")},TryStatement:function(t,e){if(e.write("try "),this[t.block.type](t.block,e),t.handler){var i=t.handler;i.param==null?e.write(" catch "):(e.write(" catch ("),this[i.param.type](i.param,e),e.write(") ")),this[i.body.type](i.body,e)}t.finalizer&&(e.write(" finally "),this[t.finalizer.type](t.finalizer,e))},WhileStatement:function(t,e){e.write("while ("),this[t.test.type](t.test,e),e.write(") "),this[t.body.type](t.body,e)},DoWhileStatement:function(t,e){e.write("do "),this[t.body.type](t.body,e),e.write(" while ("),this[t.test.type](t.test,e),e.write(");")},ForStatement:function(t,e){if(e.write("for ("),t.init!=null){var i=t.init;i.type[0]==="V"?pe(e,i):this[i.type](i,e)}e.write("; "),t.test&&this[t.test.type](t.test,e),e.write("; "),t.update&&this[t.update.type](t.update,e),e.write(") "),this[t.body.type](t.body,e)},ForInStatement:$i=function(t,e){e.write("for ".concat(t.await?"await ":"","("));var i=t.left;i.type[0]==="V"?pe(e,i):this[i.type](i,e),e.write(t.type[3]==="I"?" in ":" of "),this[t.right.type](t.right,e),e.write(") "),this[t.body.type](t.body,e)},ForOfStatement:$i,DebuggerStatement:function(t,e){e.write("debugger;",t)},FunctionDeclaration:Vi=function(t,e){e.write((t.async?"async ":"")+(t.generator?"function* ":"function ")+(t.id?t.id.name:""),t),Q(e,t.params),e.write(" "),this[t.body.type](t.body,e)},FunctionExpression:Vi,VariableDeclaration:function(t,e){pe(e,t),e.write(";")},VariableDeclarator:function(t,e){this[t.id.type](t.id,e),t.init!=null&&(e.write(" = "),this[t.init.type](t.init,e))},ClassDeclaration:function(t,e){if(e.write("class "+(t.id?"".concat(t.id.name," "):""),t),t.superClass){e.write("extends ");var i=t.superClass,n=i.type,r=e.expressionsPrecedence[n];n[0]==="C"&&n[1]==="l"&&n[5]==="E"||!(r===M||r<e.expressionsPrecedence.ClassExpression)?this[i.type](i,e):(e.write("("),this[t.superClass.type](i,e),e.write(")")),e.write(" ")}this.ClassBody(t.body,e)},ImportDeclaration:function(t,e){e.write("import ");var i=t.specifiers,n=i.length,r=0;if(n>0){for(;r<n;){r>0&&e.write(", ");var s=i[r],o=s.type[6];if(o==="D")e.write(s.local.name,s),r++;else{if(o!=="N")break;e.write("* as "+s.local.name,s),r++}}if(r<n){for(e.write("{");;){var a=i[r],p=a.imported.name;if(e.write(p,a),p!==a.local.name&&e.write(" as "+a.local.name),!(++r<n))break;e.write(", ")}e.write("}")}e.write(" from ")}this.Literal(t.source,e),e.write(";")},ImportExpression:function(t,e){e.write("import("),this[t.source.type](t.source,e),e.write(")")},ExportDefaultDeclaration:function(t,e){e.write("export default "),this[t.declaration.type](t.declaration,e),e.expressionsPrecedence[t.declaration.type]!=null&&t.declaration.type[0]!=="F"&&e.write(";")},ExportNamedDeclaration:function(t,e){if(e.write("export "),t.declaration)this[t.declaration.type](t.declaration,e);else{e.write("{");var i=t.specifiers,n=i.length;if(n>0)for(var r=0;;){var s=i[r],o=s.local.name;if(e.write(o,s),o!==s.exported.name&&e.write(" as "+s.exported.name),!(++r<n))break;e.write(", ")}e.write("}"),t.source&&(e.write(" from "),this.Literal(t.source,e)),e.write(";")}},ExportAllDeclaration:function(t,e){t.exported!=null?e.write("export * as "+t.exported.name+" from "):e.write("export * from "),this.Literal(t.source,e),e.write(";")},MethodDefinition:function(t,e){t.static&&e.write("static ");var i=t.kind[0];i!=="g"&&i!=="s"||e.write(t.kind+" "),t.value.async&&e.write("async "),t.value.generator&&e.write("*"),t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),Q(e,t.value.params),e.write(" "),this[t.value.body.type](t.value.body,e)},ClassExpression:function(t,e){this.ClassDeclaration(t,e)},ArrowFunctionExpression:function(t,e){e.write(t.async?"async ":"",t);var i=t.params;i!=null&&(i.length===1&&i[0].type[0]==="I"?e.write(i[0].name,i[0]):Q(e,t.params)),e.write(" => "),t.body.type[0]==="O"?(e.write("("),this.ObjectExpression(t.body,e),e.write(")")):this[t.body.type](t.body,e)},ThisExpression:function(t,e){e.write("this",t)},Super:function(t,e){e.write("super",t)},RestElement:Bi=function(t,e){e.write("..."),this[t.argument.type](t.argument,e)},SpreadElement:Bi,YieldExpression:function(t,e){e.write(t.delegate?"yield*":"yield"),t.argument&&(e.write(" "),this[t.argument.type](t.argument,e))},AwaitExpression:function(t,e){e.write("await ",t),At(e,t.argument,t)},TemplateLiteral:function(t,e){var i=t.quasis,n=t.expressions;e.write("`");for(var r=n.length,s=0;s<r;s++){var o=n[s],a=i[s];e.write(a.value.raw,a),e.write("${"),this[o.type](o,e),e.write("}")}var p=i[i.length-1];e.write(p.value.raw,p),e.write("`")},TemplateElement:function(t,e){e.write(t.value.raw,t)},TaggedTemplateExpression:function(t,e){At(e,t.tag,t),this[t.quasi.type](t.quasi,e)},ArrayExpression:ji=function(t,e){if(e.write("["),t.elements.length>0)for(var i=t.elements,n=i.length,r=0;;){var s=i[r];if(s!=null&&this[s.type](s,e),!(++r<n)){s==null&&e.write(", ");break}e.write(", ")}e.write("]")},ArrayPattern:ji,ObjectExpression:function(t,e){var i=e.indent.repeat(e.indentLevel++),n=e.lineEnd,r=e.writeComments,s=i+e.indent;if(e.write("{"),t.properties.length>0){e.write(n),r&&t.comments!=null&&R(e,t.comments,s,n);for(var o=","+n,a=t.properties,p=a.length,u=0;;){var h=a[u];if(r&&h.comments!=null&&R(e,h.comments,s,n),e.write(s),this[h.type](h,e),!(++u<p))break;e.write(o)}e.write(n),r&&t.trailingComments!=null&&R(e,t.trailingComments,s,n),e.write(i+"}")}else r?t.comments!=null?(e.write(n),R(e,t.comments,s,n),t.trailingComments!=null&&R(e,t.trailingComments,s,n),e.write(i+"}")):t.trailingComments!=null?(e.write(n),R(e,t.trailingComments,s,n),e.write(i+"}")):e.write("}"):e.write("}");e.indentLevel--},Property:function(t,e){t.method||t.kind[0]!=="i"?this.MethodDefinition(t,e):(t.shorthand||(t.computed?(e.write("["),this[t.key.type](t.key,e),e.write("]")):this[t.key.type](t.key,e),e.write(": ")),this[t.value.type](t.value,e))},PropertyDefinition:function(t,e){t.static&&e.write("static "),t.computed&&e.write("["),this[t.key.type](t.key,e),t.computed&&e.write("]"),t.value!=null?(e.write(" = "),this[t.value.type](t.value,e),e.write(";")):t.key.type[0]!=="F"&&e.write(";")},ObjectPattern:function(t,e){if(e.write("{"),t.properties.length>0)for(var i=t.properties,n=i.length,r=0;this[i[r].type](i[r],e),++r<n;)e.write(", ");e.write("}")},SequenceExpression:function(t,e){Q(e,t.expressions)},UnaryExpression:function(t,e){if(t.prefix){var i=t.operator,n=t.argument,r=t.argument.type;e.write(i);var s=Wi(e,n,t);s||!(i.length>1)&&(r[0]!=="U"||r[1]!=="n"&&r[1]!=="p"||!n.prefix||n.operator[0]!==i||i!=="+"&&i!=="-")||e.write(" "),s?(e.write(i.length>1?" (":"("),this[r](n,e),e.write(")")):this[r](n,e)}else this[t.argument.type](t.argument,e),e.write(t.operator)},UpdateExpression:function(t,e){t.prefix?(e.write(t.operator),this[t.argument.type](t.argument,e)):(this[t.argument.type](t.argument,e),e.write(t.operator))},AssignmentExpression:function(t,e){this[t.left.type](t.left,e),e.write(" "+t.operator+" "),this[t.right.type](t.right,e)},AssignmentPattern:function(t,e){this[t.left.type](t.left,e),e.write(" = "),this[t.right.type](t.right,e)},BinaryExpression:Ui=function(t,e){var i=t.operator==="in";i&&e.write("("),At(e,t.left,t,!1),e.write(" "+t.operator+" "),At(e,t.right,t,!0),i&&e.write(")")},LogicalExpression:Ui,ConditionalExpression:function(t,e){var i=t.test,n=e.expressionsPrecedence[i.type];n===M||n<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[i.type](i,e),e.write(")")):this[i.type](i,e),e.write(" ? "),this[t.consequent.type](t.consequent,e),e.write(" : "),this[t.alternate.type](t.alternate,e)},NewExpression:function(t,e){e.write("new ");var i=e.expressionsPrecedence[t.callee.type];i===M||i<e.expressionsPrecedence.CallExpression||dn(t.callee)?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),Q(e,t.arguments)},CallExpression:function(t,e){var i=e.expressionsPrecedence[t.callee.type];i===M||i<e.expressionsPrecedence.CallExpression?(e.write("("),this[t.callee.type](t.callee,e),e.write(")")):this[t.callee.type](t.callee,e),t.optional&&e.write("?."),Q(e,t.arguments)},ChainExpression:function(t,e){this[t.expression.type](t.expression,e)},MemberExpression:function(t,e){var i=e.expressionsPrecedence[t.object.type];i===M||i<e.expressionsPrecedence.MemberExpression?(e.write("("),this[t.object.type](t.object,e),e.write(")")):this[t.object.type](t.object,e),t.computed?(t.optional&&e.write("?."),e.write("["),this[t.property.type](t.property,e),e.write("]")):(t.optional?e.write("?."):e.write("."),this[t.property.type](t.property,e))},MetaProperty:function(t,e){e.write(t.meta.name+"."+t.property.name,t)},Identifier:function(t,e){e.write(t.name,t)},PrivateIdentifier:function(t,e){e.write("#".concat(t.name),t)},Literal:function(t,e){t.raw!=null?e.write(t.raw,t):t.regex!=null?this.RegExpLiteral(t,e):t.bigint!=null?e.write(t.bigint+"n",t):e.write(un(t.value),t)},RegExpLiteral:function(t,e){var i=t.regex;e.write("/".concat(i.pattern,"/").concat(i.flags),t)}};W.GENERATOR=le;var mn={},yn=le;W.baseGenerator=yn;var fn=function(){function t(e){pn(this,t);var i=e??mn;this.output="",i.output!=null?(this.output=i.output,this.write=this.writeToStream):this.output="",this.generator=i.generator!=null?i.generator:le,this.expressionsPrecedence=i.expressionsPrecedence!=null?i.expressionsPrecedence:Hi,this.indent=i.indent!=null?i.indent:" ",this.lineEnd=i.lineEnd!=null?i.lineEnd:`
|
|
`,this.indentLevel=i.startingIndentLevel!=null?i.startingIndentLevel:0,this.writeComments=!!i.comments&&i.comments,i.sourceMap!=null&&(this.write=i.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=i.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
|
|
`).length-1,this.mapping={original:null,generated:this,name:void 0,source:i.sourceMap.file||i.sourceMap._file})}return ln(t,[{key:"write",value:function(e){this.output+=e}},{key:"writeToStream",value:function(e){this.output.write(e)}},{key:"writeAndMap",value:function(e,i){this.output+=e,this.map(e,i)}},{key:"writeToStreamAndMap",value:function(e,i){this.output.write(e),this.map(e,i)}},{key:"map",value:function(e,i){if(i!=null){var n=i.type;if(n[0]==="L"&&n[2]==="n")return this.column=0,void this.line++;if(i.loc!=null){var r=this.mapping;r.original=i.loc.start,r.name=i.name,this.sourceMap.addMapping(r)}if(n[0]==="T"&&n[8]==="E"||n[0]==="L"&&n[1]==="i"&&typeof i.value=="string"){for(var s=e.length,o=this.column,a=this.line,p=0;p<s;p++)e[p]===`
|
|
`?(o=0,a++):o++;return this.column=o,void(this.line=a)}}var u=e.length,h=this.lineEnd;u>0&&(this.lineEndSize>0&&(h.length===1?e[u-1]===h:e.endsWith(h))?(this.line+=this.lineEndSize,this.column=0):this.column+=u)}},{key:"toString",value:function(){return this.output}}]),t}();function qi(t,e){var i=new fn(e);return i.generator[t.type](t,i),i.output}var ue=class{constructor(e){this.mime=gi;this.idb=gt;this.path=gn;this.acorn={parse:Ti};this.bare={createBareClient:Ni,BareClient:it};this.base64=_t;this.estree={generate:qi};this.cookie={...ae,serialize:(...e)=>{try{return se.apply({},e)}catch(i){console.log(i)}}};this.setCookieParser=Gi.parse;this.ctx=e}},zi=ue;function he(t,e,i,n,r="",s=!1,o=""){if(self.__dynamic$config)var a=self.__dynamic$config.mode=="development";else var a=!1;if(s){var p=[{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:t+(a?"?"+Math.floor(Math.random()*89999+1e4):"")}]},{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:e+(a?"?"+Math.floor(Math.random()*89999+1e4):"")}]}];return this.ctx.config.assets.files.inject&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:this.ctx.config.assets.files.inject+(a?"?"+Math.floor(Math.random()*(99999-1e4)+1e4):"")}]}),n&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(`self.__dynamic$cookies = atob("${btoa(n)}");document.currentScript?.remove();`)}]}),r&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(r+";document.currentScript?.remove();")}]}),o&&p.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(o+";document.currentScript?.remove();")}]}),p}else{var u=[`<script src="${e+(a?"?"+Math.floor(Math.random()*89999+1e4):"")}"><\/script>`,`<script src="${t+(a?"?"+Math.floor(Math.random()*89999+1e4):"")}"><\/script>`];return this.ctx.config.assets.files.inject&&u.unshift(`<script src="${this.ctx.config.assets.files.inject+(a?"?"+Math.floor(Math.random()*(99999-1e4)+1e4):"")}"><\/script>`),n&&u.unshift(`<script src="${"data:application/javascript;base64,"+btoa(`self.__dynamic$cookies = atob("${btoa(n)}");document.currentScript?.remove();`)}"><\/script>`),r&&u.unshift(`<script src="${"data:application/javascript;base64,"+btoa(r+";document.currentScript?.remove();")}"><\/script>`),o&&u.unshift(`<script src="${"data:application/javascript;base64,"+btoa(o+";document.currentScript?.remove();")}"><\/script>`),u}}var nt=class{constructor(e){this.generateHead=he;this.config=[{elements:"all",tags:["style"],action:"css"},{elements:["script","iframe","embed","input","track","media","source","img","a","link","area","form","object"],tags:["src","href","action","data"],action:"url"},{elements:["source","img"],tags:["srcset"],action:"srcset"},{elements:["script","link"],tags:["integrity"],action:"rewrite",new:"nointegrity"},{elements:["script","link"],tags:["nonce"],action:"rewrite",new:"nononce"},{elements:["meta"],tags:["http-equiv"],action:"http-equiv"},{elements:["iframe"],tags:["srcdoc"],action:"html"},{elements:["link"],tags:["imagesrcset"],action:"srcset"},{elements:"all",tags:["onclick"],action:"js"}];this.ctx=e.ctx}generateRedirect(e){return`
|
|
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
|
|
<TITLE>301 Moved</TITLE></HEAD><BODY>
|
|
<H1>301 Moved</H1>
|
|
The document has moved
|
|
<A HREF="${e}">here</A>.
|
|
</BODY></HTML>
|
|
`}iterate(e,i){function n(r=e){for(var s=0;s<r.childNodes.length;s++)i(r.childNodes[s]),r.childNodes[s].childNodes&&r.childNodes[s].childNodes.length&&n(r.childNodes[s])}n(e)}rewrite(e,i,n=[]){return Array.isArray(e)&&(e=e[0]),!e||(e=e.toString(),!e.match(/<(html|script|style)[^>]*>/g)&&e.match(/<\!DOCTYPE[^>]*>/gi))?e:e.replace(/(<!DOCTYPE html>|<html(.*?)>)/im,`$1${n.join("")}
|
|
`).replace(/<(script|link)\b[^>]*>/g,(r,s)=>r.replace(/\snonce\s*=\s*"[^"]*"/,o=>o.replace("nonce","nononce")).replace(/\sintegrity\s*=\s*"[^"]*"/,o=>o.replace("integrity","nointegrity")))}};var st=class{constructor(e){this.ctx=e.ctx}rewrite(e,i,n={}){let r=this;return e&&e.toString().replace(/((@import ['"`]+|url\(['"`]?)(.*?)(['"`]?\)|['"`]+))/gmi,function(){try{return arguments[0].replace(arguments[3],r.ctx.url.encode(arguments[3],i))}catch{}})}};function de(t,e){if(typeof t!="object"||!e)return;i(t,null,e);function i(n,r,s){if(!(typeof n!="object"||!s)){n.parent=r,s(n,r,s);for(let o in n)o!=="parent"&&(Array.isArray(n[o])?n[o].forEach(a=>{a&&i(a,n,s)}):n[o]&&i(n[o],n,s));typeof n.iterateEnd=="function"&&n.iterateEnd()}}}function me(t,e={},i,n){var r=this.ctx.modules.acorn.parse(t.toString(),{sourceType:e.module?"module":"script",allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,ecmaVersion:"latest",preserveParens:!0,loose:!0,allowReserved:!0});return this.iterate(r,(s,o=null)=>{this.emit(s,s.type,o,i,n,e)}),t=this.ctx.modules.estree.generate(r),t}function ye(t,e={}){if(typeof t.name!="string")return!1;if(t.__dynamic!==!0){if(!["parent","top","postMessage","opener","window","self","globalThis","parent","location"].includes(t.name))return!1;if(!(e.type=="CallExpression"&&e.callee==t)&&!(e.type=="MemberExpression"&&e.object!==t&&!["document","window","self","globalThis"].includes(e.object.name))&&e.type!="FunctionDeclaration"&&e.type!="VariableDeclaration"&&!(e.type=="VariableDeclarator"&&e.id==t)&&e.type!="LabeledStatement"&&!(e.type=="Property"&&e.key==t)&&!(e.type=="ArrowFunctionExpression"&&e.params.includes(t))&&!(e.type=="FunctionExpression"&&e.params.includes(t))&&!(e.type=="FunctionExpression"&&e.id==t)&&!(e.type=="CatchClause"&&e.param==t)&&e.type!="ContinueStatement"&&e.type!="BreakStatement"&&!(e.type=="AssignmentExpression"&&e.left==t)&&e.type!="UpdateExpression"&&e.type!="UpdateExpression"&&!(e.type=="ForInStatement"&&e.left==t)&&!(e.type=="MethodDefinition"&&e.key==t)&&!(e.type=="AssignmentPattern"&&e.left==t)&&e.type!="NewExpression"&&e?.parent?.type!="NewExpression"&&!(e.type=="UnaryExpression"&&e.argument==t)&&!(e.type=="Property"&&e.shorthand==!0&&e.value==t)){if(t.name=="__dynamic")return t.name="undefined";if(t.name=="eval"&&e.right!==t)return t.name="__dynamic$eval";t.name=`dg$(${t.name})`}}}function Y(t,e={}){Object.entries({type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"self"},property:{type:"Identifier",name:"__dynamic$message"}},arguments:[t.object||t,{type:"Identifier",name:"self",__dynamic:!0}]}).forEach(([i,n])=>t[i]=n)}function fe(t,e={},i={}){if(t.object.name+="",e.type!=="AssignmentExpression"&&e.left!==t){if(t.property.value=="postMessage"&&e.type=="CallExpression"&&e.callee==t)return Y(t,e);if(t.object.value=="postMessage"&&e.type=="CallExpression"&&e.callee==t)return Y(t,e);if((t.property.name=="postMessage"||t.object.name=="postMessage")&&t.object.type!=="Super"){var n=t.object?.name;t.type="CallExpression",t.callee={type:"Identifier",name:"__dynamic$message"},t.arguments=[{type:"Identifier",name:n},{type:"Identifier",name:"self",__dynamic:!0}],e.type=="CallExpression"&&(e.arguments=e.arguments);return}}if(t.property.name=="eval"&&(t.property.name="__dynamic$eval"),t.object.name=="eval"&&(t.object.name="__dynamic$eval"),i.destination!=="worker"&&(t.property.name=="window"&&t.object.name!="top"&&(t.object.name=="self"||t.object.name=="globalThis")&&e.type!=="NewExpression"&&(e.type!=="CallExpression"||e.type=="CallExpression"&&t!==e.callee)&&(t.property.name="__dynamic$window"),t.object.name=="top"&&e.type!=="NewExpression"&&(e.type!=="CallExpression"||e.type=="CallExpression"&&t!==e.callee)&&(t.object.name="top.__dynamic$window"),t.property.name=="top"&&(t.object.name=="self"||t.object.name=="globalThis")&&e.type!=="NewExpression"&&(e.type!=="CallExpression"||e.type=="CallExpression"&&t!==e.callee)&&(t.property.name="top.__dynamic$window"),e.type!=="NewExpression"&&(e.type!=="CallExpression"||e.type=="CallExpression"&&t!==e.callee)&&(t.object.name=="window"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0}),t.object.name=="parent"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0}),t.property.name=="__dynamic"&&(t.property.name="undefined"),t.object.name=="self"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0}),t.object.name=="document"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0}),t.object.name=="globalThis"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0})),t.object.name=="location"&&(t.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[t.object],__dynamic:!0}),t.property.name=="location"&&e.type!=="BinaryExpression"&&e.type!=="AssignmentExpression")){t.property.__dynamic=!0,t.__dynamic=!0;let r=Object.assign({},t);t.type="CallExpression",t.callee={type:"Identifier",name:"dg$",__dynamic:!0},t.arguments=[r],t.__dynamic=!0}t.computed&&i.destination!=="worker"&&(t.property={type:"CallExpression",callee:{type:"Identifier",name:"dp$"},arguments:[t.property],__dynamic:!0})}function ge(t,e={}){if(!(t.value instanceof String)||(t.value=="__dynamic"&&(t.value="undefined"),!["location","parent","top","postMessage"].includes(t.value)))return!1;t.value=="postMessage"&&e.type!="AssignmentExpression"&&e.left!=t&&Y(t,e),t.value=="location"&&(t.value="__dynamic$location"),t.value=="__dynamic"&&(t.value="undefined"),t.value=="eval"&&(t.value="__dynamic$eval")}function Lt(t,e={}){t.__dynamic||t.arguments.length&&(t.arguments=[{type:"CallExpression",callee:{type:"Identifier",name:"__dynamic$wrapEval",__dynamic:!0},arguments:t.arguments,__dynamic:!0}],t.__dynamic=!0)}function _e(t,e={}){if(!(e.type=="AssignmentExpression"&&e.left==t)){if(t.callee.type=="Identifier"){if(t.callee.name=="postMessage"){let i="undefined";t.callee.type="CallExpression",t.callee.callee={type:"Identifier",name:"__dynamic$message"},t.callee.arguments=[{type:"Identifier",name:i},{type:"Identifier",name:"self",__dynamic:!0}];return}t.callee.name=="eval"&&Lt(t)}if(t.callee.type=="MemberExpression"){if(t.callee.property.name=="postMessage"&&t.callee.object.type!=="Super"){let i=t.callee.object;t.callee.type="CallExpression",t.callee.callee={type:"Identifier",name:"__dynamic$message"},t.callee.arguments=[i,{type:"Identifier",name:"self",__dynamic:!0}];return}t.callee.object.name=="eval"&&Lt(t)}t.arguments.length>0&&t.arguments.length<4;try{}catch{}}}function xe(t,e={}){if(t.left.type=="Identifier"){if(t.left.__dynamic===!0)return;if(t.left.name=="location"){var i=structuredClone(t.left),n=structuredClone(t.right);t.right.type="CallExpression",t.right.callee={type:"Identifier",name:"ds$"},t.right.arguments=[i,n]}}}function we(t,e={}){t.parent.type!="ObjectPattern"&&t.parent?.parent?.type!="AssignmentExpression"&&(t.shorthand=!1)}function be(t,e={},i={},n={}){if(t.type=="Literal"&&(e.type=="ImportDeclaration"||e.type=="ExportNamedDeclaration"||e.type=="ExportAllDeclaration")){var r=t.value+"";t.value=i.url.encode(t.value,n.meta),t.raw=t.raw.replace(r,t.value),t.__dynamic=!0}t.type=="ImportExpression"&&(t.source={type:"CallExpression",callee:{type:"Identifier",name:"__dynamic$import"},arguments:[t.source,{type:"Literal",__dynamic:!0,value:i.meta.href}]},t.__dynamic=!0)}function ve(t,e={}){if(t.id.type!=="Identifier")return!1;t.id.__dynamic!==!0&&t.id.name!="location"}function _n(t,e,i={},n={},r={},s={}){if(!t.__dynamic){switch(e){case"Identifier":ye(t,i);break;case"MemberExpression":fe(t,i,s);break;case"Literal":ge(t,i);break;case"CallExpression":_e(t,i);break;case"AssignmentExpression":xe(t,i);break;case"ThisExpression":break;case"Property":we(t,i);break;case"VariableDeclarator":ve(t,i);break;case"CatchClause":break;default:break}be(t,i,n,r)}}var Xi=_n;var at=class{constructor(e){this.iterate=de;this.process=me;this.emit=Xi;this.ctx=e.ctx}rewrite(e,i={},n=!0,r={}){if(!e||e instanceof Object||(e=e.toString(),e.includes("/* dynamic.js */")))return e;e=`/* dynamic.js */
|
|
|
|
${e}`;try{try{e=this.process(e,i,{module:!0,...this.ctx},r)}catch{e=this.process(e,i,{module:!1,...this.ctx},r)}}catch{}return n&&(e=`
|
|
if (typeof self !== undefined && typeof self.importScripts == 'function' && typeof self.__dynamic == 'undefined') importScripts('/dynamic/dynamic.config.js', '/dynamic/dynamic.handler.js?'+Math.floor(Math.random()*(99999-10000)+10000));
|
|
|
|
${e}`),e}};var ot=class{constructor(e){this.config={rewrite:[["icons","urlit"],["name"," - Dynamic"],["start_url","url"],["scope","url"],["short_name"," - Dynamic"],["shortcuts","urlev"]],delete:["serviceworker"]};this.ctx=e.ctx}rewrite(e,i){let n=JSON.parse(e);for(let a in this.config)if(a=="rewrite")for(var[r,s]of this.config[a]){if(s=="urlit"&&n[r]){for(var o=0;o<n[r].length;o++)n[r][o].src=this.ctx.url.encode(n[r][o].src,i);continue}if(s=="urlev"&&n[r]){for(var o=0;o<n[r].length;o++)n[r][o].url=this.ctx.url.encode(n[r][o].url,i);continue}if(s=="url"&&n[r]){n[r]=this.ctx.url.encode(n[r],i);continue}s=="url"||s=="urlit"||s=="urlev"||(n[r]=n[r]+s)}else if(a=="delete")for(var r of this.config[a])n[r]&&delete n[r];return JSON.stringify(n)}};var Ki={encode(t,e){return!t||!t.toString()?t:t.split(", ").map(i=>i.split(" ").map((n,r)=>r==0?e.url.encode(n,e.baseURL||e.meta):n).join(" ")).join(", ")},decode(t){return t}};var Ee=class{constructor(e){this.ctx=e,this.html=new nt(this),this.srcset=Ki,this.js=new at(this),this.css=new st(this),this.man=new ot(this)}},Qi=Ee;async function Yi(t){var e;if(t.method==="GET"){var i=new URL(t.url);e=i.searchParams.get("url")}else if(t.method==="POST"){if(e=(await t.formData()).get("url"),e===null){var i=new URL(t.url);e=i.searchParams.get("url")}if(!e)return new Response("Error: Invalid or Unfound url",{status:400})}else return new Response("Error: Invalid method",{status:405});return new Response("",{status:301,headers:{location:location.origin+this.ctx.config.prefix+this.ctx.encoding.encode(e)}})}function Zi({url:t}){return!t.toString().substr(location.origin.length,(this.ctx.config.prefix+"route").length).startsWith(this.ctx.config.prefix+"route")}function Se({url:t}){return!t.toString().substr(location.origin.length,this.ctx.config.prefix.length).startsWith(this.ctx.config.prefix)}async function ke(t,e,i){for(let r in t){if(this.ctx.headers.csp.indexOf(r.toLowerCase())!==-1&&delete t[r],r.toLowerCase()=="location"){t[r]=this.ctx.url.encode(t[r],e);continue}if(r.toLowerCase()==="set-cookie"){Array.isArray(t[r])?t[r]=t[r].map(s=>this.ctx.modules.setCookieParser(s,{decodeValues:!1})[0]):t[r]=this.ctx.modules.setCookieParser(t[r],{decodeValues:!1});for await(var n of t[r])await i.set(e.host,this.ctx.modules.cookie.serialize(n.name,n.value,{...n,encode:s=>s}));delete t[r];continue}}return new Headers(t)}function Ce(t,e,i,n){let{referrer:r}=i;if(["origin","Origin","host","Host","referer","Referer"].forEach(s=>{t[s]&&delete t[s]}),t.Origin=`${e.protocol}//${e.host}${e.port?":"+e.port:""}`,t.Host=e.host+(e.port?":"+e.port:""),t.Referer=e.href,i.referrerPolicy=="strict-origin-when-cross-origin"&&(t.Referer=`${e.protocol}//${e.host}/`),i.referrerPolicy=="origin"&&e.origin&&(r=e.origin+"/"),n){switch(i.credentials){case"omit":break;case"same-origin":i.client&&e.origin==i.client.__dynamic$location.origin&&(t.Cookie=n),i.client||(t.Cookie=n);break;case"include":t.Cookie=n;break;default:break}t.Cookie=n}if(r&&r!=location.origin+"/")try{t.Referer=this.ctx.url.decode(r),i.referrerPolicy=="strict-origin-when-cross-origin"&&(t.Referer=new URL(this.ctx.url.decode(r)).origin),t.Origin=new URL(this.ctx.url.decode(r)).origin}catch{}return i.client&&(t.Origin=i.client.__dynamic$location.origin,t.Referer=i.client.__dynamic$location.href,i.referrerPolicy=="strict-origin-when-cross-origin"&&(t.Referer=i.client.__dynamic$location.origin)),this.ctx.config.tab&&this.ctx.config.tab.ua&&(delete t["user-agent"],delete t["User-Agent"],t["user-agent"]=this.ctx.config.tab.ua),t["sec-fetch-dest"]=i.destination||"empty",t["sec-fetch-mode"]=i.mode||"cors",t["sec-fetch-site"]=i.client?i.client.__dynamic$location.origin==e.origin?i.client.__dynamic$location.port==e.port?"same-origin":"same-site":"cross-origin":"none",i.mode=="navigate"&&(t["sec-fetch-site"]="same-origin"),t["sec-fetch-user"]="?1",new Headers(t)}function Ae(t){var e=Object.assign(Object.create(Object.getPrototypeOf(t)),t);return e}function Le(t){try{if(new new Proxy(t,{construct:()=>({})}),!Object.getOwnPropertyNames(t).includes("arguments"))throw new Error("");return!0}catch{return!1}}function Pe(t){return t.url.toString().substr(location.origin.length,t.url.toString().length).startsWith(self.__dynamic$config.assets.prefix)}async function Ie(t){let e;if(self.__dynamic$config.mode!=="development"){var i=await caches.open("__dynamic$files");i?e=await i.match(t.url)||await fetch(t):e=await fetch(t)}else e=await fetch(t);let n=await e.blob();return(t.url.startsWith(location.origin+"/dynamic/dynamic.config.js")||t.url.startsWith(location.origin+"/dynamic/dynamic.client.js"))&&(n=new Blob([`${await n.text()}
|
|
self.document?.currentScript?.remove();`],{type:"application/javascript"})),new Response(n,{headers:e.headers,status:e.status,statusText:e.statusText})}async function Te(t,e){}var ct=class{constructor(e){this.rawHeaders={};this.headers=new Headers({});this.status=200;this.statusText="OK";this.body=e}async blob(){return this.body}async text(){return await this.body.text()}};function Re(t){var e=this.ctx.encoding;return typeof this.ctx.config.encoding=="object"?e={...e,...this.ctx.encoding}:e={...this.ctx.encoding[this.ctx.config.encoding]},this.ctx.encoding={...this.ctx.encoding,...e},this.ctx.encoding}function Ne(t,e,i){if(!t.url.startsWith("http"))return t.url;let n=t.url.toString();return t.url.startsWith(location.origin)&&(n=n.substr(self.location.origin.length)),n=new URL(n,new URL(e.__dynamic$location.href)).href,this.ctx.url.encode(n,i)}var Oe=class{constructor(e){this.route=Yi;this.routePath=Zi;this.path=Se;this.resHeader=ke;this.reqHeader=Ce;this.clone=Ae;this.class=Le;this.file=Pe;this.edit=Ie;this.error=Te;this.encode=Re;this.rewritePath=Ne;this.about=ct;this.ctx=e}},Ji=Oe;function De(t,e){if(!t)return t;if(t=new String(t).toString(),t.startsWith("about:blank"))return location.origin+this.ctx.config.prefix+t;if(!t.match(this.ctx.regex.ProtocolRegex)&&t.match(/^([a-zA-Z0-9\-]+)\:\/\//g)||t.startsWith("chrome-extension://"))return t;if(t.match(this.ctx.regex.WeirdRegex)){var i=this.ctx.regex.WeirdRegex.exec(t);i&&(t=i[2])}if(t.startsWith(location.origin+this.ctx.config.prefix)||t.startsWith(this.ctx.config.prefix)||t.startsWith(location.origin+this.ctx.config.assets.prefix+"dynamic.")||t.match(this.ctx.regex.BypassRegex))return t;if(t.match(this.ctx.regex.DataRegex)){try{var i=this.ctx.regex.DataRegex.exec(t);if(i){var[n,r,s,o,a]=i;o=="base64"?a=this.ctx.modules.base64.atob(decodeURIComponent(a)):a=decodeURIComponent(a),r&&(r=="text/html"?a=this.ctx.rewrite.html.rewrite(a,e,this.ctx.rewrite.html.generateHead(location.origin+"/dynamic/dynamic.client.js",location.origin+"/dynamic/dynamic.config.js","",`window.__dynamic$url = "${e.href}"; window.__dynamic$parentURL = "${location.href}";`)):r=="text/css"?a=this.ctx.rewrite.css.rewrite(a,e):(r=="text/javascript"||r=="application/javascript")&&(a=this.ctx.rewrite.js.rewrite(a,e))),o=="base64"?a=this.ctx.modules.base64.btoa(a):a=encodeURIComponent(a),s?o?t=`data:${r};${s};${o},${a}`:t=`data:${r};${s},${a}`:o?t=`data:${r};${o},${a}`:t=`data:${r},${a}`}}catch{}return t}return t=new String(t).toString(),e.href.match(this.ctx.regex.BypassRegex)&&(t=new URL(t,new URL((this.ctx.parent.__dynamic||this.ctx).meta.href)).href),t=new URL(t,e.href),(this.ctx._location?.origin||(location.origin=="null"?location.ancestorOrigins[0]:location.origin))+this.ctx.config.prefix+(this.ctx.encoding.encode(t.origin+t.pathname)+t.search+t.hash)}function Me(t){if(!t||(t=new String(t).toString(),t.match(this.ctx.regex.BypassRegex)))return t;var e=t.indexOf(this.ctx.config.prefix);if(e==-1)return t;try{if(t=new URL(t,new URL(self.location.origin)).href,e=t.indexOf(this.ctx.config.prefix),t.slice(e+this.ctx.config.prefix.length).trim()=="about:blank")return"about:blank";var i=new URL(t).search+new URL(t).hash||"",n=new URL(this.ctx.encoding.decode(t.slice(e+this.ctx.config.prefix.length).replace("https://","https:/").replace("https:/","https://").split("?")[0]))}catch{return t}return t=n.origin+n.pathname+i+(new URL(t).search?n.search.replace("?","&"):n.search),t}var $e=class{constructor(e){this.encode=De;this.decode=Me;this.ctx=e}},tr=$e;var xn=/^(#|about:|mailto:|blob:|javascript:)/g,wn=/^data:([a-z\/A-Z0-9\-\+]+);?(charset\=[\-A-Za-z0-9]+)?;?(base64)?[;,]*(.*)/g,bn=/^([\/A-Za-z0-9\-%]+)(http[s]?:\/\/.*)/g,pt=class{constructor(e){this.BypassRegex=xn;this.DataRegex=wn;this.WeirdRegex=bn;this.ctx=e}};function Ve(t){t=new URL(t.href);for(var e in t)this.ctx.meta[e]=t[e];return!0}var lt=class{constructor(){}};var Be=class extends lt{constructor(i){super();this.load=Ve;this.ctx=i}},er=Be;var ir={csp:["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-frame-options","x-permitted-cross-domain-policies","x-xss-protection"],status:{empty:[204,101,205,304]},method:{body:["GET","HEAD"]}};function Ue(t,e=""){return(this.ctx.modules.mime.contentType(e||t.pathname)||"text/css").split(";")[0]==="text/css"}function je(t,e="",i=""){let n;return!e&&this.ctx.modules.mime.contentType(t.pathname)==t.pathname?i.trim().match(/<(html|script|body)[^>]*>/g)&&(n=i.trim().indexOf((i.trim().match(/<(html|script|body)[^>]*>/g)||[])[0]),n>-1&&n<100):(this.ctx.modules.mime.contentType(e||t.pathname)||"text/html").split(";")[0]==="text/html"||i.trim().match(/\<\!(doctype|DOCTYPE) html\>/g)}function Fe(t,e=""){if(t.pathname.endsWith(".js")&&e=="text/plain")return!0;var i=(this.ctx.modules.mime.contentType(e||t.pathname)||"application/javascript").split(";")[0];return i=="text/javascript"||i=="application/javascript"||i=="application/x-javascript"}var He=class{constructor(e){this.html=je;this.js=Fe;this.css=Ue;this.ctx=e}},rr=He;function Pt(t,e=!0){let i=u=>{let h=t.__dynamic.util.clone(u);for(var m=0;m<u.length;m++)t.__dynamic.define(h,m,{value:(t.top.__dynamic$location||t.__dynamic$location).origin,configurable:!0,enumerable:!0,writable:!1});return t.__dynamic.define(h,"length",{value:u.length,configurable:!0,enumerable:!0,writable:!1}),h},n=t.location.ancestorOrigins||[],r=[t.Window,t.Location,t.WorkerLocation,t.Document].filter(u=>u);[...r,t.Object].forEach(u=>{delete u.prototype.__dynamic$location});let s={get(){return t.__dynamic.location},set(u){if(u instanceof t.Location)return t.__dynamic.location=u;t.__dynamic.location.href=u},configurable:!0},o=["href","host","hash","origin","hostname","port","pathname","protocol","search"],a=["assign","replace","toString","reload"];try{var p=new URL(t.__dynamic$url||t.__dynamic.url.decode(t.location.pathname+t.location.search+t.location.hash))}catch{t.__dynamic$url="about:blank";var p=new URL("about:blank")}return t.__dynamic.property=p,t.__dynamic.meta.load(p),t.__dynamic.location=t.__dynamic.util.clone(t.location),o.forEach(u=>{t.__dynamic.define(t.__dynamic.location,u,{get:()=>u=="search"&&t.location[u]+(t.location.search?p.search.replace("?","&"):p.search)||(u=="hash"?location[u]:p[u]),set:h=>t.location[u]=t.__dynamic.url.encode(t.__dynamic.meta.href.replace(p[u],h),p)})}),t.__dynamic.define(t.Object.prototype,"__dynamic$location",{get(){return this===t||this===t.__dynamic$window||this===t.document||this===t.__dynamic$document?this.__dynamic?.location:this.location},set(u){return this===t||this===t.__dynamic$window||this===t.document||this===t.__dynamic$document?this.__dynamic.location.href=u:this.location=u},configurable:!0}),a.forEach(u=>{t.__dynamic.define(t.__dynamic.location,u,{get:()=>u=="toString"?()=>p.href:new t.__dynamic.Function("arg",`return window.location.${u}(arg?${u!=="reload"&&u!=="toString"?"(self.__dynamic).url.encode(arg, new URL('"+p.href+"'))":"arg"}:null)`),set:()=>null})}),n.length&&t.__dynamic.define(t.__dynamic.location,"ancestorOrigins",{get:()=>i(n),set:()=>null}),r.forEach(u=>{t.__dynamic.define(u.prototype,"__dynamic$location",s)}),t.__dynamic.hashchange||(t.__dynamic.hashchange=(t.addEventListener("hashchange",u=>{}),!0)),t.__dynamic.location}function It(t){t.__dynamic$get=function(e){var i=t.__dynamic.fire("get",[e]);if(i)return i;try{return e==t.parent?t.parent.__dynamic$window:e==t.top?t.top.__dynamic$window:e==t.location||(t.Location||t.WorkerLocation)&&e instanceof(t.Location||t.WorkerLocation)?t.__dynamic$location:t.Document&&e instanceof t.Document?t.__dynamic$document:e==t?t.__dynamic$window:typeof e=="function"&&e.name=="__d$Send"?t.__dynamic$message(e.target,t):e}catch{return e}},t.__dynamic$property=function(e){return typeof e!="string"?e:e=="location"?"__dynamic$location":e=="eval"?"__dynamic$eval":e},t.__dynamic$set=function(e,i){return e?t.__dynamic.url.encode(t.__dynamic.meta.href.replace(t.__dynamic.property.href,i),t.__dynamic.property):i},t.__dynamic$var=function(e,i){return window[i]=e},t.dg$=t.__dynamic$get,t.ds$=t.__dynamic$set,t.dp$=t.__dynamic$property,t.dv$=t.__dynamic$var,t.d$g_=t.__dynamic$get,t.d$s_=t.__dynamic$set,t.d$p_=t.__dynamic$property,t.d$v_=t.__dynamic$var}function Tt(t){t.__dynamic.util.CreateDocumentProxy=function(i){return new Proxy(i,{get(n,r){let s=n[r];return r=="location"?i.defaultView?i.defaultView.__dynamic$location:t.__dynamic$location:r=="documentURI"&&i.defaultView||r=="baseURI"&&i.defaultView?i.defaultView.__dynamic.location.toString():s&&(typeof s=="function"&&s.toString==t.Object.toString?new Proxy(s,{apply(o,a,p){return(i.defaultView&&p[0]==i.defaultView.__dynamic$document||p[0]==t.__dynamic$document)&&(p[0]=i),s.apply(i,p)}}):s)},set(n,r,s){try{try{i.defaultView.__dynamic?i.defaultView.__dynamic.Reflect.set(n,r,s):n[r]=s}catch{return s||n[r]||!0}return s||n[r]||!0}catch{return s||n[r]||!0}}})},t.__dynamic.util.CreateWindowProxy=function(i){return new Proxy(i,{get(n,r){let s=t.__dynamic.Reflect.get(n,r);if(Object.getOwnPropertyDescriptor(n,r)){var o=Object.getOwnPropertyDescriptor(n,r);if(o?.configurable===!1&&o?.writable===!1&&o?.hasOwnProperty("enumerable"))return o?.value||o?.get?.call(n)}return r=="__dynamic$self"?i.window:r=="location"?i.__dynamic$location:r=="parent"?i.parent.__dynamic$window||i.parent:r=="top"?i.top.__dynamic?i.top.__dynamic$window:i.parent.__dynamic$window:r=="self"||r=="globalThis"?i.__dynamic$window:s&&(typeof s=="function"&&s.toString==t.Object.toString?new Proxy(s,{apply(a,p,u){return Reflect.apply(a,i,u)}}):s)},set(n,r,s){try{var o=Object.getOwnPropertyDescriptor(n,r);if(o?.writable===!1&&o?.enumerable===!1)return!1;if(r.constructor==t.Symbol)return Reflect.set(n,r,s),n[r];if(n.hasOwnProperty("undefined")&&n[r]+""==r)return n[r]||s||!0;if(r=="location")return i.__dynamic$location=s;if(n.hasOwnProperty(r)&&!n.propertyIsEnumerable(r)&&!o?.writable)return n[r];try{i.__dynamic?i.__dynamic.Reflect.set(n,r,s):n[r]=s}catch{return n[r]||!0}return n[r]||!0}catch{return n[r]||!0}}})},t.__dynamic.define(t,"__dynamic$window",{value:t.__dynamic.util.CreateWindowProxy(t),configurable:!1,enumerable:!1,writable:!1}),t.document&&t.__dynamic.define(t,"__dynamic$document",{value:t.__dynamic.util.CreateDocumentProxy(t.document),configurable:!1,enumerable:!1,writable:!1}),t.__dynamic$globalThis=t.__dynamic$window,t.__dynamic$self=t.__dynamic$window}function We(t){t.__dynamic.rewrite.dom=function(e,i){if(typeof t.DOMParser>"u"||!e)return e;var n=new t.DOMParser,r=n.parseFromString(e.toString(),"text/html"),s=r.documentElement;return s.querySelectorAll("script").forEach(function(o){!o.type||o.type&&o.type!=="text/javascript"&&o.type!=="application/javascript"&&o.type!=="application/x-javascript"?o.src&&(o.src=t.__dynamic.url.encode(o.getAttribute("src"),i)):o.innerHTML&&(o.innerHTML=t.__dynamic.js.encode(o.innerHTML,{type:"script"},i,{}))}),s.querySelectorAll("link").forEach(function(o){o.href&&o.getAttribute("rel")!=="stylesheet"&&(o.href=t.__dynamic.url.encode(o.getAttribute("href"),i))}),s.querySelectorAll("img").forEach(function(o){o.src&&(o.src=t.__dynamic.url.encode(o.getAttribute("src"),i)),o.srcset&&(o.srcset=t.__dynamic.rewrite.srcset.encode(o.getAttribute("srcset"),t.__dynamic))}),s.querySelectorAll("a").forEach(function(o){o.href&&(o.href=t.__dynamic.url.encode(o.getAttribute("href"),i))}),s.querySelectorAll("style").forEach(function(o){o.innerHTML&&(o.innerHTML=t.__dynamic.rewrite.css.rewrite(o.innerHTML,i))}),s.outerHTML}}function qe(t){let e=n=>new DOMParser().parseFromString(n,"text/html").body.innerHTML;if(t.__dynamic.elements.config.forEach(n=>{n.elements.forEach(r=>{n.tags.forEach(s=>{var o=Object.getOwnPropertyDescriptor(r.prototype,s);o||(o=Object.getOwnPropertyDescriptor(HTMLElement.prototype,s)),typeof r.prototype.setAttribute.__dynamic$target>"u"&&(r.prototype.setAttribute=t.__dynamic.wrap(r.prototype.setAttribute,function(a,...p){return this instanceof HTMLLinkElement&&t.__dynamic$icon&&p[0].toLowerCase()=="href"&&(this.rel=="icon"||this.rel=="shortcut icon")?(p[1]=t.__dynamic$icon,Reflect.apply(a,this,p)):t.__dynamic.elements.attributes.indexOf(p[0].toLowerCase())==-1?Reflect.apply(a,this,p):p[0].toLowerCase()=="srcset"||p[0].toLowerCase()=="imagesrcset"?(this.dataset[`dynamic_${p[0]}`]=p[1],p[1]=t.__dynamic.rewrite.srcset.encode(p[1],t.__dynamic),Reflect.apply(a,this,p)):p[0].toLowerCase()=="integrity"||p[0].toLowerCase()=="nonce"?(this.dataset[`dynamic_${p[0]}`]=p[1],this.removeAttribute(p[0]),Reflect.apply(a,this,["nointegrity",p[1]])):(this.dataset[`dynamic_${p[0]}`]=p[1],p[1]=t.__dynamic.url.encode(p[1],t.__dynamic.baseURL||t.__dynamic.meta),Reflect.apply(a,this,p))},"setAttribute"),r.prototype.setAttributeNS=t.__dynamic.wrap(r.prototype.setAttributeNS,function(a,...p){return this instanceof HTMLLinkElement&&t.__dynamic$icon&&p[1].toLowerCase()=="href"&&(this.rel=="icon"||this.rel=="shortcut icon")?(p[2]=t.__dynamic$icon,Reflect.apply(a,this,p)):t.__dynamic.elements.attributes.indexOf(p[1].toLowerCase())==-1?Reflect.apply(a,this,p):p[1].toLowerCase()=="srcset"||p[1].toLowerCase()=="imagesrcset"?(this.dataset[`dynamic_${p[1]}`]=p[2],p[2]=t.__dynamic.rewrite.srcset.encode(p[2],t.__dynamic),Reflect.apply(a,this,p)):p[1].toLowerCase()=="integrity"||p[1].toLowerCase()=="nonce"?(this.dataset[`dynamic_${p[1]}`]=p[2],this.removeAttribute(p[1]),Reflect.apply(a,this,["nointegrity",p[2]])):(this.dataset[`dynamic_${p[1]}`]=p[2],p[2]=t.__dynamic.url.encode(p[2],t.__dynamic.baseURL||t.__dynamic.meta),Reflect.apply(a,this,p))},"setAttributeNS"),r.prototype.getAttribute=t.__dynamic.wrap(r.prototype.getAttribute,function(a,...p){return this.dataset[`dynamic_${p[0]}`]?this.dataset[`dynamic_${p[0]}`]:Reflect.apply(a,this,p)},"getAttribute"),r.prototype.getAttributeNS=t.__dynamic.wrap(r.prototype.getAttributeNS,function(a,...p){return this.dataset[`dynamic_${p[1]}`]?this.dataset[`dynamic_${p[1]}`]:Reflect.apply(a,this,p)},"getAttributeNS")),t.__dynamic.define(r.prototype,s,{get(){if(n.action=="window"){let a=t.__dynamic.elements.contentWindow.get.call(this),p=!0;try{a.location.href}catch{p=!1}if(p&&(a.__dynamic||t.__dynamic.elements.client(a,t.__dynamic$config,decodeURIComponent(this.src))),s=="contentDocument")return a.document;if(s=="contentWindow")return p&&a.__dynamic$window||a}if(n.action=="css")return o.get.call(this);try{return t.__dynamic.url.decode(o.get.call(this))}catch{}return o.get.call(this)},set(a){return a&&typeof a=="string"&&(a=a.toString()),s=="href"&&this instanceof HTMLLinkElement&&t.__dynamic$icon&&(this.rel=="icon"||this.rel=="shortcut icon")&&(this.dataset[`dynamic_${s}`]=a,a=t.__dynamic$icon),n.action=="html"?(Promise.resolve(t.__dynamic.createBlobHandler(new Blob([a],{type:"text/html"}),this,a)).then(p=>{this.setAttribute(s,p)}),a):(n.action=="srcset"&&(a=t.__dynamic.rewrite.srcset.encode(a,t.__dynamic)),n.action=="rewrite"?(this.dataset[`dynamic_${s}`]=a,this.removeAttribute(s),this.setAttribute(n.new,a)):(n.action=="css"&&(a=t.__dynamic.rewrite.css.rewrite(a,t.__dynamic.meta)),n.action=="url"&&(a=t.__dynamic.url.encode(a,t.__dynamic.baseURL||t.__dynamic.meta)),this.dataset[`dynamic_${s}`]=a,o.set.call(this,a)))}})})})}),["innerHTML","outerHTML"].forEach(n=>{t.__dynamic.define(t.HTMLElement.prototype,n,{get(){return(this["__"+n]||t.__dynamic.elements[n].get.call(this)).toString()},set(r){return this["__"+n]=e(r),this instanceof t.HTMLTextAreaElement?t.__dynamic.elements[n].set.call(this,r):this instanceof t.HTMLScriptElement?t.__dynamic.elements[n].set.call(this,t.__dynamic.rewrite.js.rewrite(r,{type:"script"})):this instanceof t.HTMLStyleElement?t.__dynamic.elements[n].set.call(this,t.__dynamic.rewrite.css.rewrite(r,t.__dynamic.meta)):t.__dynamic.elements[n].set.call(this,t.__dynamic.rewrite.dom(r,t.__dynamic.meta))}})}),["MutationObserver","ResizeObserver","IntersectionObserver"].forEach(n=>{t[n].prototype.observe=t.__dynamic.wrap(t[n].prototype.observe,function(r,...s){return s[0]==t.__dynamic$document&&(s[0]=t.document),Reflect.apply(r,this,s)},n+".prototype.observe")}),t.__dynamic.defines(t.HTMLAnchorElement.prototype,{pathname:t.__dynamic.elements.createGetter("pathname"),origin:t.__dynamic.elements.createGetter("origin"),host:t.__dynamic.elements.createGetter("host"),hostname:t.__dynamic.elements.createGetter("hostname"),port:t.__dynamic.elements.createGetter("port"),protocol:t.__dynamic.elements.createGetter("protocol"),search:t.__dynamic.elements.createGetter("search"),hash:t.__dynamic.elements.createGetter("hash"),toString:{get:function(){return this.__toString||(()=>this.href?new URL(this.href).toString():"")},set:function(n){this.__toString=n}}}),t.HTMLElement.prototype.insertAdjacentHTML=t.__dynamic.wrap(t.HTMLElement.prototype.insertAdjacentHTML,function(n,...r){return this instanceof t.HTMLStyleElement?Reflect.apply(n,this,[r[0],t.__dynamic.rewrite.css.rewrite(r[1],t.__dynamic.meta)]):this instanceof t.HTMLScriptElement?Reflect.apply(n,this,[r[0],t.__dynamic.rewrite.js.rewrite(r[1],{type:"script"},!1,t.__dynamic)]):this instanceof t.HTMLTextAreaElement?Reflect.apply(n,this,r):Reflect.apply(n,this,[r[0],t.__dynamic.rewrite.html.rewrite(r[1],t.__dynamic.meta)])},"insertAdjacentHTML"),[[t.Node,"textContent"],[t.HTMLElement,"innerText"]].forEach(([n,r])=>{var s=Object.getOwnPropertyDescriptor(n.prototype,r);function o(){return this["__"+r]||s?.get&&s.get.call(this)}t.__dynamic.define(t.HTMLStyleElement.prototype,r,{get:o,set(a){return this["__"+r]=a,s?.set&&s.set.call(this,t.__dynamic.rewrite.css.rewrite(a,t.__dynamic.meta))}}),t.__dynamic.define(t.HTMLScriptElement.prototype,r,{get:o,set(a){return this["__"+r]=a,this.type!==null||this.type!=="application/javascript"||this.type!=="text/javascript"||this.type!=="application/x-javascript"?s?.set&&s.set.call(this,a):s?.set&&s.set.call(this,t.__dynamic.rewrite.js.rewrite(a,{type:"script"},!1,t.__dynamic))}})}),t.Text.prototype.toString=function(){return this.textContent},t.document.createElement=t.__dynamic.wrap(t.document.createElement,function(n,...r){var s=Reflect.apply(n,this,r);return s.rewritten=!0,r[0].toLowerCase()=="iframe"&&(s.src="about:blank"),s},"createElement"),!document.querySelector('link[rel="icon"], link[rel="shortcut icon"]')){var i=document.createElement("link");i.rel="icon",i.href=(t.__dynamic$icon||"/favicon.ico")+"?dynamic",i.dataset.dynamic_hidden="true",document.head.appendChild(i)}t.__dynamic.define(t.Attr.prototype,"value",{get(){return this.__value||t.__dynamic.elements.attrValue.get.call(this)},set(n){return this.__value=n,this.name=="href"||this.name=="src"?t.__dynamic.elements.attrValue.set.call(this,t.__dynamic.url.encode(n,t.__dynamic.meta)):this.name=="style"?t.__dynamic.elements.attrValue.set.call(this,t.__dynamic.rewrite.css.rewrite(n,t.__dynamic.meta)):this.name=="onclick"?t.__dynamic.elements.attrValue.set.call(this,t.__dynamic.rewrite.js.rewrite(n,{type:"script"},!1,t.__dynamic)):t.__dynamic.elements.attrValue.set.call(this,n)}})}function Ge(t){let e=t.XMLHttpRequest;t.Worker=new Proxy(t.Worker,{construct(i,n){if(n[0])if(n[0]=n[0].toString(),n[0].trim().startsWith(`blob:${t.location.origin}`)){let r=new e;r.open("GET",n[0],!1),r.send();let s=t.__dynamic.rewrite.js.rewrite(r.responseText,{type:"worker"},!0),o=new Blob([s],{type:"application/javascript"});n[0]=URL.createObjectURL(o)}else n[0]=t.__dynamic.url.encode(n[0],t.__dynamic.meta);return Reflect.construct(i,n)}})}function ze(t){t.__dynamic$history=function(e,...i){i[2]&&(i[2]=t.__dynamic.url.encode(i[2],t.__dynamic.meta)),t.__dynamic.Reflect.apply(e,this,i),t.__dynamic.client.location(t,!0,!1)},t.History.prototype.pushState=t.__dynamic.wrap(t.History.prototype.pushState,t.__dynamic$history),t.History.prototype.replaceState=t.__dynamic.wrap(t.History.prototype.replaceState,t.__dynamic$history)}var vn="!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~",En="%";function nr(t){t=t.toString();let e="";for(let i=0;i<t.length;i++){let n=t[i];if(vn.includes(n)&&!En.includes(n))e+=n;else{let r=n.charCodeAt();e+="%"+r.toString(16).padStart(2,0)}}return e}function Xe(t){let e=()=>t.location.protocol.replace("http","ws")+"//"+new URL((t.__dynamic$config.bare.path+"/"||"/bare/")+"v1/",new URL(location.origin)).href.replace(/http(s?):\/\//g,"").replace(/\/\//g,"/"),i=Object.getOwnPropertyDescriptor(t.WebSocket.prototype,"url");t.__dynamic.define(t.WebSocket.prototype,"url",{get(){let n=i.get.call(this);return t.__dynamic.url.decode(n)},set(n){return!1}}),t.WebSocket=t.__dynamic.wrap(t.WebSocket,(n,...r)=>{console.log(r);let s=new URL(r[0]),o={remote:{host:s.hostname,port:s.port||(s.protocol==="wss:"?"443":"80"),path:s.pathname+s.search,protocol:s.protocol},headers:{Host:s.hostname+(s.port?":"+s.port:""),Origin:t.__dynamic$location.origin,Pragma:"no-cache","Cache-Control":"no-cache",Upgrade:"websocket",Connection:"Upgrade"},forward_headers:["accept-encoding","accept-language","sec-websocket-extensions","sec-websocket-key","sec-websocket-version","sec-websocket-accept"]};return r[1]&&(o.headers["sec-websocket-protocol"]=r[1].toString()),[e(),["bare",nr(JSON.stringify(o))]]})}function Ke(t){t.Request=t.__dynamic.wrap(t.Request,function(e,...i){if(i[0]instanceof e){let n=Reflect.construct(e,i);return i[0].mode==="navigate"&&(n.mode="same-origin"),n}return i[0]&&(i[0]=t.__dynamic.url.encode(i[0],t.__dynamic.meta)),i}),t.__dynamic.define(t.Request.prototype,"url",{get(){return t.__dynamic.url.decode(t.__dynamic.http.RequestURL.get.call(this))},set(e){return e}}),t.fetch=t.__dynamic.wrap(t.fetch,function(e,...i){return t.Request&&(i[0].constructor.name==="Request"||i[0]instanceof t.Request)?(console.log(i[0]),Reflect.apply(e,t,i)):(i[0]&&t.__dynamic&&(i[0]=t.__dynamic.url.encode(i[0],t.__dynamic.meta)),Reflect.apply(e,t,i))},"fetch"),t.XMLHttpRequest.prototype.open=t.__dynamic.wrap(t.XMLHttpRequest.prototype.open,function(e,...i){return i[1]&&(i[1]=t.__dynamic.url.encode(i[1],t.__dynamic.meta)),i[2]===!1&&(i[2]=!0),Reflect.apply(e,this,i)},"XMLHttpRequest.prototype.open"),Object.defineProperty(t.XMLHttpRequest.prototype,"responseURL",{get(){return t.__dynamic.url.decode(t.__dynamic.http.XMLResponseURL.get.call(this))},set(e){return e}}),Object.defineProperty(t.Response.prototype,"url",{get(){return t.__dynamic.url.decode(t.__dynamic.http.ResponseURL.get.call(this))},set(e){return e}}),t.open=t.__dynamic.wrap(t.open,function(e,...i){i[0]!=""&&i[0]&&(i[0]=t.__dynamic.url.encode(i[0],t.__dynamic.meta)),i[0]==""&&(i[0]="about:blank");let n=Reflect.apply(e,this,i);n.opener=t.__dynamic$window;try{new URL(i[0]).protocol==="about:"?n.__dynamic$url="about:srcdoc":n.__dynamic$url=t.__dynamic.url.decode(i[0])}catch{n.__dynamic$url="about:srcdoc"}return t.__dynamic.elements.client(n,t.__dynamic$config,n.__dynamic$url),n.__dynamic$window},"window.open"),t.__dynamic.define(t,"__dynamic$import",{get(){return function(e,i){try{return t.__dynamic.url.encode(e,new URL(i))}catch{return t.__dynamic.url.encode(e,t.__dynamic.meta)}}},set:()=>{}})}function Rt(t){let e=s=>s.constructor.name=="Worker"||s.constructor.name=="MessagePort"||t.constructor.name=="DedicatedWorkerGlobalScope",i=s=>s.constructor.name=="Window"||s.constructor.name=="global",n=(s,o)=>Object.keys(window||{}).map(a=>parseInt(a)).filter(a=>isFinite(a)).map(a=>window[a]).filter(a=>a||!1).find(a=>{try{return a.name==s&&a.location.href==o}catch{return!1}});t.__dynamic$message=function(s,o=top){s||(s=t);function a(){var p=arguments;return e(s)||!i(s)?s.postMessage.call(s,...p):(s.__dynamic$self&&(s=s.__dynamic$self),(s._postMessage||s.postMessage).call(s,[p[0],o.__dynamic$location.origin,o.location.href,o.name,o!==t],"*",p[2]||[]))}return a},t.constructor.name=="Window"&&(t.addEventListener&&(t.addEventListener=new Proxy(t.addEventListener,{apply(s,o,a){if(o==t.__dynamic$window&&(o=t),!a[1]||!a[0]||typeof a[1]!="function")return Reflect.apply(s,o,a);if(a[0]=="message"){var p=a[1].bind({});a[1]=function(u){return p(r(u))}}return Reflect.apply(s,o,a)}})),t.constructor.name=="Window"&&t.__dynamic.define(t,"onmessage",{get(){return t._onmessage||null},set(s){return t._onmessage&&t.removeEventListener("message",t._onmessage),t.addEventListener("message",s),t._onmessage=s}}));function r(s){let o=t.__dynamic.util.clone(s),a;s.source&&(a=n(s.data[3],s.data[2])||s.currentTarget),t.__dynamic.define(o,"isTrusted",{value:!0,writable:!1}),s.origin&&(Array.isArray(s.data)&&s.data.length==5?t.__dynamic.define(o,"origin",{value:s.data[1],writable:!1}):t.__dynamic.define(o,"origin",{value:s.origin,writable:!1})),s.data&&(Array.isArray(s.data)&&s.data.length==5?t.__dynamic.define(o,"data",{value:s.data[0],writable:!1}):t.__dynamic.define(o,"data",{value:s.data,writable:!1})),s.source&&(a?t.__dynamic.define(o,"source",{value:a?.__dynamic$window||a,writable:!0}):t.__dynamic.define(o,"source",{value:a||Array.isArray(s.data)&&s.data.length==3&&s.data[2]===!0?s.source:s.currentTarget,writable:!0}));for(var p in s)switch(p){default:p!=="isTrusted"&&p!=="origin"&&p!=="data"&&p!=="source"&&t.__dynamic.define(o,p,{value:s[p],writable:!1});break}return o}}function Qe(t){function e(i,...n){for(var r in n)n[r]=t.__dynamic.rewrite.dom(n[r],t.__dynamic.meta);return i.apply(this,n)}["write","writeln"].forEach(i=>{t.document[i]=t.__dynamic.wrap(t.document[i],e,`document.${i}`)})}function Nt(t){t.importScripts=new Proxy(t.importScripts,{apply(e,i,n){return[...n].forEach((r,s)=>{n[s]=t.__dynamic.url.encode(r,t.__dynamic.meta)}),Reflect.apply(e,i,n)}}),t.__dynamic.define(t.__dynamic,"_location",{value:t.location,writable:!0}),t.__dynamic.define(t.WorkerGlobalScope.prototype,"location",{get(){return t.__dynamic.location},set(e){return e}}),t.location=t.__dynamic.location}function Ot(t){var e=t.Reflect.get.bind({}),i=t.Reflect.set.bind({});t.Reflect.set=t.__dynamic.wrap(t.Reflect.set,function(n,...r){return r[0].constructor.name=="Window"&&r[1]=="location"?(r[0].__dynamic$location=r[2],!0):r[0].constructor.name=="Location"?(t.__dynamic$location[r[1]]=r[2],!0):Reflect.apply(i,this,r)},"Reflect.set"),t.Reflect.get=t.__dynamic.wrap(t.Reflect.get,function(n,...r){if(typeof r[0]=="object"){if(r[0].constructor.name=="Window"){if(r[1]=="location")return r[0].__dynamic?r[0].__dynamic$location:Reflect.apply(e,this,r);if(r[0][r[1]]&&r[0][r[1]].constructor.name=="Window")return r[0][r[1]].__dynamic$window}if(r[0].constructor.name=="Location")return t.__dynamic$location[r[1]]}return Reflect.apply(e,this,r)},"Reflect.get"),t.__dynamic.Reflect={get:e,set:i,apply:t.Reflect.apply.bind({}),construct:t.Reflect.construct.bind({}),defineProperty:t.Reflect.defineProperty.bind({}),deleteProperty:t.Reflect.deleteProperty.bind({}),getOwnPropertyDescriptor:t.Reflect.getOwnPropertyDescriptor.bind({}),getPrototypeOf:t.Reflect.getPrototypeOf.bind({}),has:t.Reflect.has.bind({}),isExtensible:t.Reflect.isExtensible.bind({}),ownKeys:t.Reflect.ownKeys.bind({}),preventExtensions:t.Reflect.preventExtensions.bind({}),setPrototypeOf:t.Reflect.setPrototypeOf.bind({})}}function Ye(t){t.__dynamic.define(t.document,"origin",{value:t.__dynamic$location.origin,configurable:!1,enumerable:!1}),t.__dynamic.define(t.document,"domain",{value:t.__dynamic$location.hostname,configurable:!1,enumerable:!1}),["referrer","URL","documentURI"].forEach(e=>{t.__dynamic.define(t.document,e,{value:t.__dynamic$location.toString(),configurable:!1,enumerable:!1})}),[t.document,t.HTMLElement.prototype].forEach(e=>{t.__dynamic.define(e,"baseURI",{get(){return(t.__dynamic.baseURL||t.__dynamic$location).href}})}),["getEntries","getEntriesByName","getEntriesByType"].forEach(e=>{t.performance[e]=new Proxy(t.performance[e],{apply(i,n,r){return Reflect.apply(i,n,r).filter(s=>!s.name?.includes(t.location.origin+"/dynamic/dynamic.")).filter(s=>!s.name.includes(t.location.origin+t.__dynamic.config.prefix+"caches/")).map(s=>{if(s.name){var o=t.__dynamic.util.clone(s);o.__defineGetter__("name",function(){return this._name}),o.__defineSetter__("name",function(u){this._name=u}),o.name=t.__dynamic.url.decode(s.name),t.__dynamic.define(o,"name",{get:void 0,set:void 0}),t.__dynamic.define(o,"name",{value:o._name,writable:!1}),delete o._name;for(var a in s)if(a!="name"){if(typeof s[a]=="function")var p=new Proxy(s[a],{apply(u,h,m){if(u.name=="toJSON"){var g={};for(var w in o)g[w]=o[w];return g}return Reflect.apply(u,s,m)}});else var p=s[a];Object.defineProperty(o,a,{value:p,writable:!0})}s=o}return s})}})}),t.MouseEvent&&(t.MouseEvent.prototype.initMouseEvent=t.__dynamic.wrap(t.MouseEvent.prototype.initMouseEvent,function(e,...i){return i.length&&(i=i.map(n=>n==t.__dynamic$window?t:n)),Reflect.apply(e,this,i)})),t.KeyboardEvent&&(t.KeyboardEvent.prototype.initKeyboardEvent=t.__dynamic.wrap(t.KeyboardEvent.prototype.initKeyboardEvent,function(e,...i){return i.length&&(i=i.map(n=>n==t.__dynamic$window?t:n)),Reflect.apply(e,this,i)})),t.StorageEvent&&(t.StorageEvent.prototype.initStorageEvent=t.__dynamic.wrap(t.StorageEvent.prototype.initStorageEvent,function(e,...i){return i.length&&(i=i.map(n=>n==t.localStorage?t.__dynamic.storage.localStorage:n==t.sessionStorage?t.__dynamic.storage.sessionStorage:n)),Reflect.apply(e,this,i)})),t.Object.defineProperty=t.__dynamic.wrap(t.Object.defineProperty,function(e,...i){try{return Reflect.apply(e,this,i)}catch(n){n.toString().includes("Cannot redefine property:")&&(i[0].__defined||(i[0].__defined={}),i[0].__defined[i[1]]=i[2])}}),t.__dynamic.meta.origin=="https://www.google.com"&&(t.setInterval=new Proxy(t.setInterval,{apply(e,i,n){return n[1]==500?null:Reflect.apply(e,i,n)}}))}function Ze(t){t.Storage.prototype.setItem=t.__dynamic.wrap(t.Storage.prototype.setItem,function(e,...i){return i[0]&&(i[0]="__dynamic$"+t.__dynamic$location.host+"$"+i[0].toString()),Reflect.apply(e,this,i)},"Storage.prototype.setItem"),t.Storage.prototype.getItem=t.__dynamic.wrap(t.Storage.prototype.getItem,function(e,...i){return i[0]&&(i[0]="__dynamic$"+t.__dynamic$location.host+"$"+i[0].toString()),Reflect.apply(e,this,i)||null},"Storage.prototype.getItem"),t.Storage.prototype.removeItem=t.__dynamic.wrap(t.Storage.prototype.removeItem,function(e,...i){return i[0]&&(i[0]="__dynamic$"+t.__dynamic$location.host+"$"+i[0].toString()),Reflect.apply(e,this,i)},"Storage.prototype.removeItem"),t.Storage.prototype.clear=t.__dynamic.wrap(t.Storage.prototype.clear,function(e,...i){for(var n=[],r=0;r<this.length;r++)e.call(this,r)?.startsWith("__dynamic$"+t.__dynamic$location.host+"$")&&n.push(e.call(this,r)?.replace("__dynamic$"+t.__dynamic$location.host+"$",""));for(var s in n)e.call(this,n[s])},"Storage.prototype.clear"),t.Storage.prototype.key=t.__dynamic.wrap(t.Storage.prototype.key,function(e,...i){for(var n=[],r=0;r<this.length;r++)e.call(this,r)?.startsWith("__dynamic$"+t.__dynamic$location.host+"$")&&n.push(e.call(this,r)?.replace("__dynamic$"+t.__dynamic$location.host+"$",""));return n[i[0]]?n[i[0]]:null},"Storage.prototype.key"),["localStorage","sessionStorage"].forEach(e=>{t["__dynamic$"+e]=new Proxy(t[e],{get(i,n){if(n=="length"){for(var r=[],s=0;s<Object.keys(t.__dynamic.storage[e]).length;s++)Object.keys(t.__dynamic.storage[e])[s].startsWith("__dynamic$"+t.__dynamic$location.host+"$")&&r.push(Object.keys(t.__dynamic.storage[e])[s].replace("__dynamic$"+t.__dynamic$location.host+"$",""));return r.length}return t.__dynamic.storage.methods.includes(n)?t.__dynamic.storage.cloned[e][n].bind(t.__dynamic.storage[e]):t.__dynamic.storage[e].getItem("__dynamic$"+t.__dynamic$location.host+"$"+n.toString())},set(i,n,r){return t.__dynamic.storage[e].setItem("__dynamic$"+t.__dynamic$location.host+"$"+n.toString(),r),r||!0},deleteProperty(i,n){return t.__dynamic.storage[e].removeItem("__dynamic$"+t.__dynamic$location.host+"$"+n.toString())}}),delete t[e],t[e]=t["__dynamic$"+e]})}function Je(t){"serviceWorker"in t.navigator&&(t.__dynamic.sw=t.navigator.serviceWorker,delete t.navigator.serviceWorker,delete t.Navigator.prototype.serviceWorker),t.navigator.sendBeacon=t.__dynamic.wrap(t.navigator.sendBeacon,function(e,...i){return i[0]&&(i[0]=t.__dynamic.url.encode(i[0],t.__dynamic.meta)),Reflect.apply(e,this,i)},"navigator.sendBeacon")}var ti=t=>t?t.split(";").map(e=>e.split("=")).reduce((e,i)=>(e[i[0].trim()]=i[1].trim(),e),{}):{},ut=(t=[])=>t.map(e=>`${e.name}=${e.value}`).join("; ");function ei(t){if(delete t.Document.prototype.cookie,t.__dynamic.define(t.document,"cookie",{get(){var e=t.__dynamic.fire("getCookies",[t.__dynamic.location.host,t.__dynamic.cookie.str||""]);return e||(t.__dynamic.cookies.update(t.__dynamic.location.host),t.__dynamic.cookie.str||t.__dynamic.cookie.desc.get.call(this)||"")},set(e){var i=t.__dynamic.modules.setCookieParser.parse(e,{decodeValues:!1})[0],n=t.__dynamic.fire("setCookie",[t.__dynamic.location.host,e,i]);if(n)return n;i.name=i.name.replace(/^\./g,""),Promise.resolve(t.__dynamic.cookies.set(t.__dynamic.location.host,t.__dynamic.modules.cookie.serialize(i.name,i.value,{...i,encode:s=>s}))).then(async s=>{await t.__dynamic.cookies.update(t.__dynamic.location.host),t.__dynamic.cookie.str=await t.__dynamic.cookies.get(t.__dynamic.location.host)});var r=ti(t.__dynamic.cookie.str||"");r[i.name]=i.value,t.__dynamic.cookie.str=ut(Object.entries(r).map(s=>({name:s[0],value:s[1]})))}}),t.navigator.serviceWorker)try{t.navigator.serviceWorker.onmessage=({data:e})=>{if(e.host==t.__dynamic.location.host&&e.type=="set-cookie"){var i=t.__dynamic.modules.cookie.parse(e.val),n=ti(t.__dynamic.cookie.str||"");n[Object.entries(i)[0][0]]=Object.entries(i)[0][1],t.__dynamic.cookie.str=ut(Object.entries(n).map(r=>({name:r[0],value:r[1]})))}e.host==t.__dynamic.location.host&&e.type=="cookies"&&(t.__dynamic.cookie.str=e.cookies)}}catch{}}function ii(t){t.CSSStyleDeclaration.prototype._setProperty=t.CSSStyleDeclaration.prototype.setProperty,t.CSSStyleDeclaration.prototype.setProperty=t.__dynamic.wrap(t.CSSStyleDeclaration.prototype.setProperty,function(e,...i){return(i[0]=="background-image"||i[0]=="background"||i[0]=="backgroundImage")&&(i[1]=t.__dynamic.rewrite.css.rewrite(i[1],t.__dynamic.meta)),e.apply(this,i)},"CSSStyleDeclaration.prototype.setProperty"),t.__dynamic.define(t.CSSStyleDeclaration.prototype,"background",{get(){return this._background?this._background:this.getPropertyValue("background")},set(e){return this._background=e,this._setProperty("background",t.__dynamic.rewrite.css.rewrite(e,t.__dynamic.meta))}}),t.__dynamic.define(t.CSSStyleDeclaration.prototype,"backgroundImage",{get(){return this._backgroundImage?this._backgroundImage:this.getPropertyValue("background-image")},set(e){return this._backgroundImage=e,this._setProperty("background-image",t.__dynamic.rewrite.css.rewrite(e,t.__dynamic.meta))}}),t.__dynamic.define(t.CSSStyleDeclaration.prototype,"background-image",{get(){return this._backgroundImage?this._backgroundImage:this.getPropertyValue("background-image")},set(e){return this._backgroundImage=e,this._setProperty("background-image",t.__dynamic.rewrite.css.rewrite(e,t.__dynamic.meta))}})}function Dt(t){t.__dynamic.createBlobHandler=async function(e,i,n){let r=(await t.__dynamic.sw.ready).active;t.__dynamic.sw.addEventListener("message",({data:{url:s}})=>{s&&t.__dynamic.elements.iframeSrc.set.call(i,s)},{once:!0}),r.postMessage({type:"createBlobHandler",blob:e,url:t.__dynamic.modules.base64.encode(n.toString().split("").slice(0,10)),location:t.__dynamic.location.href})}}var sr=(t,e,i)=>((i=new MutationObserver(function(r){for(var s of r)t[s.type](s),document.dispatchEvent(new CustomEvent({attributes:"attrChanged",characterData:"characterData",childList:"nodeChanged"}[s.type],{detail:s}))})).observe(e,{subtree:!0,attributes:!0,childList:!0}),i);function Mt(t,e){e||(e=t.__dynamic);function i(r){if(!r.rewritten&&!(r.nodeType!==1&&r.nodeType!==3)){if(r=new Proxy(r,{get(a,p){return p=="src"||p=="href"||p=="srcset"||p=="imageSrcset"||p=="data"||p=="action"?e.elements.getAttribute.call(a,p.toLowerCase()):p=="setAttribute"||p=="getAttribute"||p=="removeAttribute"||p=="hasAttribute"||p=="cloneNode"||p=="addEventListener"?(...u)=>e.elements[p].call(a,...u):p=="node"?a:a[p]},set(a,p,u){return p=="src"||p=="href"||p=="srcset"||p=="imageSrcset"||p=="data"||p=="action"?e.elements.setAttribute.call(a,p.toLowerCase(),u):a[p]=u,!0}}),r instanceof HTMLScriptElement&&(r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r.type&&r.textContent?.length?(r.type=="application/javascript"||r.type=="text/javascript"||r.type=="application/x-javascript"&&r.textContent?.length)&&(r.textContent=e.rewrite.js.rewrite(r.textContent,{type:"script"},!1,e)):!r.type&&r.textContent?.length&&(r.textContent=e.rewrite.js.rewrite(r.textContent,{type:"script"},!1,e))),r instanceof HTMLStyleElement&&r.textContent?.length&&(r.textContent=e.rewrite.css.rewrite(r.textContent,e.meta)),r instanceof HTMLIFrameElement&&(r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r.srcdoc)){r.dataset.dynamic_srcdoc=r.srcdoc;let a=new Blob([e.rewrite.html.rewrite(r.srcdoc,e.meta)],{type:"text/html"});r.src=URL.createObjectURL(a)}if(r instanceof HTMLLinkElement&&(r.getAttribute("rel")!=="stylesheet"&&r.getAttribute("rel")!=="prefetch"&&r.getAttribute("rel")!=="dns-prefetch"?(r.href&&(r.dataset.dynamic_href=r.href,r.href=e.url.encode(r.href,e.meta)),r.imageSrcset&&(r.dataset.dynamic_imagesrcset=r.imageSrcset,r.imageSrcset=e.rewrite.srcset.encode(r.imageSrcset,e))):r.addEventListener("error",a=>{if(r instanceof HTMLLinkElement)return r.href&&(r.dataset.dynamic_href=r.href,r.href=e.url.encode(r.href,e.meta)),r.imageSrcset&&(r.dataset.dynamic_imagesrcset=r.imageSrcset,r.imageSrcset=e.rewrite.srcset.encode(r.imageSrcset,e)),a.preventDefault(),!1},{once:!0})),r instanceof HTMLAnchorElement&&r.href&&(r.dataset.dynamic_href=r.href,r.href=e.url.encode(r.href,e.meta)),r instanceof HTMLFormElement&&r.action&&(r.dataset.dynamic_action=r.action,r.action=e.url.encode(r.action,e.meta)),r instanceof HTMLObjectElement&&r.data&&(r.dataset.dynamic_data=r.data,r.data=e.url.encode(r.data,e.meta)),r instanceof HTMLSourceElement&&(r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r.srcset&&(r.dataset.dynamic_srcset=r.srcset,r.srcset=e.rewrite.srcset.encode(r.srcset,e))),r instanceof HTMLImageElement&&(r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r.srcset&&(r.dataset.dynamic_srcset=r.srcset,r.srcset=e.rewrite.srcset.encode(r.srcset,e))),r instanceof HTMLAreaElement&&r.href&&(r.dataset.dynamic_href=r.href,r.href=e.url.encode(r.href,e.meta)),r instanceof HTMLBaseElement&&r.href&&(r.dataset.dynamic_href=r.href,r.href=e.url.encode(r.href,e.meta)),r instanceof HTMLInputElement&&r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r instanceof HTMLAudioElement&&r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r instanceof HTMLVideoElement&&r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r instanceof HTMLTrackElement&&r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r instanceof HTMLMediaElement&&r.src&&(r.dataset.dynamic_src=r.src,r.src=e.url.encode(r.src,e.meta)),r instanceof HTMLMetaElement&&r.httpEquiv){if(r.httpEquiv.toLowerCase()=="refresh"){var s=r.content.split(";url=")[0],o=r.content.split(";url=")[1];r.content=`${s};url=${e.url.encode(o,e.meta)}`}r.httpEquiv.toLowerCase()=="content-security-policy"&&r.remove()}return r instanceof HTMLElement&&(r.getAttribute("style")&&r.setAttribute("style",e.rewrite.css.rewrite(r.getAttribute("style"),e.meta)),r.integrity&&(r.setAttribute("nointegrity",r.integrity),r.removeAttribute("integrity")),r.nonce&&(r.setAttribute("nononce",r.nonce),r.removeAttribute("nonce"))),r.rewritten=!0}}let n=sr({childList(r){i(r.target);for(let o of r.addedNodes)if(o.childNodes)for(let a of o.childNodes)i(a);if(r.target.childNodes)for(var s of r.target.childNodes)i(s)},attributes(r){},characterData(r){}},t.document);t.document.addEventListener("DOMContentLoaded",function(){n.disconnect()},{once:!0})}function ri(t){t.__dynamic.eval=t.__dynamic.wrap(eval,function(e,...i){if(i.length){var n=i[0].toString();return n=t.__dynamic.rewrite.js.rewrite(n,{type:"script"},!1,t.__dynamic),e.apply(this,[n])}},"eval"),t.__dynamic.define(t.Object.prototype,"__dynamic$eval",{get(){return this===window?t.__dynamic.eval:this.eval},set(e){return e}}),t.__dynamic$wrapEval=function(e){if(!arguments.length)return arguments[0];var i=t.__dynamic.fire("eval",[t,e]);return i||(e=t.__dynamic.rewrite.js.rewrite(e,{type:"script"},!1,t.__dynamic),e)}}function ni(t){var e=t.Function.prototype.toString;t.__dynamic.Function=t.Function.bind({}),t.__dynamic.define(t.Function.prototype,"_toString",{get(){return e},set:()=>{}});var i=function(){try{var n=Reflect.apply(e,this,[])}catch{return`function ${this.name}() { [native code] }`}return n.includes("[native code]")?`function ${this.name}() { [native code] }`:n};t.__dynamic.define(t.Function.prototype,"toString",{get(){return this.__toString||i},set(n){this.__toString=n}}),t.Function=new Proxy(t.Function,{apply(n,r,s){var o=[...s],a=o.pop();return a=`(function anonymous(${o.toString()}) {${a}})`,a=t.__dynamic.rewrite.js.rewrite(a,{type:"script"},!1,t.__dynamic),t.eval(a)},construct(n,r){var s=[...r],o=s.pop();return o=`(function anonymous(${s.toString()}) {${o}})`,o=t.__dynamic.rewrite.js.rewrite(o,{type:"script"},!1,t.__dynamic),t.eval(o)}}),t.Function.prototype.apply=t.__dynamic.wrap(t.Function.prototype.apply,function(n,...r){return r[0]==t.__dynamic$window&&(r[0]=r[0].__dynamic$self),r[0]==t.__dynamic$document&&(r[0]=t.document),Reflect.apply(n,this,r)},"Function.prototype.apply"),t.Function.prototype.call=new Proxy(t.Function.prototype.call,{apply(n,r,s){return s[0]==t.__dynamic$window&&(s[0]=s[0].__dynamic$self),s[0]==t.__dynamic$document&&(s[0]=t.document),Reflect.apply(n,r,s)}}),t.Function.prototype.bind=t.__dynamic.wrap(t.Function.prototype.bind,function(n,...r){return r[0]==t.__dynamic$window&&(r[0]=r[0].__dynamic$self),r[0]==t.__dynamic$document&&(r[0]=t.document),n.apply(this,r)},"Function.prototype.bind")}function si(t){}function ai(t){}var ar=[{name:"get",function:"self"},{name:"func",function:"self"},{name:"location",function:"self"},{name:"mutation",function:"self"},{name:"dom",function:"self"},{name:"write",function:"self"},{name:"message",function:"self"},{name:"reflect",function:"self"},{name:"window",function:"self"},{name:"eval",function:"self"},{name:"attr",function:"self"},{name:"policy",function:"self"},{name:"worker",function:"self"},{name:"history",function:"self"},{name:"ws",function:"self"},{name:"cookie",function:"self"},{name:"fetch",function:"self"},{name:"niche",function:"self"},{name:"storage",function:"self"},{name:"style",function:"self"},{name:"rtc",function:"self"},{name:"blob",function:"self"},{name:"navigator",function:"self"}];var ht=class{constructor(e){this.methods=ar;self.constructor.name=="DedicatedWorkerGlobalScope"||self.constructor.name=="SharedWorkerGlobalScope"?(this.message=Rt,this.location=Pt,this.window=Tt,this.get=It,this.reflect=Ot,this.imports=Nt,this.blob=Dt,this.mutation=Mt):(this.location=Pt,this.get=It,this.window=Tt,this.attr=qe,this.worker=Ge,this.history=ze,this.ws=Xe,this.fetch=Ke,this.message=Rt,this.policy=si,this.write=Qe,this.imports=Nt,this.reflect=Ot,this.niche=Ye,this.storage=Ze,this.navigator=Je,this.cookie=ei,this.style=ii,this.blob=Dt,this.mutation=Mt,this.eval=ri,this.func=ni,this.rtc=ai,this.dom=We),this.ctx=e}};function Sn(t,e){return t||(t=[]),t.find(i=>i.name==e.name)?t[t.findIndex(i=>i.name==e.name)]={name:e.name,value:e.value,expires:e.expires}:t.push({name:e.name,value:e.value,expires:e.expires}),t}var U={open:async()=>zt("__dynamic$cookies",1,{async upgrade(t){await t.createObjectStore("__dynamic$cookies")}}),set:async(t,e,i)=>{if(e.domain&&(t=e.domain),t.startsWith(".")&&(t=t.slice(1)),e.expires){var n=new Date(e.expires);if(n<new Date)return U.remove(t,e,i)}return await(await i).put("__dynamic$cookies",Sn(await(await i).get("__dynamic$cookies",t),e),t),!0},get:async(t,e)=>{var i=t.replace(/^(.*\.)?([^.]*\..*)$/g,"$2"),n=await(await e).get("__dynamic$cookies",t)||[];if(t!==i&&t!=="."+i){var r=await(await e).get("__dynamic$cookies",i);if(r)for(var{name:s,value:o,expires:a}of r){if(a){var p=new Date(a);if(p<=new Date){U.remove(t,r.find(u=>u.name==s&&u.value==o&&u.expires==a),e);continue}}n.find(u=>u.name==s&&u.value==o)||n.push({name:s,value:o,expires:a||new Date(1e13)})}}return n},remove:async(t,e,i)=>{e.domain&&(t=e.domain),t.startsWith(".")&&(t=t.slice(1));var n=await(await i).get("__dynamic$cookies",t);return n?(n=n.filter(r=>r.name!==e.name),await(await i).put("__dynamic$cookies",n,t),!0):!1},update:async(t,e)=>{var i=t.replace(/^(.*\.)?([^.]*\..*)$/g,"$2"),n=await(await e).get("__dynamic$cookies",i);if(n){for(var{name:r,value:s,expires:o}of n)if(o){var a=new Date(o);if(a<=new Date){U.remove(t,{name:r,value:s,expires:o},e);continue}}}return n}};var dt=class{constructor(e){this.db=U;this.ctx=e}async get(e){this._db||(this._db=this.db.open());let i=await U.get(e,this._db);return ut(i)}async set(e,i=""){return i=this.ctx.modules.setCookieParser.parse(i,{decodeValues:!1})[0],this._db||(this._db=this.db.open()),await U.set(e,i,this._db)}async open(){await U.open()}async update(e){return this._db||(this._db=this.db.open()),await U.update(e,this._db)}};var oi={};yt(oi,{base64:()=>Ln,none:()=>An,plain:()=>Cn,xor:()=>kn});var kn={encode:(t,e=2)=>t&&encodeURIComponent(t.split("").map((i,n)=>n%e?String.fromCharCode(i.charCodeAt(0)^e):i).join("")),decode:(t,e=2)=>t&&decodeURIComponent(t).split("").map((i,n)=>n%e?String.fromCharCode(i.charCodeAt(0)^e):i).join("")},Cn={encode:t=>t&&encodeURIComponent(t),decode:t=>t&&decodeURIComponent(t)},An={encode:t=>t,decode:t=>t},Ln={encode:t=>t&&decodeURIComponent(Xt(t)),decode:t=>t&&Kt(t)};var $t=class{constructor(e){this.modules=new zi(this);this.util=new Ji(this);this.meta=new er(this);this.regex=new pt(this);this.rewrite=new Qi(this);this.url=new tr(this);this.is=new rr(this);this.cookies=new dt(this);this.client=new ht(this);this.encoding=oi;this.headers=ir;this.listeners=[];e&&!this.config&&(this.config=e),e&&this.util.encode(self)}on(e,i){this.listeners.push({event:e,cb:i})}fire(e,i){var n=!1;for(var r of this.listeners)r.event===e&&(i=(n=!0,r.cb(...i)));return n&&i?i:null}};function ci(t,e){e||(e=t.__dynamic),e.define=new t.Proxy(t.Object.defineProperty,{apply(i,n,r){try{return Reflect.apply(i,n,r)}catch{return r[2]}}}),e.defines=new t.Proxy(t.Object.defineProperties,{apply(i,n,r){try{return Reflect.apply(i,n,r)}catch{return r[1]}}}),t.parent&&(e.parent=t.parent),t.top&&(e.top=t.top),t.document&&(e.elements={attributes:["src","href","srcset","action","data","integrity","nonce","imagesrcset"],iframeSrc:Object.getOwnPropertyDescriptor(t.HTMLIFrameElement.prototype,"src"),contentWindow:Object.getOwnPropertyDescriptor(t.HTMLIFrameElement.prototype,"contentWindow"),innerHTML:Object.getOwnPropertyDescriptor(t.Element.prototype,"innerHTML"),outerHTML:Object.getOwnPropertyDescriptor(t.Element.prototype,"outerHTML"),attrValue:Object.getOwnPropertyDescriptor(t.Attr.prototype,"value"),setAttribute:t.Element.prototype.setAttribute,getAttribute:t.Element.prototype.getAttribute,removeAttribute:t.Element.prototype.removeAttribute,hasAttribute:t.Element.prototype.hasAttribute,cloneNode:t.Node.prototype.cloneNode,addEventListener:t.Node.prototype.addEventListener,config:[{elements:[t.HTMLScriptElement,t.HTMLIFrameElement,t.HTMLEmbedElement,t.HTMLInputElement,t.HTMLTrackElement,t.HTMLMediaElement,t.HTMLSourceElement,t.Image,t.HTMLImageElement],tags:["src"],action:"url"},{elements:[t.HTMLSourceElement,t.HTMLImageElement],tags:["srcset"],action:"srcset"},{elements:[t.HTMLAnchorElement,t.HTMLLinkElement,t.HTMLAreaElement,t.SVGImageElement,t.HTMLBaseElement],tags:["href"],action:"url"},{elements:[t.HTMLIFrameElement],tags:["contentWindow","contentDocument"],action:"window"},{elements:[t.HTMLFormElement],tags:["action"],action:"url"},{elements:[t.HTMLObjectElement],tags:["data"],action:"url"},{elements:[t.HTMLScriptElement,t.HTMLLinkElement],tags:["integrity"],action:"rewrite",new:"nointegrity"},{elements:[t.HTMLScriptElement,t.HTMLLinkElement],tags:["nonce"],action:"rewrite",new:"nononce"},{elements:[t.HTMLIFrameElement],tags:["srcdoc"],action:"html"},{elements:[t.HTMLElement],tags:["style"],action:"css"},{elements:[t.HTMLLinkElement],tags:["imageSrcset"],action:"srcset"}],createGetter:i=>({get(){return new URL(this.href||t.__dynamic$location.href)[i]},set(n){}}),client:Vt},t.__dynamic.baseURL=t.document?new URL(t.__dynamic.url.decode(t.document.baseURI)):null),t.document&&(e.cookie={str:t.__dynamic$cookie||"",desc:Object.getOwnPropertyDescriptor(t.Document.prototype,"cookie")}),t.XMLHttpRequest&&(e.http={XMLResponseURL:Object.getOwnPropertyDescriptor(t.XMLHttpRequest.prototype,"responseURL"),ResponseURL:Object.getOwnPropertyDescriptor(t.Response.prototype,"url"),RequestURL:Object.getOwnPropertyDescriptor(t.Request.prototype,"url"),XMLHttpRequest:t.XMLHttpRequest}),t.Storage&&(e.storage={localStorage:t.localStorage,sessionStorage:t.sessionStorage,keys:{localStorage:Object.keys(t.localStorage),sessionStorage:Object.keys(t.sessionStorage)},methods:["getItem","setItem","removeItem","clear","length","keys","values","entries","forEach","hasOwnProperty","toString","toLocaleString","valueOf","isPrototypeOf","propertyIsEnumerable","constructor","key"]},e.storage.cloned={localStorage:e.util.clone(e.storage.localStorage),sessionStorage:e.util.clone(e.storage.sessionStorage)}),t.RTCPeerConnection&&(e.webrtc={endpoints:["stun:stun.webice.org"]}),t.trustedTypes&&(e.trustedTypes={policy:t.trustedTypes.createPolicy("dynamic",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i,createURL:i=>i}),createScript:t.TrustedTypePolicy.prototype.createScript}),t.__dynamic$config.tab&&(t.document&&t.__dynamic$config.tab.title&&(document.title=t.__dynamic$config.tab.title,e.define(t.document,"title",{get(){return t.__dynamic$config.tab.title},set(i){return i}})),t.__dynamic$config.tab.icon&&(t.__dynamic$icon=t.__dynamic$config.tab.icon),t.Navigator&&t.__dynamic$config.tab.ua&&e.define(t.navigator,"userAgent",{get(){return t.__dynamic$config.tab.ua},set(){}}))}function pi(t){t.__dynamic.wrap=function(e,i,n){if(e.__dynamic$target)return e;if(e.toString().includes("{ [native code] }")&&!e.prototype){var r=i,s=e,o=function(...p){if(typeof n=="string"){var u=t.__dynamic.fire(n,this?[this,...p]:p);if(u)return u}var h=r.call(this,s,...p);return h},a=function(...p){return o.call(this,...p)};return t.__dynamic.define(a,"name",{value:e.name,writable:!1}),a.__dynamic$target=e,a.toString=()=>`function ${e.name}() { [native code] }`,a}else try{let p=class extends e{constructor(...u){var h=[...u],m=i.call(e,e,...u);m&&(u=m),super(...u),n&&n(this,h)}};return Object.defineProperty(p,"name",{value:e.name,writable:!1}),p}catch{return e}}}function Vt(t,e={},i=""){if(t.hasOwnProperty("__dynamic"))return!1;t.hasOwnProperty("__dynamic$config")||(t.__dynamic$config=e),t.parent?.__dynamic&&(t.__dynamic$bare=t.parent.__dynamic$bare);let n=new $t(t.__dynamic$config);n.config.bare.path=typeof n.config.bare.path=="string"||n.config.bare.path instanceof URL?[new URL(n.config.bare.path,t.location)][0]:n.config.bare.path.map(s=>new URL(s,t.location)),t.__dynamic$baseURL=i||t.__dynamic$url||n.url.decode(location.pathname+location.search+location.hash)||"",t.__dynamic=n,t.__dynamic.bare=new t.__dynamic.modules.bare.BareClient(t.__dynamic$config.bare.path,t.__dynamic$bare),t.__dynamic.meta.load(new URL(t.__dynamic$baseURL)),ci(t,null),pi(t);for(var r of t.__dynamic.client.methods){let s=r.name,o=Object.entries(t.__dynamic.client).find(a=>a[0]==s);s=="mutation"&&t.frameElement||r.function=="self"&&o[1](t)}return t}var Tc=Vt(self);})();
|
|
//# sourceMappingURL=dynamic.client.js.map
|