@gct-paas/render 0.1.4-dev.15 → 0.1.4-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/loader.esm.min.js +1 -1
- package/es/Event/Dependency/controller.d.ts +1 -1
- package/es/Event/bizServiceRequest.d.ts +1 -1
- package/es/Event/bizServiceRequest.mjs +2 -2
- package/es/index.mjs +3 -2
- package/es/utils/expression/index.d.ts +1 -1
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.mjs +2 -1
- package/es/utils/render-plugin-pkg-util/render-plugin-pkg-util.d.ts +43 -0
- package/es/utils/render-plugin-pkg-util/render-plugin-pkg-util.mjs +65 -0
- package/package.json +15 -7
package/dist/loader.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as s,Dependency_ENUM as i,DisplayType as n,EntityModelCategoryEnum as r,ExamineAndApproveStateEnum as a,FIELD_TYPE as o,FieldSysVarDefaultValueEnum as u,FormComponents as c,GLOBAL_VAR_TYPE as h,INNER_EVENT as l,OpinionTypeEnum as p,SYSTEM_VAR_PREFIX as d,cssLoader as m,functionMap as D,innerVarIds as f,operator2FuncMap as x,t as E,usePermissionStore as g}from"@gct-paas/core";import y from"dayjs";import*as C from"lodash-es";import{cloneDeep as A,differenceBy as F,get as w,isEqual as S,isNull as k,isUndefined as b,merge as v}from"lodash-es";import{DesignNodeMode as B,extractFontStyle as T,generateWrapperStyle as I,propsToStyle as N}from"@gct-paas/schema";import P from"bignumber.js";import{computed as O,createElementBlock as M,createElementVNode as _,customRef as R,defineComponent as U,getCurrentInstance as L,getCurrentScope as z,inject as J,nextTick as K,onActivated as X,onBeforeUnmount as $,onMounted as Y,onScopeDispose as j,onUnmounted as G,openBlock as V,provide as H,reactive as W,readonly as q,ref as Q,shallowReactive as Z,shallowRef as ee,toRaw as te,toRef as se,toValue as ie,unref as ne,watch as re}from"vue";import ae from"qs";var oe=Object.create,ue=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,he=Object.getOwnPropertyNames,le=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty,de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),me=(e,t)=>{let s={};for(var i in e)ue(s,i,{get:e[i],enumerable:!0});return t||ue(s,Symbol.toStringTag,{value:"Module"}),s},De=(e,t,s)=>(s=null!=e?oe(le(e)):{},((e,t,s,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var n,r=he(t),a=0,o=r.length;a<o;a++)n=r[a],pe.call(e,n)||void 0===n||ue(e,n,{get:(e=>t[e]).bind(null,n),enumerable:!(i=ce(t,n))||i.enumerable});return e})(!t&&e&&e.__esModule?s:ue(s,"default",{value:e,enumerable:!0}),e)),fe=class{map=/* @__PURE__ */new Map;register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}},xe="view-design",Ee="id",ge=/* @__PURE__ */function(e){return e.ACTIVE_TAG="design-active-item",e.DRAG_TAG="design-drop-item",e.INDEX_TAG="design-item-index",e.NODE_ID_TAG="design-item-id",e.DESIGN_NAME="design-item-name",e.GROUP_TAG="design-group-tag",e.DRAG_GROUP_TYPE="drag-group-type",e.IS_INLINE_BLOCK="is-inline-block",e.SELECTOR_INDEX="selector-index",e}({}),ye={WEEK_NOW:e=>{const t=y().startOf("week").add(1,"day"),s=y().endOf("week").add(1,"day"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},MONTH_NOW:e=>{const t=y().startOf("month"),s=y().endOf("month"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},QUARTER_NOW:e=>{const t=y().startOf("quarter"),s=y().endOf("quarter"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},YEAR_NOW:e=>{const t=y().startOf("year"),s=y().endOf("year"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},WEEk_BEFORE:e=>{y.locale("zh-cn");const t=y().startOf("week").subtract(1,"week"),s=t.clone().endOf("week"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},MONTH_BEFORE:e=>{const t=y().add(-1,"month").startOf("month"),s=y().add(-1,"month").endOf("month"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},QUARTER_BEFORE:e=>{const t=y().add(-1,"quarter").startOf("quarter"),s=y().add(-1,"quarter").endOf("quarter"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},YEAR_BEFORE:e=>{const t=y().add(-1,"year").startOf("year"),s=y().add(-1,"year").endOf("year"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},DATE_BEFORE:e=>{const t=y().add(-1,"day");return{disabled:e<t.valueOf(),maxDate:t}},DATE_AFTER:e=>{const t=y();return{disabled:e>t.valueOf(),minDate:t}}},Ce=(e,t)=>{const s=y(e).valueOf(),i=ye[t];if(i){const{disabled:e}=i(s);return e}return!1},Ae=e=>{const t=ye[e];if(t){const{minDate:e,maxDate:s}=t(0);return Object.assign({},e&&{minDate:new Date(e)},s&&{maxDate:new Date(s)})}return{}},Fe=(e,t)=>{let s;switch(e){case u.SYS_DATE:s=y().format(t??"YYYY-MM-DD");break;case u.SYS_DATE_TIME:s=y().format(t??"YYYY-MM-DD HH:mm:ss");break;case u.SYS_TIME:s=y().format(t??"HH:mm:ss")}return s},we=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),Se=/* @__PURE__ */function(e){return e.CUSTOM_HOME="custom-home",e.CARD_VIEW="card-view",e.MOBILE_CARD_VIEW="mobile-card-view",e.DESIGN_EDITOR="design-editor",e}({}),ke=/* @__PURE__ */function(e){return e.PAGE="PAGE",e.PAGE_LOWER="page",e.FIELD="field",e.PANEL="panel",e.TABS="tabs",e.TAB_ITEM="tab-item",e.MENU_LIST="menu-list",e.SELECT_COMPONENT="select-component",e.GRID="grid",e.GRID_ITEM="grid-item",e.MESSAGE="message",e.WORKBENCH="workbench",e.PERSONAL_CENTER="personal-center",e.TODO="todo",e}({}),be=class{static map=/* @__PURE__ */new Map;static cache=/* @__PURE__ */new Map;static register(e,t,s){const i=s?`${s}:${e}`:e;this.map.set(i,t)}static get(e,t){const s=t?`${t}:${e}`:e;if(this.cache.has(s))return this.cache.get(s);const i=this.map.get(s);if(i){const e=i();return this.cache.set(s,e),e}return null}static registerCustomHome(e,t){this.register(e,t,Se.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,Se.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,Se.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,Se.DESIGN_EDITOR)}},ve={[o.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},Be=(e,t)=>{const{attrsTransform:s=[]}=ve[e]??{};return s.reduce((e,s)=>{const i=w(t,s.from);return e[s.to]=i,e},{})};function Te(e){const{style:t={}}=e||{},s="ignoringStyle"in e?e.ignoringStyle??[]:[],i=N(t);return{wrapperStyle:I(t,s),wStyle:i,labelFont:T(t.labelFont),contentFont:T(t.contentFont)}}var Ie=e=>T(e),Ne=class{static modelData=/* @__PURE__ */new Map;static FiledData=/* @__PURE__ */new Map;static responsePromise=/* @__PURE__ */new Map;static silent=!1;static async getMap(e,t=!0){if(!e)return Promise.reject();if(!this.responsePromise.has(e)||!t){const t=(async()=>{const t=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,t);const s=!!t?.fieldMetaList&&t.fieldMetaList.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{});s&&this.FiledData.set(e,s)})();this.responsePromise.set(e,t)}return this.responsePromise.get(e)}static async getConfigByField(e,t,s=!0){return await this.getMap(e,s),this.FiledData.get(e)[t]}static async getConfigByModel(e){return await this.getMap(e),this.modelData.get(e)}static clearCacheMap(e=!1){e&&this.responsePromise.clear(),this.modelData.clear(),this.FiledData.clear()}};async function Pe(e,t=!1){const{modelKey:s,field:i,isCustomField:n,fieldName:r,readonly:a,fieldType:o}=e.props;if(!e.isField&&!t||"table_name_"===i)return{};let u;if(n?u={name:r,type:""}:s&&(u=await Ne.getConfigByField(s,i)),!(n||u&&u.type===o))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:h}=u;return e.props.fieldRequired=!!c,c&&!a&&(e.props.required=!0),void 0!==h?.digits&&(e.props.precision=h.digits),u}function Oe(e,t){return e?.map(e=>Me(e,t))||[]}function Me(e={},t={}){const s=A(e);s._X_ROW_KEY=void 0;const i=Object.keys(t??{})?.length?Object.keys(s).reduce((e,i)=>{const n=t[i],r=s[i];if(n&&r)try{const t=(r+"").split(",").map(e=>n[e]);e[i]={[r+""]:t}}catch{}return e},{}):s._DICT||{};return{...s,_DICT:i,_OPCT:s.__FOREIGN__&&"object"==typeof s.__FOREIGN__?Me(s.__FOREIGN__,t):{}}}function _e(e,t,s){"object"==typeof t&&v(e,Me(t,s))}function Re(e,t,s){if("object"!=typeof t)return;for(const n in e)"_OPCT"!==n&&"_NOSUBMIT"!==n&&delete e[n];const i=Me(t,s);i._X_ROW_KEY=t._X_ROW_KEY,v(e,i)}function Ue(e,t={},s={}){const i=A(t.__FOREIGN__||t),n={_DICT:{}};return Object.keys(i).forEach(t=>{const r=`${e}.${t}`,a=s[t],o=i[t];if(a&&o)try{const e=(o+"").split(",").map(e=>a[e]);n._DICT[r]={[o+""]:e}}catch{}n[r]=o}),{...i,_OPCT:n}}function Le(e={},t={}){const s=A(e);return Object.keys(t??{})?.length?Object.keys(s).reduce((e,i)=>{const n=t[i]||{},r=s[i];try{e[i]=(r+"").split(",").map(e=>n[e]).join(",")}catch{e[i]=r}return e},{}):s}var ze,Je=/* @__PURE__ */de((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_utc=i()}(e,function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,n,r){var a=n.prototype;r.utc=function(e){return new n({date:e,utc:!0,args:arguments})},a.utc=function(t){var s=r(this.toDate(),{locale:this.$L,utc:!0});return t?s.add(this.utcOffset(),e):s},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(i,n){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var n=(""+i[0]).match(s)||["-",0,0],r=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===r?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i;if(0===a)return this.utc(n);var o=this.clone();if(n)return o.$offset=a,o.$u=!1,o;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(a+u,e)).$offset=a,o.$x.$localOffset=u,o};var h=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var l=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var p=a.diff;a.diff=function(e,t,s){if(e&&this.$u===e.$u)return p.call(this,e,t,s);var i=this.local(),n=r(e).local();return p.call(i,n,t,s)}}})}),Ke=/* @__PURE__ */de((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_timezone=i()}(e,function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(s,i,n){var r,a=function(e,s,i){void 0===i&&(i={});var n=new Date(e);return function(e,s){void 0===s&&(s={});var i=s.timeZoneName||"short",n=e+"|"+i,r=t[n];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[n]=r),r}(s,i).formatToParts(n)},o=function(t,s){for(var i=a(t,s),r=[],o=0;o<i.length;o+=1){var u=i[o],c=u.type,h=u.value,l=e[c];l>=0&&(r[l]=parseInt(h,10))}var p=r[3],d=24===p?0:p,m=r[0]+"-"+r[1]+"-"+r[2]+" "+d+":"+r[4]+":"+r[5]+":000",D=+t;return(n.utc(m).valueOf()-(D-=D%1e3))/6e4},u=i.prototype;u.tz=function(e,t){void 0===e&&(e=r);var s,i=this.utcOffset(),a=this.toDate(),o=a.toLocaleString("en-US",{timeZone:e}),u=Math.round((a-new Date(o))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-u;if(Number(c)){if(s=n(o,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var h=s.utcOffset();s=s.add(i-h,"minute")}}else s=this.utcOffset(0,t);return s.$x.$timezone=e,s},u.offsetName=function(e){var t=this.$x.$timezone||n.tz.guess(),s=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return s&&s.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var s=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(s,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,s){var i=s&&t,a=s||t||r,u=o(+n(),a);if("string"!=typeof e)return n(e).tz(a);var c=function(e,t,s){var i=e-60*t*1e3,n=o(i,s);if(t===n)return[i,t];var r=o(i-=60*(n-t)*1e3,s);return n===r?[i,n]:[e-60*Math.min(n,r)*1e3,Math.max(n,r)]}(n.utc(e,i).valueOf(),u,a),h=c[0],l=c[1],p=n(h).utcOffset(l);return p.$x.$timezone=a,p},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(e){r=e}}})}),Xe=/* @__PURE__ */de((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_quarterOfYear=i()}(e,function(){var e="month",t="quarter";return function(s,i){var n=i.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var r=n.add;n.add=function(s,i){return s=Number(s),this.$utils().p(i)===t?this.add(3*s,e):r.bind(this)(s,i)};var a=n.startOf;n.startOf=function(s,i){var n=this.$utils(),r=!!n.u(i)||i;if(n.p(s)===t){var o=this.quarter()-1;return r?this.month(3*o).startOf(e).startOf("day"):this.month(3*o+2).endOf(e).endOf("day")}return a.bind(this)(s,i)}}})}),$e=/* @__PURE__ */de((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}:"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_toArray=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}(e,function(){return function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}})}),Ye=/* @__PURE__ */de((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_isoWeek=i()}(e,function(){var e="day";return function(t,s,i){var n=function(t){return t.add(4-t.isoWeekday(),e)},r=s.prototype;r.isoWeekYear=function(){return n(this).year()},r.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var s,r,a,o=n(this),u=(s=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(s).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,e));return o.diff(u,"week")+1},r.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=r.startOf;r.startOf=function(e,t){var s=this.$utils(),i=!!s.u(t)||t;return"isoweek"===s.p(e)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(e,t)}}})}),je=/* @__PURE__ */me({ABS:()=>Ut,ADD:()=>kt,AND:()=>st,AVERAGE:()=>Rt,CONCAT:()=>lt,COUNT:()=>xs,DATE2TIMESTAMP:()=>Vt,DATEFORMAT:()=>Ht,DAY:()=>es,DIVISION:()=>Bt,EQ:()=>nt,FINDSTR:()=>Ct,FIXED:()=>Tt,GE:()=>ut,GET:()=>Xt,GT:()=>ct,HEADPUSH:()=>jt,HOUR:()=>ts,IF:()=>Qe,ISDATERANGE:()=>ls,ISEMPTY:()=>Ze,ISNULL:()=>et,ISTIMERANGE:()=>ps,ISUNDEFINED:()=>tt,LARGE:()=>Ot,LASTMONTHRANGE:()=>as,LASTQUARTER:()=>hs,LASTWEEKRANGE:()=>ns,LASTYEARRANGE:()=>us,LE:()=>at,LEN:()=>ht,LOWER:()=>Dt,LT:()=>ot,LTRIM:()=>xt,MAX:()=>Pt,MIN:()=>Mt,MINUTE:()=>ss,MOD:()=>Lt,MONTH:()=>Zt,MONTHRANGE:()=>rs,MULTIPLICATION:()=>vt,NE:()=>rt,NOW:()=>Wt,OR:()=>it,PARSENUMBER:()=>Ft,POWER:()=>Jt,PUSH:()=>Yt,PUT:()=>$t,QUARTER:()=>cs,REDUCE:()=>bt,REPEAT:()=>gt,REPLACE:()=>yt,ROUND:()=>It,ROUNDUP:()=>Nt,RTRIM:()=>Et,SEARCHSTR:()=>At,SEQMAP:()=>Ds,SMALL:()=>_t,SPLIT:()=>wt,SQRT:()=>Kt,STDEV:()=>Es,SUBSTR:()=>dt,SUBSTRING:()=>pt,SUM:()=>St,SUMSQ:()=>fs,TIMESTAMP2DATE:()=>Gt,TODAY:()=>qt,TRIM:()=>ft,TUPLE:()=>ms,UPPER:()=>mt,WEEKRANGE:()=>is,YEAR:()=>Qt,YEARRANGE:()=>os}),Ge=/* @__PURE__ */De(Je(),1),Ve=/* @__PURE__ */De(Ke(),1),He=/* @__PURE__ */De(Xe(),1),We=/* @__PURE__ */De($e(),1),qe=/* @__PURE__ */De(Ye(),1);function Qe(e,t,s){return e?t:s}function Ze(e){return null==e||""===e||0===e}function et(e){return k(e)}function tt(e){return b(e)}function st(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function it(...e){return e.some(e=>e)}function nt(e,t){return S(e,t)}function rt(e,t){return e!==t}function at(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function ot(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function ut(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function ct(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function ht(e){return e?.length||0}function lt(...e){return e.join("")}function pt(e="",t,s){return(()=>{const i=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(s)+Number(t>=0));return t<0?[...i].reverse().join(""):i})()}function dt(e="",t,s){return(()=>{const i=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(t+Number(t<0))+Math.abs(s));return t<0?[...i].reverse().join(""):i})()}function mt(e=""){return e.toUpperCase()}function Dt(e=""){return e.toLowerCase()}function ft(e=""){return e.trim()}function xt(e=""){return e.replace(/^\s\s*/,"")}function Et(e=""){return e.replace(/\s\s*$/,"")}function gt(e="",t=""){return e.match(new RegExp(t,"g"))?.length||null}function yt(e="",t="",s=""){return e.replace(new RegExp(t,"g"),s)}function Ct(e="",t=""){return e.includes(t)}function At(e="",t=""){return(()=>{const s=e.match(new RegExp(t,"g"))?.length;return s||0})()}function Ft(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function wt(e="",t=""){return e.split(t)}function St(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(gs,0):""}function kt(...e){return e.flat().reduce(gs,0)}function bt(e,...t){return t.reduce(ys,e)}function vt(e,...t){const s=t.flat().filter(e=>""!==e&&null!=e);return s.length?s.reduce(Cs,e):""}function Bt(e,...t){return t.reduce(As,e)}function Tt(e,t){return(()=>{if(t<0)throw new Error("Decimal places should be non-negative.");const[s,i=""]=e.toString().split(".");if(0==t)return s;let n=i.split("");if(n.length>t)n=n.slice(0,t);else{const e=n.length;for(let s=0;s<t-e;s++)n.push("0")}return`${s}.${n.join("")}`})()}function It(e,t){return(()=>{if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");const s=Math.trunc(t),i=Number(e);if(isNaN(i))return"";const n=i>0?(+(Math.round(Number(i+`e${s}`))+`e-${s}`)).toFixed(s):-(+(Math.round(Number(-i+`e${s}`))+`e-${s}`)).toFixed(s);return parseFloat(n+"")})()}function Nt(e,t){if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");return t=t?parseInt(t+""):0,new P(e).decimalPlaces(t,P.ROUND_UP).toNumber()}function Pt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function Ot(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>t-e)[t-1]})()}function Mt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function _t(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>e-t)[t-1]})()}function Rt(...e){const t=e.flat().filter(e=>""!==e&&null!=e),s=t.length;if(!s)return"";let i=new P(0);for(const n of t)i=i.plus(n);return i.dividedBy(s).toNumber()}function Ut(e){return Math.abs.call(null,e)}function Lt(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const s=new P(e).mod(t).toNumber();return isNaN(s)?"":s})()}function zt(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e){const t=e.trim();if(""===t)return null;const s=Number(t);return Number.isFinite(s)?s:null}if("bigint"==typeof e){const t=Number(e);return Number.isFinite(t)?t:null}return null}function Jt(e,t){return(()=>{const s=zt(e),i=zt(t);return null===s||null===i?NaN:Math.abs(i)>1e9?i>0?1/0:0:Math.pow(s,i)})()}function Kt(e){return(()=>{const t=zt(e);return null===t?NaN:Math.sqrt(t)})()}function Xt(e,t){return(()=>{if(Array.isArray(e)){if("number"==typeof t)return e[t];throw new Error("For arrays, the second argument should be a number.")}if("object"==typeof e){if("string"==typeof t)return e[t];throw new Error("For objects, the second argument (b) should be a string.")}throw new Error("Unsupported data type. The first argument (a) should be an array or an object.")})()}function $t(e,t,s){return(()=>{if(Array.isArray(e)){if(!("number"==typeof t&&t>=0&&t<e.length))throw new Error("For arrays, the second argument (b) should be a number.");e[t]=s}else{if("object"!=typeof e)throw new Error("Unsupported data type. The first argument (a) should be an array or an object.");if("string"!=typeof t||!e)throw new Error("For objects, the second argument (b) should be a string.");e[t]=s}return e})()}function Yt(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.push(t),e})()}function jt(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.unshift(t),e})()}function Gt(e){if(e)return(()=>{if(!e)throw new Error("the frist argument should not be null");const t=/* @__PURE__ */new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})()}function Vt(e){if(e)return y(e).unix()}function Ht(e,t){if(e)return y(e).format(t)}function Wt(){return y().format("YYYY-MM-DD HH:MM:ss")}function qt(){return y().format("YYYY-MM-DD")}function Qt(e){return y(e).year()}function Zt(e){return y(e).month()}function es(e){return y(e).day()}function ts(e){return y(e).hour()}function ss(e){return y(e).minute()}function is(){return[ds(y().startOf("week").toDate()),ds(y().endOf("week").toDate())]}function ns(){return[ds(y().subtract(1,"week").startOf("week").toDate()),ds(y().subtract(1,"week").endOf("week").toDate())]}function rs(){return[ds(y().startOf("month").toDate()),ds(y().endOf("month").toDate())]}function as(){return[ds(y().subtract(1,"month").startOf("month").toDate()),ds(y().subtract(1,"month").endOf("month").toDate())]}function os(){return[ds(y().startOf("year").toDate()),ds(y().endOf("year").toDate())]}function us(){return[ds(y().subtract(1,"year").startOf("year").toDate()),ds(y().subtract(1,"year").endOf("year").toDate())]}function cs(){return(()=>{const e=Math.floor((y().month()+3)/3);return[ds(y().quarter(e).startOf("quarter").toDate()),ds(y().quarter(e).endOf("quarter").toDate())]})()}function hs(){return(()=>{const e=Math.floor((y().month()+3)/3);return[ds(y().quarter(e-1).startOf("quarter").toDate()),ds(y().quarter(e-1).endOf("quarter").toDate())]})()}function ls(e,t){return(()=>{const[s,i]=t;return e>=s&&e<=i})()}function ps(e,t){return(()=>{const[s,i]=t,n=y(e,"HH:mm");if(s>i){const e=y(s,"HH:mm"),t=y(i,"HH:mm").add(1,"day");return n>=e||n<=t}return n>=y(s,"HH:mm")&&n<=y(i,"HH:mm")})()}function ds(e){return y(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function ms(...e){return[...e]}function Ds(...e){const t=(e.length-e.length%2)/2,s={};return Array(t).forEach(t=>{const i=e[2*t];s[i]=e[2*t+1]}),s}function fs(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=Cs(e,e);return""!==t?t:new P(0).toNumber()}).reduce((e,t)=>gs(e,t)||P(0).toNumber(),new P(0).toNumber())}function xs(e){return Array.isArray(e)?e.length:""}function Es(...e){const t=e.flat().map(e=>Number(e)).filter(e=>Number.isFinite(e));if(t.length<2)return"";const s=t.reduce((e,t)=>e+t,0)/t.length,i=t.reduce((e,t)=>{const i=t-s;return e+i*i},0)/(t.length-1);return Math.sqrt(i)}function gs(e,t){const s=new P(e).plus(new P(t)).toNumber();return isNaN(s)?"":s}function ys(e,t){const s=new P(e).minus(new P(t)).toNumber();return isNaN(s)?"":s}function Cs(e,t){const s=new P(e).multipliedBy(new P(t)).toNumber();return isNaN(s)?"":s}function As(e,t){const s=new P(e).div(new P(t)).toNumber();return isNaN(s)?"":s}y.extend(Ge.default),y.extend(Ve.default),y.extend(He.default),y.extend(We.default),y.extend(qe.default),function(e){e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AwaitExpression="AwaitExpression",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ChainExpression="ChainExpression",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.DebuggerStatement="DebuggerStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForStatement="ForStatement",e.ForOfStatement="ForOfStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportAttribute="ImportAttribute",e.ImportExpression="ImportExpression",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.Literal="Literal",e.LabeledStatement="LabeledStatement",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.PrivateIdentifier="PrivateIdentifier",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression"}(ze||(ze={}));var Fs,ws=class{constructor(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}insertInnerComments(e,t){if(e.type===ze.BlockStatement&&0===e.body.length){const s=[];for(let e=this.leading.length-1;e>=0;--e){const i=this.leading[e];t.end.offset>=i.start&&(s.unshift(i.comment),this.leading.splice(e,1),this.trailing.splice(e,1))}s.length&&(e.innerComments=s)}}findTrailingComments(e){let t=[];if(this.trailing.length>0){for(let s=this.trailing.length-1;s>=0;--s){const i=this.trailing[s];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}const s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){const i=s.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=s.node.trailingComments,delete s.node.trailingComments)}return t}findLeadingComments(e){const t=[];let s;for(;this.stack.length>0;){const t=this.stack[this.stack.length-1];if(!(t&&t.start>=e.start.offset))break;s=t.node,this.stack.pop()}if(s){for(let i=(s.leadingComments?s.leadingComments.length:0)-1;i>=0;--i){const n=s.leadingComments[i];n.range[1]<=e.start.offset&&(t.unshift(n),s.leadingComments.splice(i,1))}return s.leadingComments&&0===s.leadingComments.length&&delete s.leadingComments,t}for(let i=this.leading.length-1;i>=0;--i){const s=this.leading[i];s.start<=e.start.offset&&(t.unshift(s.comment),this.leading.splice(i,1))}return t}visitNode(e,t){if(e.type===ze.Program&&e.body.length>0)return;this.insertInnerComments(e,t);const s=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),s.length>0&&(e.trailingComments=s),this.stack.push({node:e,start:t.start.offset})}visitComment(e,t){const s="L"===e.type[0]?"Line":"Block",i={type:s,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){const i={comment:{type:s,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=s,this.leading.push(i),this.trailing.push(i)}}visit(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)}},Ss={NonAsciiIdentifierStart:/[\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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-\u170C\u170E-\u1711\u1720-\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-\u1B4B\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\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-\uAB67\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},ks={fromCodePoint:e=>e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023)),isStringWellFormedUnicode(e){for(let t=0;t<e.length;t++){let s=e.charCodeAt(t);if(s>=55296&&s<=56319){if(t===e.length-1)return!1;if(t++,s=e.charCodeAt(t),s<56320&&s>57343)return!1}else if(s>=56320&&s<=57343)return!1}return!0},isWhiteSpace:e=>32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0,isLineTerminator:e=>10===e||13===e||8232===e||8233===e,isIdentifierStart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Ss.NonAsciiIdentifierStart.test(ks.fromCodePoint(e)),isIdentifierPart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Ss.NonAsciiIdentifierPart.test(ks.fromCodePoint(e)),isDecimalDigit:e=>e>=48&&e<=57,isDecimalDigitChar:e=>1===e.length&&ks.isDecimalDigit(e.charCodeAt(0)),isHexDigit:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,isHexDigitChar:e=>1===e.length&&ks.isHexDigit(e.charCodeAt(0)),isOctalDigit:e=>e>=48&&e<=55,isOctalDigitChar:e=>1===e.length&&ks.isOctalDigit(e.charCodeAt(0))};!function(e){e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXNamespacedName="JSXNamespacedName",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXText="JSXText"}(Fs||(Fs={}));var bs=class{constructor(e){this.type=Fs.JSXClosingElement,this.name=e}},vs=class{constructor(){this.type=Fs.JSXClosingFragment}},Bs=class{constructor(e,t,s){this.type=Fs.JSXElement,this.openingElement=e,this.children=t,this.closingElement=s}},Ts=class{constructor(){this.type=Fs.JSXEmptyExpression}},Is=class{constructor(e){this.type=Fs.JSXExpressionContainer,this.expression=e}},Ns=class{constructor(e){this.type=Fs.JSXIdentifier,this.name=e}},Ps=class{constructor(e,t){this.type=Fs.JSXMemberExpression,this.object=e,this.property=t}},Os=class{constructor(e,t){this.type=Fs.JSXAttribute,this.name=e,this.value=t}},Ms=class{constructor(e,t){this.type=Fs.JSXNamespacedName,this.namespace=e,this.name=t}},_s=class{constructor(e,t,s){this.type=Fs.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=s}},Rs=class{constructor(e){this.type=Fs.JSXOpeningFragment,this.selfClosing=e}},Us=class{constructor(e){this.type=Fs.JSXSpreadAttribute,this.argument=e}},Ls=class{constructor(e,t){this.type=Fs.JSXText,this.value=e,this.raw=t}},zs=class{constructor(e){this.type=ze.ArrayExpression,this.elements=e}},Js=class{constructor(e){this.type=ze.ArrayPattern,this.elements=e}},Ks=class{constructor(e,t,s,i){this.type=ze.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=s,this.async=i}},Xs=class{constructor(e,t,s){this.type=ze.AssignmentExpression,this.operator=e,this.left=t,this.right=s}},$s=class{constructor(e,t){this.type=ze.AssignmentPattern,this.left=e,this.right=t}},Ys=class{constructor(e,t,s,i){this.type=ze.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=!0}},js=class{constructor(e){this.type=ze.AwaitExpression,this.argument=e}},Gs=class{constructor(e,t,s){this.type=ze.Literal,this.value=e,this.raw=t,this.bigint=s}},Vs=class{constructor(e,t,s){this.type=ze.BinaryExpression,this.operator=e,this.left=t,this.right=s}},Hs=class{constructor(e){this.type=ze.BlockStatement,this.body=e}},Ws=class{constructor(e){this.type=ze.BreakStatement,this.label=e}},qs=class{constructor(e,t,s){this.type=ze.CallExpression,this.callee=e,this.arguments=t,this.optional=s}},Qs=class{constructor(e,t){this.type=ze.CatchClause,this.param=e,this.body=t}},Zs=class{constructor(e){this.type=ze.ChainExpression,this.expression=e}},ei=class{constructor(e){this.type=ze.ClassBody,this.body=e}},ti=class{constructor(e,t,s,i){this.type=ze.ClassDeclaration,this.id=e,this.superClass=t,this.body=s,this.decorators=i}},si=class{constructor(e,t,s,i){this.type=ze.ClassExpression,this.id=e,this.superClass=t,this.body=s,this.decorators=i}},ii=class{constructor(e,t,s){this.type=ze.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=s}},ni=class{constructor(e){this.type=ze.ContinueStatement,this.label=e}},ri=class{constructor(){this.type=ze.DebuggerStatement}},ai=class{constructor(e){this.type=ze.Decorator,this.expression=e}},oi=class{constructor(e,t){this.type=ze.ExpressionStatement,this.expression=e,this.directive=t}},ui=class{constructor(e,t){this.type=ze.DoWhileStatement,this.body=e,this.test=t}},ci=class{constructor(){this.type=ze.EmptyStatement}},hi=class{constructor(e,t,s){this.type=ze.ExportAllDeclaration,this.source=e,this.exported=t,this.assertions=s}},li=class{constructor(e){this.type=ze.ExportDefaultDeclaration,this.declaration=e}},pi=class{constructor(e,t,s,i){this.type=ze.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=s,this.assertions=i}},di=class{constructor(e,t){this.type=ze.ExportSpecifier,this.exported=t,this.local=e}},mi=class{constructor(e){this.type=ze.ExpressionStatement,this.expression=e}},Di=class{constructor(e,t,s){this.type=ze.ForInStatement,this.left=e,this.right=t,this.body=s,this.each=!1}},fi=class{constructor(e,t,s,i){this.type=ze.ForOfStatement,this.await=i,this.left=e,this.right=t,this.body=s}},xi=class{constructor(e,t,s,i){this.type=ze.ForStatement,this.init=e,this.test=t,this.update=s,this.body=i}},Ei=class{constructor(e,t,s,i){this.type=ze.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=!1}},gi=class{constructor(e,t,s,i,n){this.type=ze.FunctionExpression,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=n}},yi=class{constructor(e){this.type=ze.Identifier,this.name=e}},Ci=class{constructor(e,t,s){this.type=ze.IfStatement,this.test=e,this.consequent=t,this.alternate=s}},Ai=class{constructor(e,t){this.type=ze.ImportAttribute,this.key=e,this.value=t}},Fi=class{constructor(e,t){this.type=ze.ImportExpression,this.source=e,this.attributes=t}},wi=class{constructor(e,t,s){this.type=ze.ImportDeclaration,this.specifiers=e,this.source=t,this.assertions=s}},Si=class{constructor(e){this.type=ze.ImportDefaultSpecifier,this.local=e}},ki=class{constructor(e){this.type=ze.ImportNamespaceSpecifier,this.local=e}},bi=class{constructor(e,t){this.type=ze.ImportSpecifier,this.local=e,this.imported=t}},vi=class{constructor(e,t){this.type=ze.LabeledStatement,this.label=e,this.body=t}},Bi=class{constructor(e,t){this.type=ze.Literal,this.value=e,this.raw=t}},Ti=class{constructor(e,t,s){this.type=ze.LogicalExpression,this.operator=e,this.left=t,this.right=s}},Ii=class{constructor(e,t,s,i){this.type=ze.MemberExpression,this.computed=e,this.object=t,this.property=s,this.optional=i}},Ni=class{constructor(e,t){this.type=ze.MetaProperty,this.meta=e,this.property=t}},Pi=class{constructor(e,t,s,i,n,r){this.type=ze.MethodDefinition,this.key=e,this.computed=t,this.value=s,this.kind=i,this.static=n,this.decorators=r}},Oi=class{constructor(e){this.type=ze.Program,this.body=e,this.sourceType="module"}},Mi=class{constructor(e,t){this.type=ze.NewExpression,this.callee=e,this.arguments=t}},_i=class{constructor(e){this.type=ze.ObjectExpression,this.properties=e}},Ri=class{constructor(e){this.type=ze.ObjectPattern,this.properties=e}},Ui=class{constructor(e){this.type=ze.PrivateIdentifier,this.name=e}},Li=class{constructor(e,t,s,i,n,r){this.type=ze.Property,this.key=t,this.computed=s,this.value=i,this.kind=e,this.method=n,this.shorthand=r}},zi=class{constructor(e,t,s,i,n){this.type=ze.Property,this.key=e,this.computed=t,this.value=s,this.static=i,this.decorators=n}},Ji=class{constructor(e,t,s,i){this.type=ze.Literal,this.value=e,this.raw=t,this.regex={pattern:s,flags:i}}},Ki=class{constructor(e){this.type=ze.RestElement,this.argument=e}},Xi=class{constructor(e){this.type=ze.ReturnStatement,this.argument=e}},$i=class{constructor(e){this.type=ze.Program,this.body=e,this.sourceType="script"}},Yi=class{constructor(e){this.type=ze.SequenceExpression,this.expressions=e}},ji=class{constructor(e){this.type=ze.SpreadElement,this.argument=e}},Gi=class{constructor(e){this.type=ze.StaticBlock,this.body=e}},Vi=class{constructor(){this.type=ze.Super}},Hi=class{constructor(e,t){this.type=ze.SwitchCase,this.test=e,this.consequent=t}},Wi=class{constructor(e,t){this.type=ze.SwitchStatement,this.discriminant=e,this.cases=t}},qi=class{constructor(e,t){this.type=ze.TaggedTemplateExpression,this.tag=e,this.quasi=t}},Qi=class{constructor(e,t){this.type=ze.TemplateElement,this.value=e,this.tail=t}},Zi=class{constructor(e,t){this.type=ze.TemplateLiteral,this.quasis=e,this.expressions=t}},en=class{constructor(){this.type=ze.ThisExpression}},tn=class{constructor(e){this.type=ze.ThrowStatement,this.argument=e}},sn=class{constructor(e,t,s){this.type=ze.TryStatement,this.block=e,this.handler=t,this.finalizer=s}},nn=class{constructor(e,t){this.type=ze.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}},rn=class{constructor(e,t,s){this.type=ze.UpdateExpression,this.operator=e,this.argument=t,this.prefix=s}},an=class{constructor(e,t){this.type=ze.VariableDeclaration,this.declarations=e,this.kind=t}},on=class{constructor(e,t){this.type=ze.VariableDeclarator,this.id=e,this.init=t}},un=class{constructor(e,t){this.type=ze.WhileStatement,this.test=e,this.body=t}},cn=class{constructor(e,t){this.type=ze.WithStatement,this.object=e,this.body=t}},hn=class{constructor(e,t){this.type=ze.YieldExpression,this.argument=e,this.delegate=t}};function ln(e,t){if(!e)throw new Error("ASSERT: "+t)}var pn=class{constructor(){this.errors=[],this.tolerant=!1}recordError(e){this.errors.push(e)}tolerate(e){if(!this.tolerant)throw e;this.recordError(e)}constructError(e,t){let s=new Error(e);try{throw s}catch(i){Object.create&&Object.defineProperty&&(s=Object.create(i),Object.defineProperty(s,"column",{value:t}))}return s}createError(e,t,s,i){const n="Line "+t+": "+i,r=this.constructError(n,s);return r.index=e,r.lineNumber=t,r.description=i,r}throwError(e,t,s,i){throw this.createError(e,t,s,i)}tolerateError(e,t,s,i){const n=this.createError(e,t,s,i);if(!this.tolerant)throw n;this.recordError(n)}},dn="Duplicate parameter name not allowed in this context",mn="Unexpected token",Dn="Unexpected token",fn="Keyword must not contain escaped characters",xn="Invalid hexadecimal escape sequence",En="Invalid left-hand side in assignment",gn="Unexpected token",yn="Invalid regular expression",Cn="Invalid tagged template on optional chain",An="Unexpected token",Fn="The `as` and `from` contextual keywords must not contain Unicode escape sequences.",wn="Numeric separator is not allowed here",Sn="In strict mode code, functions can only be declared at top level or inside a block",kn="Function name may not be eval or arguments in strict mode",bn="Octal literals are not allowed in strict mode.",vn="Parameter name eval or arguments is not allowed in strict mode",Bn="Use of future reserved word in strict mode",Tn="Variable name may not be eval or arguments in strict mode",In="Unexpected token %0",Nn="Unexpected token ILLEGAL",Pn="Undefined label '%0'",On="Invalid regular expression: missing /";function Mn(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function _n(e){return"01234567".indexOf(e)}var Rn=class{constructor(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this.length}throwUnexpectedToken(e=Nn){return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}tolerateUnexpectedToken(e=Nn){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}skipSingleLineComment(e){let t,s,i=[];for(this.trackComment&&(i=[],t=this.index-e,s={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){const n=this.source.charCodeAt(this.index);if(++this.index,ks.isLineTerminator(n)){if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart-1};const n={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:s};i.push(n)}return 13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};const n={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:s};i.push(n)}return i}skipMultiLineComment(){let e,t,s=[];for(this.trackComment&&(s=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){const i=this.source.charCodeAt(this.index);if(ks.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};const i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};s.push(i)}return s}++this.index}else++this.index}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};const i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t};s.push(i)}return this.tolerateUnexpectedToken(),s}scanComments(){let e;this.trackComment&&(e=[]);let t=0===this.index;for(;!this.eof();){let s=this.source.charCodeAt(this.index);if(ks.isWhiteSpace(s))++this.index;else if(ks.isLineTerminator(s))++this.index,13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===s)if(s=this.source.charCodeAt(this.index+1),47===s){this.index+=2;const s=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(s)),t=!0}else{if(42!==s)break;{this.index+=2;const t=this.skipMultiLineComment();this.trackComment&&(e=e.concat(t))}}else if(t&&45===s){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;{this.index+=3;const t=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(t))}}else{if(60!==s||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;{this.index+=4;const t=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(t))}}}return e}isFutureReservedWord(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}}isStrictModeReservedWord(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}isRestrictedWord(e){return"eval"===e||"arguments"===e}isKeyword(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){const s=this.source.charCodeAt(e+1);s>=56320&&s<=57343&&(t=1024*(t-55296)+s-56320+65536)}return t}scanHexEscape(e){const t="u"===e?4:2;let s=0;for(let i=0;i<t;++i){if(this.eof()||!ks.isHexDigit(this.source.charCodeAt(this.index)))return null;s=16*s+Mn(this.source[this.index++])}return String.fromCharCode(s)}tryToScanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;if("}"===e)return null;for(;!this.eof()&&(e=this.source[this.index++],ks.isHexDigit(e.charCodeAt(0)));)t=16*t+Mn(e);return t>1114111||"}"!==e?null:ks.fromCodePoint(t)}scanUnicodeCodePointEscape(){const e=this.tryToScanUnicodeCodePointEscape();return null===e?this.throwUnexpectedToken():e}getIdentifier(){const e=this.index++;for(;!this.eof();){const t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!ks.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)}getComplexIdentifier(){let e,t=this.codePointAt(this.index),s=ks.fromCodePoint(t);for(this.index+=s.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&ks.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken()),s=e);!this.eof()&&(t=this.codePointAt(this.index),ks.isIdentifierPart(t));)e=ks.fromCodePoint(t),s+=e,this.index+=e.length,92===t&&(s=s.substr(0,s.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&ks.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken()),s+=e);return s}octalToDecimal(e){let t="0"!==e,s=_n(e);return!this.eof()&&ks.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,s=8*s+_n(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&ks.isOctalDigit(this.source.charCodeAt(this.index))&&(s=8*s+_n(this.source[this.index++]))),{code:s,octal:t}}scanIdentifier(){let e;const t=this.index,s=92===this.source.charCodeAt(t),i=s?this.getComplexIdentifier():this.getIdentifier();if(e=1===i.length?3:this.isKeyword(i)?4:"null"===i?5:"true"===i||"false"===i?1:3,3!==e&&t+i.length!==this.index){const e=this.index;this.index=t,this.tolerateUnexpectedToken(fn),this.index=e}return{type:e,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index,escaped:s}}scanPunctuator(){const e=this.index;let t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case"?":++this.index,"?"===this.source[this.index]&&(++this.index,"="===this.source[this.index]?(++this.index,t="??="):t="??"),"."!==this.source[this.index]||/^\d$/.test(this.source[this.index+1])||(++this.index,t="?.");break;case"#":case")":case";":case",":case"[":case"]":case":":case"~":case"@":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t||"&&="===t||"||="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let t=this.scanLiteralPart(ks.isHexDigitChar);return 0===t.length&&this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0x"+t),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(ks.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanBinaryLiteral(e){let t,s=this.scanLiteralPart(e=>"0"===e||"1"===e);return 0===s.length&&this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0b"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(this.eof()||(t=this.source.charCodeAt(this.index),(ks.isIdentifierStart(t)||ks.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(s,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanOctalLiteral(e,t){let s="",i=!1;return ks.isOctalDigit(e.charCodeAt(0))?(i=!0,s="0"+this.source[this.index++]):++this.index,s+=this.scanLiteralPart(ks.isOctalDigitChar),i||0!==s.length||this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0o"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}):((ks.isIdentifierStart(this.source.charCodeAt(this.index))||ks.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(s,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index})}isImplicitOctalLiteral(){for(let e=this.index+1;e<this.length;++e){const t=this.source[e];if("8"===t||"9"===t||"n"===t)return!1;if(!ks.isOctalDigit(t.charCodeAt(0)))return!0}return!0}scanLiteralPart(e){let t="";for("_"===this.source[this.index]&&this.throwUnexpectedToken(wn);this.source[this.index]&&(e(this.source[this.index])||"_"===this.source[this.index]);)"_"!==this.source[this.index]&&(t+=this.source[this.index]),this.index++,"_"===this.source[this.index-1]&&"_"===this.source[this.index]&&this.throwUnexpectedToken("Numeric separator must be exactly one underscore");return"_"===this.source[this.index-1]&&this.throwUnexpectedToken(wn),t}scanNumericLiteral(){const e=this.index;let t=this.source[e];ln(ks.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");let s="";if("."!==t){if(s=this.source[this.index++],t=this.source[this.index],"0"===s){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&ks.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}this.index--,s=this.scanLiteralPart(ks.isDecimalDigitChar),t=this.source[this.index]}if("."===t&&(s+=this.source[this.index++],s+=this.scanLiteralPart(ks.isDecimalDigitChar),t=this.source[this.index]),"e"===t||"E"===t)s+=this.source[this.index++],t=this.source[this.index],"+"!==t&&"-"!==t||(s+=this.source[this.index++]),ks.isDecimalDigit(this.source.charCodeAt(this.index))?s+=this.scanLiteralPart(ks.isDecimalDigitChar):this.throwUnexpectedToken();else if("n"===t)return s.length>1&&"0"===s[0]&&this.throwUnexpectedToken(),this.index++,{type:6,value:BigInt(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index};return ks.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){const e=this.index;let t=this.source[e];ln("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;let s=!1,i="";for(;!this.eof();){let e=this.source[this.index++];if(e===t){t="";break}if("\\"===e)if(e=this.source[this.index++],e&&ks.isLineTerminator(e.charCodeAt(0)))++this.lineNumber,"\r"===e&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(e){case"u":if("{"===this.source[this.index])++this.index,i+=this.scanUnicodeCodePointEscape();else{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(),i+=t}break;case"x":const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(xn),i+=t;break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;case"8":case"9":i+=e,this.tolerateUnexpectedToken();break;default:if(e&&ks.isOctalDigit(e.charCodeAt(0))){const t=this.octalToDecimal(e);s=t.octal||s,i+=String.fromCharCode(t.code)}else i+=e}else{if(ks.isLineTerminator(e.charCodeAt(0)))break;i+=e}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:i,octal:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1;const s=this.index,i="`"===this.source[s];let n=!1,r=null,a=2;for(++this.index;!this.eof();){let s=this.source[this.index++];if("`"===s){a=1,n=!0,t=!0;break}if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else{if(null!==r)continue;if("\\"===s)if(s=this.source[this.index++],ks.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;const t=this.tryToScanUnicodeCodePointEscape();null===t?r="u":e+=t}else{const t=this.scanHexEscape(s);null===t?r="u":e+=t}break;case"x":const t=this.scanHexEscape(s);null===t?r="x":e+=t;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?ks.isDecimalDigit(this.source.charCodeAt(this.index))?r="0":e+="\0":ks.isDecimalDigitChar(s)?r=s:e+=s}else ks.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s}}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(s+1,this.index-a),cooked:null===r?e:null,head:i,tail:n,notEscapeSequenceHead:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:s,end:this.index}}testRegExp(e,t){let s=e;t.indexOf("u")>=0&&(s=s.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(e,t,s)=>{const i=parseInt(t||s,16);return i>1114111&&this.throwUnexpectedToken(yn),i<=65535?String.fromCharCode(i):""}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(s)}catch(i){this.throwUnexpectedToken(yn)}try{return new RegExp(e,t)}catch(n){return null}}scanRegExpBody(){let e=this.source[this.index];ln("/"===e,"Regular expression literal must start with a slash");let t=this.source[this.index++],s=!1,i=!1;for(;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],ks.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(On),t+=e;else if(ks.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(On);else if(s)"]"===e&&(s=!1);else{if("/"===e){i=!0;break}"["===e&&(s=!0)}return i||this.throwUnexpectedToken(On),t.substr(1,t.length-2)}scanRegExpFlags(){let e="",t="";for(;!this.eof();){let s=this.source[this.index];if(!ks.isIdentifierPart(s.charCodeAt(0)))break;if(++this.index,"\\"!==s||this.eof())t+=s,e+=s;else if(s=this.source[this.index],"u"===s){++this.index;let s=this.index;const i=this.scanHexEscape("u");if(null!==i)for(t+=i,e+="\\u";s<this.index;++s)e+=this.source[s];else this.index=s,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return t}scanRegExp(){const e=this.index,t=this.scanRegExpBody(),s=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:s,regex:this.testRegExp(t,s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}lex(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};const e=this.source.charCodeAt(this.index);return ks.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?ks.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():ks.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&ks.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}},Un={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},Ln="ArrowParameterPlaceHolder",zn=class{constructor(e,t={},s){this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=s,this.errorHandler=new pn,this.errorHandler.tolerant=1==this.config.tolerant,this.scanner=new Rn(e,this.errorHandler),this.scanner.trackComment=1==this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,isAsync:!1,allowIn:!0,allowStrictDirective:!0,allowSuper:!1,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inConstructor:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,inClassConstructor:!1,labelSet:{},strict:!1,decorators:null},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwError(e,...t){const s=t.slice(),i=e.replace(/%(\d)/g,(e,t)=>(ln(t<s.length,"Message reference must be in range"),s[t])),n=this.lastMarker.index,r=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(n,r,a,i)}tolerateError(e,...t){const s=t.slice(),i=e.replace(/%(\d)/g,(e,t)=>(ln(t<s.length,"Message reference must be in range"),s[t])),n=this.lastMarker.index,r=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(n,r,a,i)}unexpectedTokenError(e,t){let s,i=t||In;if(e?(t||(i=2===e.type?"Unexpected end of input":3===e.type?"Unexpected identifier":6===e.type?"Unexpected number":8===e.type?"Unexpected string":10===e.type?"Unexpected quasi %0":In,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i="Unexpected reserved word":this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=Bn))),s=e.value):s="ILLEGAL",i=i.replace("%0",s),e&&"number"==typeof e.lineNumber){const t=e.start,s=e.lineNumber,n=this.lastMarker.index-this.lastMarker.column,r=e.start-n+1;return this.errorHandler.createError(t,s,r,i)}{const e=this.lastMarker.index,t=this.lastMarker.line,s=this.lastMarker.column+1;return this.errorHandler.createError(e,t,s,i)}}throwUnexpectedToken(e,t){throw this.unexpectedTokenError(e,t)}tolerateUnexpectedToken(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))}tolerateInvalidLoopStatement(){(this.matchKeyword("class")||this.matchKeyword("function"))&&this.tolerateError(In,this.lookahead)}collectComments(){if(this.config.comment){const e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(let t=0;t<e.length;++t){const s=e[t],i={type:s.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(s.slice[0],s.slice[1])};this.config.range&&(i.range=s.range),this.config.loc&&(i.loc=s.loc);const n={start:{line:s.loc.start.line,column:s.loc.start.column,offset:s.range[0]},end:{line:s.loc.end.line,column:s.loc.end.column,offset:s.range[1]}};this.delegate(i,n)}}else this.scanner.scanComments()}getTokenRaw(e){return this.scanner.source.slice(e.start,e.end)}convertToken(e){const t={type:Un[e.type],value:this.getTokenRaw(e)};return this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type&&(t.regex={pattern:e.pattern,flags:e.flags}),t}nextToken(){const e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);const t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e}nextRegexToken(){this.collectComments();const e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e}createNode(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}startNode(e,t=0){let s=e.start-e.lineStart,i=e.lineNumber;return s<0&&(s+=t,i--),{index:e.start,line:i,column:s}}finalize(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){const s={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,s)}return t}expect(e){const t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)}expectCommaSeparator(){if(this.config.tolerant){const e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,In)}else this.expect(",")}expectKeyword(e){const t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)}match(e){return 7===this.lookahead.type&&this.lookahead.value===e}matchKeyword(e){return 4===this.lookahead.type&&this.lookahead.value===e}matchContextualKeyword(e){return 3===this.lookahead.type&&this.lookahead.value===e}matchAssign(){if(7!==this.lookahead.type)return!1;const e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e||"&&="===e||"||="===e||"??="===e}isolateCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const n=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=s,this.context.firstCoverInitializedNameError=i,n}inheritCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const n=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&s,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,n}consumeSemicolon(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)}parsePrimaryExpression(){const e=this.createNode();let t,s,i;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.isAsync)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new yi(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,bn),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t="bigint"==typeof s.value?this.finalize(e,new Gs(s.value,i,s.value.toString())):this.finalize(e,new Bi(s.value,i));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t=this.finalize(e,new Bi("true"===s.value,i));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t=this.finalize(e,new Bi(null,i));break;case 10:t=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,s=this.nextRegexToken(),i=this.getTokenRaw(s),t=this.finalize(e,new Ji(s.regex,i,s.pattern,s.flags));break;case"#":this.nextToken(),t=this.finalize(e,new Ui(this.nextToken().value));break;case"@":let n=this.parseDecorators();this.context.decorators=n,this.parsePrimaryExpression(),this.context.decorators=null,t=this.finalize(e,new Ui(this.nextToken().value));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new yi(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new en)):this.matchKeyword("class")?t=this.parseClassExpression():this.matchKeyword("new")?t=this.parseNewExpression():this.matchImportCall()?t=this.parseImportCall():this.matchImportMeta()?(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,"Cannot use 'import.meta' outside a module"),t=this.parseImportMeta()):t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t}parseSpreadElement(){const e=this.createNode();this.expect("...");const t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new ji(t))}parseArrayInitializer(){const e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){const e=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(e)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new zs(t))}parsePropertyMethod(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;const i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=s,i}parsePropertyMethodFunction(e){const t=this.createNode(),s=this.context.allowYield;this.context.allowYield=!0;const i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=s,this.finalize(t,new gi(null,i.params,n,e,!1))}parsePropertyMethodAsyncFunction(e){const t=this.createNode(),s=this.context.allowYield,i=this.context.isAsync;this.context.allowYield=!1,this.context.isAsync=!0;const n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=s,this.context.isAsync=i,this.finalize(t,new gi(null,n.params,r,e,!0))}parseObjectPropertyKey(e=!1){const t=this.createNode(),s=this.nextToken();let i;switch(s.type){case 8:case 6:this.context.strict&&s.octal&&this.tolerateUnexpectedToken(s,bn);const n=this.getTokenRaw(s);i="bigint"==typeof s.value?this.finalize(t,new Gs(s.value,n,s.value.toString())):this.finalize(t,new Bi(s.value,n));break;case 3:case 1:case 5:case 4:i=this.finalize(t,e?new Ui(s.value):new yi(s.value));break;case 7:"["===s.value?(i=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):i=this.throwUnexpectedToken(s);break;default:i=this.throwUnexpectedToken(s)}return i}isPropertyKey(e,t){return e.type===ze.Identifier&&e.name===t||e.type===ze.Literal&&e.value===t}parseObjectProperty(e){const t=this.createNode(),s=this.lookahead;let i,n=null,r=null,a=!1,o=!1,u=!1,c=!1,h=!1;if(3===s.type){const e=s.value;this.nextToken(),a=this.match("["),c=!(this.hasLineTerminator||"async"!==e||this.match(":")||this.match("(")||this.match(",")),h=this.match("*"),h&&this.nextToken(),n=c?this.parseObjectPropertyKey():this.finalize(t,new yi(e))}else this.match("*")?this.nextToken():(a=this.match("["),n=this.parseObjectPropertyKey());const l=this.qualifiedPropertyName(this.lookahead);if(3===s.type&&!c&&"get"===s.value&&l)i="get",a=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(3===s.type&&!c&&"set"===s.value&&l)i="set",a=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(7===s.type&&"*"===s.value&&l)i="init",a=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(!1),o=!0;else if(n||this.throwUnexpectedToken(this.lookahead),i="init",this.match(":")&&!c)!a&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError("Duplicate __proto__ fields are not allowed in object literals"),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=c?this.parsePropertyMethodAsyncFunction(h):this.parsePropertyMethodFunction(h),o=!0;else if(3===s.type){const e=this.finalize(t,new yi(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;const s=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(t,new $s(e,s))}else u=!0,r=e}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new Li(i,n,a,r,o,u))}parseObjectInitializer(){const e=this.createNode();this.expect("{");const t=[],s={value:!1};for(;!this.match("}");){const e=this.match("...")?this.parseSpreadElement():this.parseObjectProperty(s);t.push(e),this.match("}")||e.method&&!this.match(",")||this.expectCommaSeparator()}return this.expect("}"),this.finalize(e,new _i(t))}throwTemplateLiteralEarlyErrors(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,"Invalid Unicode escape sequence");case"x":return this.throwUnexpectedToken(e,xn);case"8":case"9":return this.throwUnexpectedToken(e,"\\8 and \\9 are not allowed in template strings.");default:return this.throwUnexpectedToken(e,"Octal literals are not allowed in template strings.")}}parseTemplateHead(e){ln(this.lookahead.head,"Template literal must start with a template head");const t=this.createNode(),s=this.nextToken();e.isTagged||null===s.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(s);const i=s.value,n=s.cooked;return this.finalize(t,new Qi({raw:i,cooked:n},s.tail))}parseTemplateElement(e){10!==this.lookahead.type&&this.throwUnexpectedToken();const t=this.createNode(),s=this.nextToken();e.isTagged||null===s.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(s);const i=s.value,n=s.cooked;return this.finalize(t,new Qi({raw:i,cooked:n},s.tail))}parseTemplateLiteral(e){const t=this.createNode(),s=[],i=[];let n=this.parseTemplateHead(e);for(i.push(n);!n.tail;)s.push(this.parseExpression()),n=this.parseTemplateElement(e),i.push(n);return this.finalize(t,new Zi(i,s))}reinterpretExpressionAsPattern(e){switch(e.type){case ze.Identifier:case ze.MemberExpression:case ze.RestElement:case ze.AssignmentPattern:break;case ze.SpreadElement:e.type=ze.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case ze.ArrayExpression:e.type=ze.ArrayPattern;for(let t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case ze.ObjectExpression:e.type=ze.ObjectPattern;for(let t=0;t<e.properties.length;t++){const s=e.properties[t];this.reinterpretExpressionAsPattern(s.type===ze.SpreadElement?s:s.value)}break;case ze.AssignmentExpression:e.type=ze.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}}parseGroupExpression(){let e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:Ln,params:[],async:!1};else{const t=this.lookahead,s=[];if(this.match("..."))e=this.parseRestElement(s),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:Ln,params:[e],async:!1};else{let i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){const n=[];for(this.context.isAssignmentTarget=!1,n.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(let e=0;e<n.length;e++)this.reinterpretExpressionAsPattern(n[e]);i=!0,e={type:Ln,params:n,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),n.push(this.parseRestElement(s)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(let e=0;e<n.length;e++)this.reinterpretExpressionAsPattern(n[e]);i=!0,e={type:Ln,params:n,async:!1}}else n.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new Yi(n)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===ze.Identifier&&"yield"===e.name&&(i=!0,e={type:Ln,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===ze.SequenceExpression)for(let t=0;t<e.expressions.length;t++)this.reinterpretExpressionAsPattern(e.expressions[t]);else this.reinterpretExpressionAsPattern(e);e={type:Ln,params:e.type===ze.SequenceExpression?e.expressions:[e],async:!1}}this.context.isBindingElement=!1}}}return e}parseArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e}isIdentifierName(e){return 3===e.type||4===e.type||1===e.type||5===e.type}parseIdentifierName(e=!1){let t=!1,s=this.createNode(),i=this.nextToken();return"#"===i.value&&e&&(i=this.nextToken(),t=!0),this.isIdentifierName(i)||this.throwUnexpectedToken(i),this.finalize(s,t?new Ui(i.value):new yi(i.value))}parseNewExpression(){const e=this.createNode(),t=this.parseIdentifierName();let s;return ln("new"===t.name,"New expression must start with `new`"),this.match(".")?(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value?s=new Ni(t,this.parseIdentifierName()):this.throwUnexpectedToken(this.lookahead)):this.matchKeyword("import")?this.throwUnexpectedToken(this.lookahead):(s=new Mi(this.isolateCoverGrammar(this.parseLeftHandSideExpression),this.match("(")?this.parseArguments():[]),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),this.finalize(e,s)}parseAsyncArgument(){const e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e}parseAsyncArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e}matchImportCall(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=7===s.type&&"("===s.value}return e}parseImportCall(){const e=this.createNode();this.expectKeyword("import"),this.expect("(");const t=this.parseAssignmentExpression();let s=null;return this.match(",")&&(this.nextToken(),s=this.parseObjectInitializer()),!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new Fi(t,s))}matchImportMeta(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();if(7===s.type&&"."===s.value){this.scanner.scanComments();const t=this.scanner.lex();e=3===t.type&&"meta"===t.value,e&&t.end-t.start!==4&&this.tolerateUnexpectedToken(t,fn)}else e=!1;this.scanner.restoreState(t)}return e}parseImportMeta(){const e=this.createNode(),t=this.parseIdentifierName();this.expect(".");const s=this.parseIdentifierName();return this.context.isAssignmentTarget=!1,this.finalize(e,new Ni(t,s))}parseLeftHandSideExpressionAllowCall(){const e=this.lookahead,t=this.matchContextualKeyword("async"),s=this.context.allowIn;let i;this.context.allowIn=!0;const n=this.matchKeyword("super");n&&this.context.inFunctionBody?(i=this.createNode(),this.nextToken(),i=this.finalize(i,new Vi),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):i=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),!n||!this.match("(")||this.context.inClassConstructor&&this.context.allowSuper||this.tolerateError("'super' keyword unexpected here");let r=!1;for(;;){let s=!1;if(this.match("?.")&&(s=!0,r=!0,this.expect("?.")),this.match("(")){const n=t&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;const r=n?this.parseAsyncArguments():this.parseArguments();if(i.type===ze.ImportExpression&&1!==r.length&&this.tolerateError("Unexpected token"),i=this.finalize(this.startNode(e),new qs(i,r,s)),n&&this.match("=>")){for(let e=0;e<r.length;++e)this.reinterpretExpressionAsPattern(r[e]);i={type:Ln,params:r,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!s,this.expect("[");const t=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),i=this.finalize(this.startNode(e),new Ii(!0,i,t,s))}else if(10===this.lookahead.type&&this.lookahead.head){s&&this.throwUnexpectedToken(this.lookahead),r&&this.throwError(Cn);const t=this.parseTemplateLiteral({isTagged:!0});i=this.finalize(this.startNode(e),new qi(i,t))}else{if(!this.match(".")&&!s)break;{this.context.isBindingElement=!1,this.context.isAssignmentTarget=!s,s||this.expect(".");const t=this.parseIdentifierName(!0);i=this.finalize(this.startNode(e),new Ii(!1,i,t,s))}}}return this.context.allowIn=s,r?new Zs(i):i}parseSuper(){const e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new Vi)}parseLeftHandSideExpression(){ln(this.context.allowIn,"callee of new expression always allow in keyword.");const e=this.startNode(this.lookahead);let t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),s=!1;for(;;){let i=!1;if(this.match("?.")&&(i=!0,s=!0,this.expect("?.")),this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!i,this.expect("[");const s=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new Ii(!0,t,s,i))}else if(10===this.lookahead.type&&this.lookahead.head){i&&this.throwUnexpectedToken(this.lookahead),s&&this.throwError(Cn);const n=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new qi(t,n))}else{if(!this.match(".")&&!i)break;{this.context.isBindingElement=!1,this.context.isAssignmentTarget=!i,i||this.expect(".");const s=this.parseIdentifierName();t=this.finalize(e,new Ii(!1,t,s,i))}}}return s?new Zs(t):t}parseUpdateExpression(){let e;const t=this.lookahead;if(this.match("++")||this.match("--")){const s=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===ze.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError("Prefix increment/decrement may not have eval or arguments operand in strict mode"),this.context.isAssignmentTarget||this.tolerateError(En),e=this.finalize(s,new rn(i.value,e,!0)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===ze.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError("Postfix increment/decrement may not have eval or arguments operand in strict mode"),this.context.isAssignmentTarget||this.tolerateError(En),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const s=this.nextToken().value;e=this.finalize(this.startNode(t),new rn(s,e,!1))}return e}parseAwaitExpression(){const e=this.createNode();this.nextToken();const t=this.parseUnaryExpression();return this.finalize(e,new js(t))}parseUnaryExpression(){let e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){const t=this.startNode(this.lookahead),s=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new nn(s.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===ze.Identifier&&this.tolerateError("Delete of an unqualified identifier in strict mode."),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=(this.context.isModule&&!this.context.inFunctionBody||this.context.isAsync)&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e}parseExponentiationExpression(){const e=this.lookahead,t=this.match("(");let s=this.inheritCoverGrammar(this.parseUnaryExpression);if((s.type!==ze.UnaryExpression||t)&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=s,i=this.isolateCoverGrammar(this.parseExponentiationExpression);s=this.finalize(this.startNode(e),new Vs("**",t,i))}return s}binaryPrecedence(e){const t=e.value;let s;return s=7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?12:0,s}parseBinaryExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseExponentiationExpression),s=!0,i=!0;const n=e=>{"&&"!==e.value&&"||"!==e.value||(i=!1),"??"===e.value&&(s=!1)},r=this.lookahead;let a=this.binaryPrecedence(r);if(a>0){n(r),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const o=[e,this.lookahead];let u=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression);const h=[u,r.value,c],l=[a];for(;a=this.binaryPrecedence(this.lookahead),!(a<=0);){for((s||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(i||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),n(this.lookahead);h.length>2&&a<=l[l.length-1];){c=h.pop();const e=h.pop();l.pop(),u=h.pop(),o.pop();const t=o[o.length-1],s=this.startNode(t,t.lineStart),i="||"===e||"&&"===e||"??"===e;h.push(this.finalize(s,i?new Ti(e,u,c):new Vs(e,u,c)))}h.push(this.nextToken().value),l.push(a),o.push(this.lookahead),h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}let p=h.length-1;t=h[p];let d=o.pop();for(;p>1;){const e=o.pop(),s=d&&d.lineStart,i=this.startNode(e,s),n=h[p-1],r="||"===n||"&&"===n||"??"===n;t=this.finalize(i,r?new Ti(n,h[p-2],t):new Vs(n,h[p-2],t)),p-=2,d=e}}return t}parseConditionalExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();const s=this.context.allowIn;this.context.allowIn=!0;const i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=s,this.expect(":");const n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new ii(t,i,n)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t}checkPatternParam(e,t){switch(t.type){case ze.Identifier:this.validateParam(e,t,t.name);break;case ze.RestElement:this.checkPatternParam(e,t.argument);break;case ze.AssignmentPattern:this.checkPatternParam(e,t.left);break;case ze.ArrayPattern:for(let s=0;s<t.elements.length;s++)null!==t.elements[s]&&this.checkPatternParam(e,t.elements[s]);break;case ze.ObjectPattern:for(let s=0;s<t.properties.length;s++){const i=t.properties[s];this.checkPatternParam(e,i.type===ze.RestElement?i:i.value)}}e.simple=e.simple&&t instanceof yi}reinterpretAsCoverFormalsList(e){let t=[e];const s={simple:!0,paramSet:{}};let i=!1;switch(e.type){case ze.Identifier:break;case Ln:t=e.params,i=e.async;break;default:return null}for(let n=0;n<t.length;++n){const e=t[n];e.type===ze.AssignmentPattern?e.right.type===ze.YieldExpression&&(e.right.argument&&this.throwUnexpectedToken(this.lookahead),e.right.type=ze.Identifier,e.right.name="yield",delete e.right.argument,delete e.right.delegate):i&&e.type===ze.Identifier&&"await"===e.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(s,e),t[n]=e}if(this.context.strict||!this.context.allowYield)for(let n=0;n<t.length;++n)t[n].type===ze.YieldExpression&&this.throwUnexpectedToken(this.lookahead);if(s.hasDuplicateParameterNames){const e=this.context.strict?s.stricted:s.firstRestricted;this.throwUnexpectedToken(e,dn)}return{simple:s.simple,params:t,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}parseAssignmentExpression(){let e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{const t=this.lookahead;let s=t;if(e=this.parseConditionalExpression(),3===s.type&&s.lineNumber===this.lookahead.lineNumber&&"async"===s.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){const t=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(t),e={type:Ln,params:[t],async:!0}}if(e.type===Ln||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const s=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;const n=this.context.strict,r=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;const a=this.context.allowYield,o=this.context.isAsync;this.context.allowYield=!0,this.context.isAsync=s;const u=this.startNode(t);let c;if(this.expect("=>"),this.match("{")){const e=this.context.allowIn;this.context.allowIn=!0,c=this.parseFunctionSourceElements(),this.context.allowIn=e}else c=this.isolateCoverGrammar(this.parseAssignmentExpression);const h=c.type!==ze.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=this.finalize(u,new Ks(i.params,c,h,s)),this.context.strict=n,this.context.allowStrictDirective=r,this.context.allowYield=a,this.context.isAsync=o}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(En),this.context.strict&&e.type===ze.Identifier){const t=e;this.scanner.isRestrictedWord(t.name)&&this.tolerateUnexpectedToken(s,"Assignment to eval or arguments is not allowed in strict mode"),this.scanner.isStrictModeReservedWord(t.name)&&this.tolerateUnexpectedToken(s,Bn)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),s=this.nextToken();const i=s.value,n=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new Xs(i,e,n)),this.context.firstCoverInitializedNameError=null}}return e}parseExpression(){const e=this.lookahead;let t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){const s=[];for(s.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),s.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new Yi(s))}return t}parseStatementListItem(){let e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,mn),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():this.matchImportMeta()?e=this.parseStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Dn),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e}parseBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new Hs(t))}parseLexicalBinding(e,t){const s=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===ze.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(Tn);let n=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError("Missing initializer in %0 declaration","const")):(!t.inFor&&i.type!==ze.Identifier||this.match("="))&&(this.expect("="),n=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(s,new on(i,n))}parseBindingList(e,t){const s=[this.parseLexicalBinding(e,t)];for(;this.match(",");)this.nextToken(),s.push(this.parseLexicalBinding(e,t));return s}isLexicalDeclaration(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value}parseLexicalDeclaration(e){const t=this.createNode(),s=this.nextToken().value;ln("let"===s||"const"===s,"Lexical declaration must be either let or const");const i=this.parseBindingList(s,e);return this.consumeSemicolon(),this.finalize(t,new an(i,s))}isInitializedProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),3===this.lookahead.type&&"="===t.value}isDeclaredProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),3===this.lookahead.type&&";"===t.value||3===this.lookahead.type&&t.lineNumber!==this.startMarker.line}parseBindingRestElement(e,t){const s=this.createNode();this.expect("...");const i=this.parsePattern(e,t);return this.finalize(s,new Ki(i))}parseArrayPattern(e,t){const s=this.createNode();this.expect("[");const i=[];for(;!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(s,new Js(i))}parsePropertyPattern(e,t){const s=this.createNode();let i,n,r=!1,a=!1;if(3===this.lookahead.type){const r=this.lookahead;i=this.parseVariableIdentifier();const o=this.finalize(s,new yi(r.value));if(this.match("=")){e.push(r),a=!0,this.nextToken();const t=this.parseAssignmentExpression();n=this.finalize(this.startNode(r),new $s(o,t))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(r),a=!0,n=o)}else r=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(s,new Li("init",i,r,n,!1,a))}parseRestProperty(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError("Unexpected token ="),this.match("}")||this.throwError("Unexpected token"),this.finalize(t,new Ki(s))}parseObjectPattern(e,t){const s=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.match("...")?this.parseRestProperty(e):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(s,new Ri(i))}parsePattern(e,t){let s;return this.match("[")?s=this.parseArrayPattern(e,t):this.match("{")?s=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,"let is disallowed as a lexically bound name"),e.push(this.lookahead),s=this.parseVariableIdentifier(t)),s}parsePatternWithDefault(e,t){const s=this.lookahead;let i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();const e=this.context.allowYield;this.context.allowYield=!0;const t=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=e,i=this.finalize(this.startNode(s),new $s(i,t))}return i}parseVariableIdentifier(e){const t=this.createNode(),s=this.nextToken();return 4===s.type&&"yield"===s.value?this.context.strict?this.tolerateUnexpectedToken(s,Bn):this.context.allowYield||this.throwUnexpectedToken(s):3!==s.type?this.context.strict&&4===s.type&&this.scanner.isStrictModeReservedWord(s.value)?this.tolerateUnexpectedToken(s,Bn):(this.context.strict||"let"!==s.value||"var"!==e)&&this.throwUnexpectedToken(s):(this.context.isModule||this.context.isAsync)&&3===s.type&&"await"===s.value&&this.tolerateUnexpectedToken(s),this.finalize(t,new yi(s.value))}parseVariableDeclaration(e){const t=this.createNode(),s=this.parsePattern([],"var");this.context.strict&&s.type===ze.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(Tn);let i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):s.type===ze.Identifier||e.inFor||this.expect("="),this.finalize(t,new on(s,i))}parseVariableDeclarationList(e){const t={inFor:e.inFor},s=[];for(s.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),s.push(this.parseVariableDeclaration(t));return s}parseVariableStatement(){const e=this.createNode();this.expectKeyword("var");const t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new an(t,"var"))}parseEmptyStatement(){const e=this.createNode();return this.expect(";"),this.finalize(e,new ci)}parseExpressionStatement(){const e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new mi(t))}parseIfClause(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Sn),this.parseStatement()}parseIfStatement(){const e=this.createNode();let t,s=null;this.expectKeyword("if"),this.expect("(");const i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ci)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),s=this.parseIfClause())),this.finalize(e,new Ci(i,t,s))}parseDoWhileStatement(){const e=this.createNode();this.expectKeyword("do"),this.tolerateInvalidLoopStatement();const t=this.context.inIteration;this.context.inIteration=!0;const s=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");const i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new ui(s,i))}parseWhileStatement(){const e=this.createNode();let t;this.expectKeyword("while"),this.expect("(");const s=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ci);else{this.expect(")");const e=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=e}return this.finalize(e,new un(s,t))}parseForStatement(){let e,t,s=null,i=null,n=null,r=!0,a=!1;const o=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.isAsync||this.tolerateUnexpectedToken(this.lookahead),a=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){s=this.createNode(),this.nextToken();const i=this.context.allowIn;this.context.allowIn=!1;const n=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=i,!a&&1===n.length&&this.matchKeyword("in")){const i=n[0];i.init&&(i.id.type===ze.ArrayPattern||i.id.type===ze.ObjectPattern||this.context.strict)&&this.tolerateError("%0 loop variable declaration may not have an initializer","for-in"),s=this.finalize(s,new an(n,"var")),this.nextToken(),e=s,t=this.parseExpression(),s=null}else 1===n.length&&null===n[0].init&&this.matchContextualKeyword("of")?(s=this.finalize(s,new an(n,"var")),this.nextToken(),e=s,t=this.parseAssignmentExpression(),s=null,r=!1):(s=this.finalize(s,new an(n,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){s=this.createNode();const i=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){const n=this.context.allowIn;this.context.allowIn=!1;const a=this.parseBindingList(i,{inFor:!0});this.context.allowIn=n,1===a.length&&null===a[0].init&&this.matchKeyword("in")?(s=this.finalize(s,new an(a,i)),this.nextToken(),e=s,t=this.parseExpression(),s=null):1===a.length&&null===a[0].init&&this.matchContextualKeyword("of")?(s=this.finalize(s,new an(a,i)),this.nextToken(),e=s,t=this.parseAssignmentExpression(),s=null,r=!1):(this.consumeSemicolon(),s=this.finalize(s,new an(a,i)))}else s=this.finalize(s,new yi(i)),this.nextToken(),e=s,t=this.parseExpression(),s=null}else{const i=this.lookahead,n=this.context.isBindingElement,a=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError,u=this.context.allowIn;if(this.context.allowIn=!1,s=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=u,this.matchKeyword("in"))this.context.isAssignmentTarget&&s.type!==ze.AssignmentExpression||this.tolerateError("Invalid left-hand side in for-in"),this.nextToken(),this.reinterpretExpressionAsPattern(s),e=s,t=this.parseExpression(),s=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&s.type!==ze.AssignmentExpression||this.tolerateError("Invalid left-hand side in for-loop"),this.nextToken(),this.reinterpretExpressionAsPattern(s),e=s,t=this.parseAssignmentExpression(),s=null,r=!1;else{if(this.context.isBindingElement=n,this.context.isAssignmentTarget=a,this.context.firstCoverInitializedNameError=o,this.match(",")){const e=[s];for(;this.match(",");)this.nextToken(),e.push(this.isolateCoverGrammar(this.parseAssignmentExpression));s=this.finalize(this.startNode(i),new Yi(e))}this.expect(";")}}let u;if(void 0===e&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(n=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new ci);else{this.expect(")"),this.tolerateInvalidLoopStatement();const e=this.context.inIteration;this.context.inIteration=!0,u=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=e}return void 0===e?this.finalize(o,new xi(s,i,n,u)):r?this.finalize(o,new Di(e,t,u)):this.finalize(o,new fi(e,t,u,a))}parseContinueStatement(){const e=this.createNode();this.expectKeyword("continue");let t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){const e=this.parseVariableIdentifier();t=e;const s="$"+e.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)||this.throwError(Pn,e.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError("Illegal continue statement"),this.finalize(e,new ni(t))}parseBreakStatement(){const e=this.createNode();this.expectKeyword("break");let t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){const e=this.parseVariableIdentifier(),s="$"+e.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)||this.throwError(Pn,e.name),t=e}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError("Illegal break statement"),this.finalize(e,new Ws(t))}parseReturnStatement(){this.context.inFunctionBody||this.tolerateError("Illegal return statement");const e=this.createNode();this.expectKeyword("return");const t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new Xi(t))}parseWithStatement(){this.context.strict&&this.tolerateError("Strict mode code may not include a with statement");const e=this.createNode();let t;this.expectKeyword("with"),this.expect("(");const s=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ci)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new cn(s,t))}parseSwitchCase(){const e=this.createNode();let t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");const s=[];for(;!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)s.push(this.parseStatementListItem());return this.finalize(e,new Hi(t,s))}parseSwitchStatement(){const e=this.createNode();this.expectKeyword("switch"),this.expect("(");const t=this.parseExpression();this.expect(")");const s=this.context.inSwitch;this.context.inSwitch=!0;const i=[];let n=!1;for(this.expect("{");!this.match("}");){const e=this.parseSwitchCase();null===e.test&&(n&&this.throwError("More than one default clause in switch statement"),n=!0),i.push(e)}return this.expect("}"),this.context.inSwitch=s,this.finalize(e,new Wi(t,i))}parseLabelledStatement(){const e=this.createNode(),t=this.parseExpression();let s;if(t.type===ze.Identifier&&this.match(":")){this.nextToken();const e=t,i="$"+e.name;let n;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError("%0 '%1' has already been declared","Label",e.name),this.context.labelSet[i]=!0,this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),n=this.parseClassDeclaration();else if(this.matchKeyword("function")){const e=this.lookahead,t=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(e,Sn):t.generator&&this.tolerateUnexpectedToken(e,"Generator declarations are not allowed in legacy contexts"),n=t}else n=this.parseStatement();delete this.context.labelSet[i],s=new vi(e,n)}else this.consumeSemicolon(),s=new mi(t);return this.finalize(e,s)}parseThrowStatement(){const e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError("Illegal newline after throw");const t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new tn(t))}parseCatchClause(){const e=this.createNode();this.expectKeyword("catch");let t=null;if(this.match("(")){this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);const e=[];t=this.parsePattern(e);const s={};for(let t=0;t<e.length;t++){const i="$"+e[t].value;Object.prototype.hasOwnProperty.call(s,i)&&this.tolerateError("Duplicate binding %0",e[t].value),s[i]=!0}this.context.strict&&t.type===ze.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError("Catch variable may not be eval or arguments in strict mode"),this.expect(")")}const s=this.parseBlock();return this.finalize(e,new Qs(t,s))}parseFinallyClause(){return this.expectKeyword("finally"),this.parseBlock()}parseTryStatement(){const e=this.createNode();this.expectKeyword("try");const t=this.parseBlock(),s=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return s||i||this.throwError("Missing catch or finally after try"),this.finalize(e,new sn(t,s,i))}parseDebuggerStatement(){const e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new ri)}parseStatement(){let e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:const t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e}parseFunctionSourceElements(){const e=this.createNode();this.expect("{");const t=this.parseDirectivePrologues(),s=this.context.labelSet,i=this.context.inIteration,n=this.context.inSwitch,r=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=s,this.context.inIteration=i,this.context.inSwitch=n,this.context.inFunctionBody=r,this.finalize(e,new Hs(t))}validateParam(e,t,s){const i="$"+s;this.context.strict?(this.scanner.isRestrictedWord(s)&&(e.stricted=t,e.message=vn),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)):e.firstRestricted||(this.scanner.isRestrictedWord(s)?(e.firstRestricted=t,e.message=vn):this.scanner.isStrictModeReservedWord(s)?(e.firstRestricted=t,e.message=Bn):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0}parseRestElement(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError("Unexpected token ="),this.match(")")||this.throwError("Rest parameter must be last formal parameter"),this.finalize(t,new Ki(s))}parseFormalParameter(e){const t=[],s=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t);for(let i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&s instanceof yi,e.params.push(s)}parseFormalParameters(e){const t={simple:!0,hasDuplicateParameterNames:!1,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),t.hasDuplicateParameterNames&&(this.context.strict||this.context.isAsync||!t.simple)&&this.throwError(dn),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}matchAsyncFunction(){let e=this.matchContextualKeyword("async");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===s.lineNumber&&4===s.type&&"function"===s.value}return e}parseFunctionDeclaration(e){const t=this.createNode(),s=this.matchContextualKeyword("async");s&&(this.context.inIteration&&this.tolerateError("Async functions can only be declared at the top level or inside a block."),this.nextToken()),this.expectKeyword("function");const i=this.match("*");let n;i&&this.nextToken();let r=null,a=null;if(!e||!this.match("(")){const e=this.lookahead;r=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(e.value)&&this.tolerateUnexpectedToken(e,kn):this.scanner.isRestrictedWord(e.value)?(a=e,n=kn):this.scanner.isStrictModeReservedWord(e.value)&&(a=e,n=Bn)}const o=this.context.isAsync,u=this.context.allowYield;this.context.isAsync=s,this.context.allowYield=!i;const c=this.parseFormalParameters(a),h=c.params,l=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);const p=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;const m=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&l&&this.tolerateUnexpectedToken(l,n),this.context.strict=p,this.context.allowStrictDirective=d,this.context.isAsync=o,this.context.allowYield=u,s?this.finalize(t,new Ys(r,h,m,i)):this.finalize(t,new Ei(r,h,m,i))}parseFunctionExpression(){const e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");const s=this.match("*");let i;s&&this.nextToken();let n,r=null;const a=this.context.isAsync,o=this.context.allowYield;if(this.context.isAsync=t,this.context.allowYield=!s,!this.match("(")){const e=this.lookahead;r=this.context.strict||s||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(e.value)&&this.tolerateUnexpectedToken(e,kn):this.scanner.isRestrictedWord(e.value)?(n=e,i=kn):this.scanner.isStrictModeReservedWord(e.value)&&(n=e,i=Bn)}const u=this.parseFormalParameters(n),c=u.params,h=u.stricted;n=u.firstRestricted,u.message&&(i=u.message);const l=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;const d=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,i),this.context.strict&&h&&this.tolerateUnexpectedToken(h,i),this.context.strict=l,this.context.allowStrictDirective=p,this.context.isAsync=a,this.context.allowYield=o,this.finalize(e,new gi(r,c,d,s,t))}parseDirective(){const e=this.lookahead,t=this.createNode(),s=this.parseExpression(),i=s.type===ze.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new oi(s,i):new mi(s))}parseDirectivePrologues(){let e=null;const t=[];for(;;){const s=this.lookahead;if(8!==s.type)break;const i=this.parseDirective();t.push(i);const n=i.directive;if("string"!=typeof n)break;"use strict"===n?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,bn),this.context.allowStrictDirective||this.tolerateUnexpectedToken(s,"Illegal 'use strict' directive in function with non-simple parameter list")):!e&&s.octal&&(e=s)}return t}qualifiedPropertyName(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value||"#"===e.value}return!1}parseGetterMethod(){const e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;const s=this.parseFormalParameters();s.params.length>0&&this.tolerateError("Getter must not have any formal parameters");const i=this.parsePropertyMethod(s);return this.context.allowYield=t,this.finalize(e,new gi(null,s.params,i,!1,!1))}parseSetterMethod(){const e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;const s=this.parseFormalParameters();1!==s.params.length?this.tolerateError("Setter must have exactly one formal parameter"):s.params[0]instanceof Ki&&this.tolerateError("Setter function argument must not be a rest parameter");const i=this.parsePropertyMethod(s);return this.context.allowYield=t,this.finalize(e,new gi(null,s.params,i,!1,!1))}parseGeneratorMethod(e){const t=this.createNode(),s=this.context.allowYield;this.context.allowYield=!0;const i=this.parseFormalParameters();this.context.allowYield=!1;const n=this.parsePropertyMethod(i);return this.context.allowYield=s,this.finalize(t,new gi(null,i.params,n,!0,e))}isStartOfExpression(){let e=!0;const t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e}parseYieldExpression(){const e=this.createNode();this.expectKeyword("yield");let t=null,s=!1;if(!this.hasLineTerminator){const e=this.context.allowYield;this.context.allowYield=!1,s=this.match("*"),s?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=e}return this.finalize(e,new hn(t,s))}parseStaticBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new Gi(t))}parseDecorator(){const e=this.createNode();this.expect("@");const t=this.context.strict,s=this.context.allowYield,i=this.context.isAsync;this.context.strict=!1,this.context.allowYield=!0,this.context.isAsync=!1;const n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);return this.context.strict=t,this.context.allowYield=s,this.context.isAsync=i,this.match(";")&&this.throwError("Decorators must not be followed by a semicolon."),this.finalize(e,new ai(n))}parseDecorators(){let e=null;for(;this.match("@");)null==e&&(e=[]),e.push(this.parseDecorator());return e}parseClassElement(e){let t=this.lookahead;const s=this.createNode(),i=this.context.inConstructor;let n="",r=null,a=null,o=!1,u=!1,c=!1,h=!1,l=!1,p=!1;const d=this.parseDecorators();if(d&&(t=this.lookahead),this.match("*"))this.nextToken();else{o=this.match("["),this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p);const e=r;if(this.context.inConstructor=3===t.type&&"constructor"===t.value,"static"===e.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,o=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead)):(this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p))),"static"===e.name&&this.match("{"))return this.parseStaticBlock();if(3===t.type&&!this.hasLineTerminator&&"async"===t.value){const e=this.lookahead.value;":"!==e&&"("!==e&&(h=!0,l=this.match("*"),l&&this.nextToken(),t=this.lookahead,o=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(p=!0,this.nextToken())):(this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p)),3!==t.type||"constructor"!==t.value||c||this.tolerateUnexpectedToken(t,"Class constructor may not be an async method"))}}3===t.type&&"constructor"===t.value&&p&&this.tolerateUnexpectedToken(t,"Class constructor may not be a private method");const m=this.qualifiedPropertyName(this.lookahead);if(3===t.type||8===t.type?"get"===t.value&&m?(n="get",this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),o=this.match("["),r=this.parseObjectPropertyKey(p),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&m?(n="set",this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),o=this.match("["),r=this.parseObjectPropertyKey(p),a=this.parseSetterMethod()):this.match("(")||(n="property",o=!1,this.match("=")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression))):7===t.type&&"*"===t.value&&m?(n="init",o=this.match("["),r=this.parseObjectPropertyKey(p),a=this.parseGeneratorMethod(h),u=!0):7!==t.type||"["!==t.value||this.match("(")||(n="property",o=!0,this.match("=")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression))),!n&&r&&this.match("(")){const e=this.context.inClassConstructor;this.context.inClassConstructor="constructor"===t.value,n="init",a=h?this.parsePropertyMethodAsyncFunction(l):this.parsePropertyMethodFunction(l),this.context.inClassConstructor=e,u=!0}return n||this.throwUnexpectedToken(this.lookahead),"init"===n&&(n="method"),o||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,"Classes may not have static property named prototype"),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==n||!u||a&&a.generator)&&this.throwUnexpectedToken(t,"Class constructor may not be an accessor"),e.value?this.throwUnexpectedToken(t,"A class may only have one constructor"):e.value=!0,n="constructor")),this.context.inConstructor=i,"property"===n?(this.consumeSemicolon(),this.finalize(s,new zi(r,o,a,c,d))):this.finalize(s,new Pi(r,o,a,n,c,d))}parseClassElementList(){const e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e}parseClassBody(){const e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new ei(t))}parseClassDeclaration(e){const t=this.createNode(),s=this.context.strict,i=this.context.allowSuper;this.context.strict=!0,this.expectKeyword("class");const n=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier();let r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const a=this.parseClassBody();return this.context.allowSuper=i,this.context.strict=s,this.finalize(t,new ti(n,r,a,this.context.decorators))}parseClassExpression(){const e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");const s=3===this.lookahead.type?this.parseVariableIdentifier():null;let i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const n=this.parseClassBody();return this.context.strict=t,this.finalize(e,new si(s,i,n,this.context.decorators))}parseModule(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;const e=this.createNode(),t=this.parseDirectivePrologues();for(;2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Oi(t))}parseScript(){const e=this.createNode(),t=this.parseDirectivePrologues();for(;2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new $i(t))}parseImportAttributes(){if("assert"===this.lookahead.value){this.nextToken(),this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportAttribute()),this.match("}")||this.expectCommaSeparator();return this.expect("}"),e}return null}parseImportAttribute(){const e=this.createNode();3!==this.lookahead.type&&this.throwUnexpectedToken(this.nextToken());const t=this.parseIdentifierName();this.match(":")||this.throwUnexpectedToken(this.nextToken()),this.nextToken();const s=this.nextToken(),i=this.getTokenRaw(s),n=this.finalize(e,new Bi(s.value,i));return this.finalize(e,new Ai(t,n))}parseModuleSpecifier(){const e=this.createNode();8!==this.lookahead.type&&this.throwError(gn);const t=this.nextToken(),s=this.getTokenRaw(t);return ks.isStringWellFormedUnicode(t.value)||this.throwError(gn),this.finalize(e,new Bi(t.value,s))}parseImportSpecifier(){const e=this.createNode();let t,s;return 3===this.lookahead.type?(t=this.parseVariableIdentifier(),s=t,this.matchContextualKeyword("as")&&(this.nextToken(),s=this.parseVariableIdentifier())):(t=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName(),s=t,this.matchContextualKeyword("as")?(this.nextToken(),s=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(e,new bi(s,t))}parseNamedImports(){this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e}parseImportDefaultSpecifier(){const e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new Si(t))}parseImportNamespaceSpecifier(){const e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError("Unexpected token"),this.lookahead.escaped&&this.throwError(Fn),this.nextToken();const t=this.parseIdentifierName();return this.finalize(e,new ki(t))}parseImportDeclaration(){this.context.inFunctionBody&&this.throwError(Dn);const e=this.createNode();let t;this.expectKeyword("import");let s=[];if(8===this.lookahead.type)t=this.parseModuleSpecifier();else{if(this.match("{")?s=s.concat(this.parseNamedImports()):this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(s.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.match("{")?s=s.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){const e=this.lookahead.value?In:An;this.throwError(e,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}const i=this.parseImportAttributes();return this.consumeSemicolon(),this.finalize(e,new wi(s,t,i))}parseExportSpecifier(){const e=this.createNode(),t=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName();let s=t;return this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(Fn),this.nextToken(),s=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName()),this.finalize(e,new di(t,s))}parseExportDeclaration(){this.context.inFunctionBody&&this.throwError(mn);const e=this.createNode();let t;if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){const s=this.parseFunctionDeclaration(!0);t=this.finalize(e,new li(s))}else if(this.matchKeyword("class")){const s=this.parseClassDeclaration(!0);t=this.finalize(e,new li(s))}else if(this.matchContextualKeyword("async")){const s=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new li(s))}else{this.matchContextualKeyword("from")&&this.throwError(In,this.lookahead.value);const s=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new li(s))}else if(this.match("*")){this.nextToken();let s=null;if(this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(Fn),this.nextToken(),s=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName()),!this.matchContextualKeyword("from")){const e=this.lookahead.value?In:An;this.throwError(e,this.lookahead.value)}this.lookahead.escaped&&this.throwError(Fn),this.nextToken();const i=this.parseModuleSpecifier(),n=this.parseImportAttributes();this.consumeSemicolon(),t=this.finalize(e,new hi(i,s,n))}else if(4===this.lookahead.type){let s;switch(this.lookahead.value){case"let":case"const":s=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":s=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new pi(s,[],null,null))}else if(this.matchAsyncFunction()){const s=this.parseFunctionDeclaration();t=this.finalize(e,new pi(s,[],null,null))}else{const s=[];let i=null,n=!1,r=null;for(this.expect("{");!this.match("}");)n=n||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.lookahead.escaped&&this.throwError(Fn),this.nextToken(),i=this.parseModuleSpecifier(),r=this.parseImportAttributes(),this.consumeSemicolon();else if(n){const e=this.lookahead.value?In:An;this.throwError(e,this.lookahead.value)}else r=this.parseImportAttributes(),this.consumeSemicolon();t=this.finalize(e,new pi(null,s,i,r))}return t}},Jn={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"};function Kn(e){let t;switch(e.type){case Fs.JSXIdentifier:t=e.name;break;case Fs.JSXNamespacedName:const s=e;t=Kn(s.namespace)+":"+Kn(s.name);break;case Fs.JSXMemberExpression:const i=e;t=Kn(i.object)+"."+Kn(i.property)}return t}Un[100]="JSXIdentifier",Un[101]="JSXText";var Xn=class extends zn{constructor(e,t,s){super(e,t,s)}parsePrimaryExpression(){return this.match("<")?this.parseJSXRoot():super.parsePrimaryExpression()}startJSX(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column}finishJSX(){this.nextToken()}reenterJSX(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()}createJSXNode(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}createJSXChildNode(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}scanXHTMLEntity(e){let t="&",s=!0,i=!1,n=!1,r=!1;for(;!this.scanner.eof()&&s&&!i;){const a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:n="#"===a;break;case 3:n&&(r="x"===a,s=r||ks.isDecimalDigit(a.charCodeAt(0)),n=n&&!r);break;default:s=s&&!(n&&!ks.isDecimalDigit(a.charCodeAt(0))),s=s&&!(r&&!ks.isHexDigit(a.charCodeAt(0)))}}if(s&&i&&t.length>2){const e=t.substr(1,t.length-2);n&&e.length>1?t=String.fromCharCode(parseInt(e.substr(1),10)):r&&e.length>2?t=String.fromCharCode(parseInt("0"+e.substr(1),16)):n||r||!Jn[e]||(t=Jn[e])}return t}lexJSX(){const e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){const e=this.scanner.index,t=this.scanner.source[this.scanner.index++];let s="";for(;!this.scanner.eof();){const e=this.scanner.source[this.scanner.index++];if(e===t)break;s+="&"===e?this.scanXHTMLEntity(t):e}return{type:8,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(46===e){const e=this.scanner.source.charCodeAt(this.scanner.index+1),t=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===e&&46===t?"...":".",i=this.scanner.index;return this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(ks.isIdentifierStart(e)&&92!==e){const e=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){const e=this.scanner.source.charCodeAt(this.scanner.index);if(ks.isIdentifierPart(e)&&92!==e)++this.scanner.index;else{if(45!==e)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(e,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}return this.scanner.lex()}nextJSXToken(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e}nextJSXText(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.scanner.index;let t="";for(;!this.scanner.eof();){const e=this.scanner.source[this.scanner.index];if("{"===e||"<"===e)break;++this.scanner.index,t+=e,ks.isLineTerminator(e.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===e&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;const s={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(s)),s}peekJSXToken(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.lexJSX();return this.scanner.restoreState(e),t}expectJSX(e){const t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)}matchJSX(e){const t=this.peekJSXToken();return 7===t.type&&t.value===e}parseJSXIdentifier(){const e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new Ns(t.value))}parseJSXElementName(){const e=this.createJSXNode();let t=this.parseJSXIdentifier();if(this.matchJSX(":")){const s=t;this.expectJSX(":");const i=this.parseJSXIdentifier();t=this.finalize(e,new Ms(s,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){const s=t;this.expectJSX(".");const i=this.parseJSXIdentifier();t=this.finalize(e,new Ps(s,i))}return t}parseJSXAttributeName(){const e=this.createJSXNode();let t;const s=this.parseJSXIdentifier();if(this.matchJSX(":")){const i=s;this.expectJSX(":");const n=this.parseJSXIdentifier();t=this.finalize(e,new Ms(i,n))}else t=s;return t}parseJSXStringLiteralAttribute(){const e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);const s=this.getTokenRaw(t);return this.finalize(e,new Bi(t.value,s))}parseJSXExpressionAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new Is(t))}parseJSXAttributeValue(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()}parseJSXNameValueAttribute(){const e=this.createJSXNode(),t=this.parseJSXAttributeName();let s=null;return this.matchJSX("=")&&(this.expectJSX("="),s=this.parseJSXAttributeValue()),this.finalize(e,new Os(t,s))}parseJSXSpreadAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new Us(t))}parseJSXAttributes(){const e=[];for(;!this.matchJSX("/")&&!this.matchJSX(">");){const t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e}parseJSXOpeningElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new Rs(!1));const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new _s(t,i,s))}parseJSXBoundaryElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){if(this.expectJSX("/"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new vs);const t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new bs(t))}const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new _s(t,i,s))}parseJSXEmptyExpression(){const e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new Ts)}parseJSXExpressionContainer(){const e=this.createJSXNode();let t;return this.expectJSX("{"),this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new Is(t))}parseJSXChildren(){const e=[];for(;!this.scanner.eof();){const t=this.createJSXChildNode(),s=this.nextJSXText();if(s.start<s.end){const i=this.getTokenRaw(s),n=this.finalize(t,new Ls(s.value,i));e.push(n)}if("{"!==this.scanner.source[this.scanner.index])break;{const t=this.parseJSXExpressionContainer();e.push(t)}}return e}parseComplexJSXElement(e){const t=[];for(;!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());const s=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===Fs.JSXOpeningElement){const n=i;if(n.selfClosing){const t=this.finalize(s,new Bs(n,[],null));e.children.push(t)}else t.push(e),e={node:s,opening:n,closing:null,children:[]}}if(i.type===Fs.JSXClosingElement){e.closing=i;const s=Kn(e.opening.name);if(s!==Kn(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",s),!(t.length>0))break;{const s=this.finalize(e.node,new Bs(e.opening,e.children,e.closing));(e=t[t.length-1]).children.push(s),t.pop()}}if(i.type===Fs.JSXClosingFragment){if(e.closing=i,e.opening.type===Fs.JSXOpeningFragment)break;this.tolerateError("Expected corresponding JSX closing tag for jsx fragment")}}return e}parseJSXElement(){const e=this.createJSXNode(),t=this.parseJSXOpeningElement();let s=[],i=null;if(!t.selfClosing){const n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:s});s=n.children,i=n.closing}return this.finalize(e,new Bs(t,s,i))}parseJSXRoot(){this.config.tokens&&this.tokens.pop(),this.startJSX();const e=this.parseJSXElement();return this.finishJSX(),e}isStartOfExpression(){return super.isStartOfExpression()||this.match("<")}};function $n(e,t,s){let i=null;const n=(e,t)=>{s&&s(e,t),i&&i.visit(e,t)};let r="function"==typeof s?n:null,a=!1;if(t){a="boolean"==typeof t.comment&&t.comment;const e="boolean"==typeof t.attachComment&&t.attachComment;(a||e)&&(i=new ws,i.attach=e,t.comment=!0,r=n)}let o,u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType),o=t&&"boolean"==typeof t.jsx&&t.jsx?new Xn(e,t,r):new zn(e,t,r);const c=u?o.parseModule():o.parseScript();return a&&i&&(c.comments=i.comments),o.config.tokens&&(c.tokens=o.tokens),o.config.tolerant&&(c.errors=o.errorHandler.errors),c}var Yn=/* @__PURE__ */de(e=>{!function e(t){var s,i,n,r,a,o;function u(e){var t,s,i={};for(t in e)e.hasOwnProperty(t)&&(s=e[t],i[t]="object"==typeof s&&null!==s?u(s):s);return i}function c(e,t){this.parent=e,this.key=t}function h(e,t,s,i){this.node=e,this.path=t,this.wrap=s,this.ref=i}function l(){}function p(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function d(e,t){return(e===s.ObjectExpression||e===s.ObjectPattern)&&"properties"===t}function m(e,t){for(var s=e.length-1;s>=0;--s)if(e[s].node===t)return!0;return!1}function D(e,t){return(new l).traverse(e,t)}function f(e,t){var s=function(e,t){for(var s,i,n=e.length,r=0;n;)t(e[i=r+(s=n>>>1)])?n=s:(r=i+1,n-=s+1);return r}(t,function(t){return t.range[0]>e.range[0]});return e.extendedRange=[e.range[0],e.range[1]],s!==t.length&&(e.extendedRange[1]=t[s].range[0]),(s-=1)>=0&&(e.extendedRange[0]=t[s].range[1]),e}return s={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},n={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:r={},Skip:a={},Remove:o={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},l.prototype.path=function(){var e,t,s,i,n;function r(e,t){if(Array.isArray(t))for(s=0,i=t.length;s<i;++s)e.push(t[s]);else e.push(t)}if(!this.__current.path)return null;for(n=[],e=2,t=this.__leavelist.length;e<t;++e)r(n,this.__leavelist[e].path);return r(n,this.__current.path),n},l.prototype.type=function(){return this.current().type||this.__current.wrap},l.prototype.parents=function(){var e,t,s=[];for(e=1,t=this.__leavelist.length;e<t;++e)s.push(this.__leavelist[e].node);return s},l.prototype.current=function(){return this.__current.node},l.prototype.__execute=function(e,t){var s,i=void 0;return s=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=s,i},l.prototype.notify=function(e){this.__state=e},l.prototype.skip=function(){this.notify(a)},l.prototype.break=function(){this.notify(r)},l.prototype.remove=function(){this.notify(o)},l.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=n,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},l.prototype.traverse=function(e,t){var s,i,n,o,u,c,l,D,f,x,E,g;for(this.__initialize(e,t),g={},s=this.__worklist,i=this.__leavelist,s.push(new h(e,null,null,null)),i.push(new h(null,null,null,null));s.length;)if((n=s.pop())!==g){if(n.node){if(c=this.__execute(t.enter,n),this.__state===r||c===r)return;if(s.push(g),i.push(n),this.__state===a||c===a)continue;if(u=(o=n.node).type||n.wrap,!(x=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");x=this.__fallback(o)}for(D=x.length;(D-=1)>=0;)if(E=o[l=x[D]])if(Array.isArray(E)){for(f=E.length;(f-=1)>=0;)if(E[f]&&!m(i,E[f])){if(d(u,x[D]))n=new h(E[f],[l,f],"Property",null);else{if(!p(E[f]))continue;n=new h(E[f],[l,f],null,null)}s.push(n)}}else if(p(E)){if(m(i,E))continue;s.push(new h(E,l,null,null))}}}else if(n=i.pop(),c=this.__execute(t.leave,n),this.__state===r||c===r)return},l.prototype.replace=function(e,t){var s,i,n,u,l,m,D,f,x,E,g,y,C;function A(e){var t,i,n,r;if(e.ref.remove())for(i=e.ref.key,r=e.ref.parent,t=s.length;t--;)if((n=s[t]).ref&&n.ref.parent===r){if(n.ref.key<i)break;--n.ref.key}}for(this.__initialize(e,t),g={},s=this.__worklist,i=this.__leavelist,m=new h(e,null,null,new c(y={root:e},"root")),s.push(m),i.push(m);s.length;)if((m=s.pop())!==g){if(void 0!==(l=this.__execute(t.enter,m))&&l!==r&&l!==a&&l!==o&&(m.ref.replace(l),m.node=l),this.__state!==o&&l!==o||(A(m),m.node=null),this.__state===r||l===r)return y.root;if((n=m.node)&&(s.push(g),i.push(m),this.__state!==a&&l!==a)){if(u=n.type||m.wrap,!(x=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");x=this.__fallback(n)}for(D=x.length;(D-=1)>=0;)if(E=n[C=x[D]])if(Array.isArray(E)){for(f=E.length;(f-=1)>=0;)if(E[f]){if(d(u,x[D]))m=new h(E[f],[C,f],"Property",new c(E,f));else{if(!p(E[f]))continue;m=new h(E[f],[C,f],null,new c(E,f))}s.push(m)}}else p(E)&&s.push(new h(E,C,null,new c(n,C)))}}else if(m=i.pop(),void 0!==(l=this.__execute(t.leave,m))&&l!==r&&l!==a&&l!==o&&m.ref.replace(l),this.__state!==o&&l!==o||A(m),this.__state===r||l===r)return y.root;return y.root},t.Syntax=s,t.traverse=D,t.replace=function(e,t){return(new l).replace(e,t)},t.attachComments=function(e,t,s){var n,r,a,o,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!s.length){if(t.length){for(a=0,r=t.length;a<r;a+=1)(n=u(t[a])).extendedRange=[0,e.range[0]],c.push(n);e.leadingComments=c}return e}for(a=0,r=t.length;a<r;a+=1)c.push(f(u(t[a]),s));return o=0,D(e,{enter:function(e){for(var t;o<c.length&&!((t=c[o]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(o,1)):o+=1;return o===c.length?i.Break:c[o].extendedRange[0]>e.range[1]?i.Skip:void 0}}),o=0,D(e,{leave:function(e){for(var t;o<c.length&&(t=c[o],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),c.splice(o,1)):o+=1;return o===c.length?i.Break:c[o].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=n,t.VisitorOption=i,t.Controller=l,t.cloneEnvironment=function(){return e({})},t}(e)}),jn=/* @__PURE__ */De(Yn(),1),Gn="undefined"!=typeof window&&"undefined"!=typeof document,Vn=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),Hn=()=>{},Wn=e=>e();function qn(e,t={}){let s,i,n=Hn;const r=e=>{clearTimeout(e),n(),n=Hn};let a;return o=>{const u=ie(e),c=ie(t.maxWait);return s&&r(s),u<=0||void 0!==c&&c<=0?(i&&(r(i),i=void 0),Promise.resolve(o())):new Promise((e,h)=>{n=t.rejectOnCancel?h:e,a=o,c&&!i&&(i=setTimeout(()=>{s&&r(s),i=void 0,e(a())},c)),s=setTimeout(()=>{i&&r(i),i=void 0,e(o())},u)})}}function Qn(e){return Array.isArray(e)?e:[e]}function Zn(e){const t=Object.create(null);return s=>t[s]||(t[s]=e(s))}var er=/\B([A-Z])/g,tr=(Zn(e=>e.replace(er,"-$1").toLowerCase()),/-(\w)/g);function sr(e,t,s={}){const{eventFilter:i=Wn,...n}=s;return re(e,(r=i,a=t,function(...e){return new Promise((t,s)=>{Promise.resolve(r(()=>a.apply(this,e),{fn:a,thisArg:this,args:e})).then(t).catch(s)})}),n);var r,a}function ir(e,t=!0,s){!function(e){return e||L()}(s)?t?e():K(e):Y(e,s)}function nr(e,t,s={}){const{debounce:i=0,maxWait:n,...r}=s;return sr(e,t,{...r,eventFilter:qn(i,{maxWait:n})})}Zn(e=>e.replace(tr,(e,t)=>t?t.toUpperCase():""));var rr=Gn?window:void 0,ar=Gn?window.document:void 0;function or(...e){const t=O(()=>{const t=Qn(ie(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return s=([e,t,s,i],n,r)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==s?void 0:s.length))return;const a=(o=i,"[object Object]"===Vn.call(o)?{...i}:i);var o;const u=e.flatMap(e=>t.flatMap(t=>s.map(s=>((e,t,s,i)=>(e.addEventListener(t,s,i),()=>e.removeEventListener(t,s,i)))(e,t,s,a))));r(()=>{u.forEach(e=>e())})},i={flush:"post"},re(()=>{var s,i;return[null!==(s=null===(i=t.value)||void 0===i?void 0:i.map(e=>function(e){var t;const s=ie(e);return null!==(t=null==s?void 0:s.$el)&&void 0!==t?t:s}(e)))&&void 0!==s?s:[rr].filter(e=>null!=e),Qn(ie(t.value?e[1]:e[0])),Qn(ne(t.value?e[2]:e[1])),ie(t.value?e[3]:e[2])]},s,{...i,immediate:!0});var s,i}Gn&&window.navigator,Gn&&window.location;var ur="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},cr="__vueuse_ssr_handlers__",hr=/* @__PURE__ */lr();function lr(){return cr in ur||(ur[cr]=ur[cr]||{}),ur[cr]}var pr={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},dr="vueuse-storage";function mr(e,t,s,i={}){var n;const{flush:r="pre",deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:h,window:l=rr,eventFilter:p,onError:d=e=>{console.error(e)},initOnMounted:m}=i,D=(h?ee:Q)("function"==typeof t?t():t),f=O(()=>ie(e));if(!s)try{s=(hr.getDefaultStorage||(()=>null==rr?void 0:rr.localStorage))()}catch(S){d(S)}if(!s)return D;const x=ie(t),E=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(x),g=null!==(n=i.serializer)&&void 0!==n?n:pr[E],{pause:y,resume:C}=function(e,t,s={}){const{eventFilter:i,initialState:n="active",...r}=s,{eventFilter:a,pause:o,resume:u,isActive:c}=function(e=Wn,t={}){const{initialState:s="active"}=t,i=function(...e){if(1!==e.length)return se(...e);const t=e[0];return"function"==typeof t?q(R(()=>({get:t,set:Hn}))):Q(t)}("active"===s);return{isActive:q(i),pause:function(){i.value=!1},resume:function(){i.value=!0},eventFilter:(...t)=>{i.value&&e(...t)}}}(i,{initialState:n});return{stop:sr(e,t,{...r,eventFilter:a}),pause:o,resume:u,isActive:c}}(D,e=>function(e){try{const t=s.getItem(f.value);if(null==e)F(t,null),s.removeItem(f.value);else{const i=g.write(e);t!==i&&(s.setItem(f.value,i),F(t,i))}}catch(S){d(S)}}(e),{flush:r,deep:a,eventFilter:p});re(f,()=>w(),{flush:r});let A=!1;function F(e,t){if(l){const i={key:f.value,oldValue:e,newValue:t,storageArea:s};l.dispatchEvent(s instanceof Storage?new StorageEvent("storage",i):new CustomEvent(dr,{detail:i}))}}function w(e){if(!e||e.storageArea===s)if(e&&null==e.key)D.value=x;else if(!e||e.key===f.value){y();try{const t=g.write(D.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(D.value=function(e){const t=e?e.newValue:s.getItem(f.value);if(null==t)return u&&null!=x&&s.setItem(f.value,g.write(x)),x;if(!e&&c){const e=g.read(t);return"function"==typeof c?c(e,x):"object"!==E||Array.isArray(e)?e:{...x,...e}}return"string"!=typeof t?t:g.read(t)}(e))}catch(S){d(S)}finally{e?K(C):C()}}}return l&&o&&(s instanceof Storage?or(l,"storage",e=>{m&&!A||w(e)},{passive:!0}):or(l,dr,e=>{m&&!A||w(e.detail)})),m?ir(()=>{A=!0,w()}):w(),D}function Dr(e,t){const s=(null==t?void 0:t.cache)?Z(t.cache):Z(/* @__PURE__ */new Map),i=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),n=(t,...i)=>(s.set(t,e(...i)),s.get(t)),r=(...e)=>{const t=i(...e);return s.has(t)?s.get(t):n(t,...e)};return r.load=(...e)=>n(i(...e),...e),r.delete=(...e)=>{s.delete(i(...e))},r.clear=()=>{s.clear()},r.generateKey=i,r.cache=s,r}var fr=0;Number.POSITIVE_INFINITY,window._METHOD_DEBUG_=je;var xr=Dr(function(e,t=!1){const s=$n(e);let i=[];return jn.default.traverse(s,{enter:function(e){if(e.type===ze.MemberExpression){const t=gr(e);i.push(t),Object.assign(e,{name:t,type:ze.Identifier})}else e.type===ze.Identifier&&i.push(e.name);i=t?i.filter(e=>!D[e]&&"undefined"!==e):i.filter(e=>!(D[e]||"undefined"===e||f.includes(e)||e.startsWith(d)||e.startsWith("undefined.")))}}),[...new Set(i)]}),Er=Dr(async function(e,t){const s=xr(e,!0),i=s.filter(e=>f.includes(e)).sort(),n=s.filter(e=>e.startsWith(d)).sort(),r=await Cr([...i,...n]),a=$n(e);jn.default.replace(a,{enter(e){if(e.type===ze.BinaryExpression){const{operator:t}=e,s=x[t];return s?{type:ze.CallExpression,arguments:[e.left,e.right],callee:{type:ze.Identifier,name:s},optional:!1}:e}return e}}),jn.default.traverse(a,{enter:function(e){e.type===ze.CallExpression&&e.callee.type===ze.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const o={},u=[];r.forEach(e=>{u.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[s="",i]=e.split(".");o[s]||(u.push(`const ${s} = {};`),o[s]=!0),u.push(`${s}.${i} = ${JSON.stringify(t[e])};`)}else u.push(`const ${e} = ${JSON.stringify(t[e])};`)});const c=new yr("Methods",[...u,"return new Promise(async(resolve)=>{","const res = ;","resolve(res);","})"].join("\n")),h=await c(je);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",c.toString()),console.info("【执行结果】",h),h});function gr(e){return e.type===ze.MemberExpression?`${e.object.type===ze.MemberExpression?gr(e.object):e.object.name}.${e.property.name}`:e.type===ze.Identifier?e.name:""}var yr=Object.getPrototypeOf(async function(){}).constructor,Cr=Dr(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:Er,identify:xr};var Ar=class{static cachedata={};static set(e,t,s){this.cachedata[e]={maxAge:s||0,value:t,now:Date.now()}}static get(e){this.reset();const t=this.cachedata[e];return t?t.value:null}static delete(e){return delete this.cachedata[e]}static clear(){this.cachedata={}}static reset(){for(const e in this.cachedata){const t=this.cachedata[e];t&&Date.now()-t.now>t.maxAge&&this.delete(e)}}};async function Fr({ids:e,refOriginField:t,refOriginFieldType:s,model:i,foreignFields:n}){if(!e)return Promise.reject();const a=await async function({refOriginFieldType:e,modelKey:t,foreignFields:s,ids:i}){if(e===o.RDO_REF){const{data:e={},dict:n={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:r.ENTITY},{foreignFields:s},{refId:i});return{data:e,dict:n}}{const{data:e={},dict:n={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:r.ENTITY},{query:{"id_.eq":i},foreignFields:s},{});return{data:e,dict:n}}}({refOriginFieldType:s,modelKey:i,foreignFields:n,ids:e});return a?.data?Ue(t,a.data,a.dict):void 0}var wr=e=>function(e,t,s=!1){if(s||e?.customApi?.value)return t(e);const i="object"==typeof e?ae.stringify({...e,customApi:null}):e;let n=Ar.get(i);return n||(n=(async()=>{try{return await t(e)}catch(s){throw Ar.delete(i),s}})(),Ar.set(i,n,5e3),n)}(e,Fr),Sr={class:"handwriting-pad"},kr=["width","height"],br=/* @__PURE__ */(e=>{const t=e.__vccOpts||e;for(const[s,i]of[["__scopeId","data-v-d5b980b7"]])t[s]=i;return t})(/* @__PURE__ */U({__name:"HandwritingPad",props:{width:{default:300},height:{default:150},backgroundColor:{default:"transparent"},lineWidth:{default:2},strokeStyle:{default:"#000"}},setup(e,{expose:t}){const s=e,i=Q(null);let n=null,r=!1,a=0,o=0;function u(e){const t=i.value.getBoundingClientRect();return"touches"in e?{x:e.touches[0].clientX-t.left,y:e.touches[0].clientY-t.top}:{x:e.offsetX,y:e.offsetY}}function c(e){e.preventDefault(),r=!0;const{x:t,y:s}=u(e);a=t,o=s}function h(e){if(!r||!n)return;e.preventDefault();const{x:t,y:s}=u(e);n.beginPath(),n.moveTo(a,o),n.lineTo(t,s),n.stroke(),n.closePath(),a=t,o=s}function l(e){e.preventDefault(),r=!1}return Y(()=>{n=i.value.getContext("2d"),"transparent"!==s.backgroundColor&&(n.fillStyle=s.backgroundColor,n.fillRect(0,0,s.width,s.height)),n.lineWidth=s.lineWidth,n.strokeStyle=s.strokeStyle}),t({getValue:function(){return i.value?.toDataURL()},setValue:function(e){const t=new Image;t.src=e,t.onload=()=>{n?.drawImage(t,0,0)}},clear:function(){n?.clearRect(0,0,s.width,s.height),"transparent"!==s.backgroundColor&&(n.fillStyle=s.backgroundColor,n.fillRect(0,0,s.width,s.height))}}),(t,s)=>(V(),M("div",Sr,[_("canvas",{ref_key:"canvasRef",ref:i,width:e.width,height:e.height,class:"canvas",onMousedown:c,onMousemove:h,onMouseup:l,onMouseleave:l,onTouchstart:c,onTouchmove:h,onTouchend:l},null,40,kr)]))}})),vr=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),Br=function(e,t,s={}){const{window:i=rr}=s;return mr(e,t,null==i?void 0:i.localStorage,s)}("GCT_APP_GlobalCache",{}),Tr=e=>{const t=O({get:()=>Br.value[e]||{},set(t){Br.value[e]=t}});return{selectID:O({get:()=>t.value[vr.SELECT_ID],set(e){t.value[vr.SELECT_ID]?t.value[vr.SELECT_ID]=e:t.value={...t.value,[vr.SELECT_ID]:e}}}),cacheMap:t}},Ir=class{static ENV;static AID;static userInfo;static runApp({userInfo:e,env:t,aid:s}){this.ENV=t,this.AID=s,this.userInfo=e}},Nr={[h.DATE]:{callback:e=>y(e,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid(),message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[h.TIME]:{callback:e=>y(e,"HH:mm:ss",!0).isValid(),message:"时间变量格式HH:mm:ss"},[h.DATETIME]:{callback:e=>y(e,["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss"]).isValid(),message:"日期时间变量格式为YYYY-MM-DD HH:mm:ss,YYYY/MM/DD HH:mm:ss"}},Pr=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),Or={[Pr.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[Pr.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[Pr.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Mr=Q({}),_r=Q({}),Rr=Q({});function Ur(e,t){Rr.value[e]=t}var Lr=Q({pageStyle:{},pageConfig:{},pageName:""}),zr=se(()=>{const{title:e}=Lr.value.pageConfig||{};return e}),Jr=class e{static modalsCache={};static pageID="";static permissions={};static ContextCache={};static startRuning=!1;static globalHookCaches={pageMounted:[],pageActivated:[],pageDestroyed:[]};static setModals(e){this.modalsCache={},e?.forEach(e=>{this.modalsCache[e.id]=e})}static async getModalById(e){if(!e)return Promise.reject();if(/^i?g_modal_/.test(e)&&!this.modalsCache[e]){const[t]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(t?.configJson){const s=JSON.parse(t.configJson);this.modalsCache[e]=s}}return this.modalsCache[e]||(console.error(`模态框${e}不存在`),Promise.reject())}static getPremission(e){if(!e)return!0;const t=this.permissions[e];return!t||g().getPermissionByKey(this.pageID,t)}static setPremission(e,t){this.permissions[t]=e}static setContextByKey(e,t){t?this.ContextCache[t]=e:this.ContextCache={page:e}}static getContextByKey(e){return this.ContextCache[e||"page"]}static async initvars(){(await _gct.api.apaas.appGlobalSettings.getList({type:"var",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=JSON.parse(e.configJson);_r.value[t.key]=(({value:e,appredis:t,key:s,type:i})=>{const n="dev"!==Ir.ENV&&t,{cacheMap:r}=Tr(`${Ir.AID}_${Ir.userInfo?.userId}`);return new Proxy({value:e,type:i},{get:(e,t)=>n&&"value"===t?r.value[s]:Reflect.get(e,t),set:(e,t,i,a)=>(n&&"value"===t&&(r.value[s]?r.value[s]=i:r.value={...r.value,[s]:i}),Reflect.set(e,t,i,a))})})({value:t.defaultValue,appredis:t.appredis,key:t.key,type:t.type})}catch(t){console.error("initvars",t)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=new Function(JSON.parse(e.configJson).runJs),s=this.globalHookCaches[e.key];s&&s.push(t)}catch(t){console.error("inithooks",t)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){if(this.setModals(e.modals),e.pageVars?.forEach(e=>{Mr.value[e.key]={value:e.varInfo?.defaultValue,type:e.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(t){console.log(t)}}}static getGlobalVar(e){const t=_r.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const s=_r.value[e];if(!s)return console.warn("变量key不存在");s.value=t}static getPageVar(e){const t=Mr.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const s=Mr.value[e];if(!s)return console.warn("变量key不存在");await function(e,t){if(t===h.NULL)return!0;const{callback:s,message:i}=Nr[t]||{callback:e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===t,value:"变量值必须为"+t};return s(e)?Promise.resolve():Promise.reject(i)}(t,s.type),Mr.value[e]&&(Mr.value[e].value=t)}static getPageGlobalVar(e){return Mr.value[e]?.value}static setPageGlobalVar(e,t){Mr.value[e]?Mr.value[e].value=t:Mr.value[e]={value:t,type:"string"}}static async initPageByid(e,t=Pr.WEB){this.pageID=e;const s=Or[t].getPageInfo,i=await s({id:e}),{runtimeJson:n,name:r}=i||{};if(Lr.value.pageName=r,!n)return Promise.reject();const a=JSON.parse(n);return a.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(a),Lr.value.pageConfig=a.pageConfig||{},Lr.value.pageStyle=a.pageStyle||{},{res:i,data:a,name:r}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:s,name:i}=t||{};if(!s)return Promise.reject();Lr.value.pageName=i;const n=JSON.parse(s);return await this.initGlobalS(n),Lr.value.pageConfig=n.pageConfig||{},Lr.value.pageStyle=n.pageStyle||{},{res:t,data:n,name:i}}static usePageHooks(t,s,i,n){const r=Q(!1);return Y(async()=>{await K();const e=s?.pageBeforeMount;if(e?.name&&await t.runExportByName(e.name,e.extraParams),n&&await n(t),r.value=!0,i?.pageMounted)for(const t of this.globalHookCaches.pageMounted)await t();const{extraParams:a,name:o}=s?.pageMounted||{};o&&t.runAsyncExportByName(o,a)}),$(async()=>{Lr.value={};const{extraParams:e,name:n}=s?.pageDestroyed||{};if(n&&t.runExportByName(n,e),i?.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),X(async()=>{if(e.setContextByKey(t.context),i?.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:n,name:r}=s?.pageActivated||{};r&&t.runAsyncExportByName(r,n)}),{pageload:r}}},Kr=Jr.getPremission.bind(Jr),Xr=e=>(t,s={},i={},n={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??r.ENTITY},s,i,n),$r={post:Xr(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:Xr(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:Xr(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:Xr(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function Yr(e,s,i={}){return $r[t[e.action]](e,s,i)}async function jr(e,t,{body:s={},query:i={}}={},n={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:r.ENTITY},i,s,n)}var Gr=new class e{static instance;mask;container;spinner;constructor(){if(e.instance)return e.instance;e.instance=this,this.createLoadingElement(),this.initStyle()}createLoadingElement(){this.mask=document.createElement("div"),this.mask.id="gct-global-loading-mask",this.container=document.createElement("div"),this.container.id="gct-global-loading-container",this.spinner=document.createElement("div"),this.spinner.id="gct-global-loading-spinner",this.container.appendChild(this.spinner),this.mask.appendChild(this.container),document.body.appendChild(this.mask)}initStyle(){Object.assign(this.mask.style,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999,display:"none",justifyContent:"center",alignItems:"center"}),Object.assign(this.container.style,{display:"flex",flexDirection:"column",alignItems:"center",width:"43px",height:"43px",backgroundColor:"transparent",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.15)"}),Object.assign(this.spinner.style,{display:"grid",width:"43px",height:"43px",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",gap:"3px"});const e=getComputedStyle(document.documentElement).getPropertyValue("--gct-color-primary").trim();[{id:"gct-global-loading-item_1",delay:"0s"},{id:"gct-global-loading-item_2",delay:"0.25s"},{id:"gct-global-loading-item_3",delay:"0.75s"},{id:"gct-global-loading-item_4",delay:"0.5s"}].forEach(t=>{const s=document.createElement("div");s.id=t.id,Object.assign(s.style,{backgroundColor:e,opacity:.2,animation:"globalLoading 1s infinite",animationDelay:t.delay}),this.spinner.appendChild(s)});const t=document.createElement("style");t.textContent="\n @keyframes globalLoading {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n }",document.head.appendChild(t)}show(){this.mask.style.display="flex",document.body.style.overflow="hidden"}hide(){this.mask.style.display="none",document.body.style.overflow=""}},Vr=class{isHandle=!1;buttonConfig={};fieldConfig={};processId="";dataId="";taskId;processInstanceId;refFormId;examineAndApproveState=a.MY_CUSTOM;fieldStatus="";viewPageKey;isviewPage;isAPPviewPage;nonRelatedPerson=!1;constructor({taskId:e,processInstanceId:t,examineAndApproveState:s=a.MY_CUSTOM,refFormId:i}){this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=s,this.refFormId=i}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===a.MY_AGENT){await this.getDataInfo();const{node:t,processDefId:i,webViewPageKey:n,mobileViewPageKey:r}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(t),this.processId=i;for(const e in this.buttonConfig)e===s.Withdraw&&(this.buttonConfig[e].show=!1);this.viewPageKey=t?.webViewPageKey||n,this.isAPPviewPage=!!t?.mobileViewPageKey||!!r}if(this.examineAndApproveState===a.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:i,withdrawOp:n}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(e),this.processId=i;for(const t in this.buttonConfig)t===s.End&&(this.buttonConfig[t].show=!1),t===s.Withdraw&&(this.buttonConfig[t].show=!!n),t===s.Resubmit&&(this.buttonConfig[t].show=!1)}if(this.examineAndApproveState===a.MY_DONE){await this.getDataInfo();const{node:t,processDefId:s}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(t),this.processId=s}if(this.examineAndApproveState===a.MY_CUSTOM){await this.getDataInfo();const{node:e,processDefId:s,btnList:i,webViewPageKey:n,taskId:r,initiatorNode:a}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),o=i||[];this.withdrawByNode(a),this.transformByNode(e),this.processId=s;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=o.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);!o.length||"__initiator__"===e?.key&&!r?this.isviewPage=!0:this.viewPageKey=e?.webViewPageKey||n}if(this.examineAndApproveState===a.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:s,taskId:i,processDefId:n,initiatorNode:r}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),a=s||[];this.withdrawByNode(r),this.transformByNode(e),this.processId=n;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=a.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);a.length&&("__initiator__"!==e?.key||i)||(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(e=>{const t=E(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:E("sys.process.element.approval")+t,success:t+E("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:i,fieldConfig:n}=e,r=JSON.parse(i||"[]"),a=JSON.parse(t||'{"enabled":false,"opinionType":[]}');r.forEach(e=>{const t=E(`sys.process.paasBpmnButtonEvent.${e.type}`);var i,n;this.buttonConfig[e.type]={showModel:![s.Resubmit,s.Withdraw,s.End].includes(e.type),title:E("sys.process.element.approval")+t,success:t+E("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:a.enabled,required:(i=a.opinionType,n=e.type,!!i.includes(p.Required)||!i.includes(p.Optional)&&(i.includes(p.ApproveRequired)||i.includes(p.ApproveRequired)?n===s.Approve:i.includes(p.CountersignRequired)?n===s.Countersign:i.includes(p.ReassignRequired)?n===s.Reassign:i.includes(p.RejectRequired)?n===s.Reject:i.includes(p.RefuseRequired)?n===s.Refuse:void 0))},user:{show:[s.Reassign,s.Countersign].includes(e.type),multiple:s.Countersign===e.type,label:E(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(n+"")}catch(t){console.log("流程信息解析失败",t)}}async getDataInfo(){const{dataId:e}=await _gct.api.apaas.pmProcessEngine.getModel({processInstanceId:this.processInstanceId});this.dataId=e}filterButton(e){return this.nonRelatedPerson||this.examineAndApproveState===a.MY_DONE?[]:e.filter(e=>{if(e.type===c.ProcessApproveButton){const t=this.buttonConfig[e.props.action],s=!!t?.show;return s&&(e.props.title=t.alias),s}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:s,examineAndApproveState:i}=this;if(s&&s[t]){const{permission:i}=s[t];switch(i){case Hr.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Hr.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Hr.readonly:e.props.readonly=!0}}else e.props.readonly=!0;e.props.disabled||![a.MY_APPLICATION,a.MY_DONE].includes(i)&&!this.isviewPage||(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:s}=this;if(s&&s[t]){const{permission:i}=s[t];i===Hr.hidden&&(e.props.hidden=!0)}}};var Hr=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({}),Wr=class{context;searchVNodes;cssData;pageKey;exports;#e;#t;ProcessAppRoved;pageLayoutMode;constructor({js:e,css:t,pageKey:s,ContextVm:i}){this.cssData=this.#s(t),this.searchVNodes={},this.exports={},this.#t={},this.#e={},this.context=new i({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),this.#i(e),Jr.setContextByKey(this.context,s),this.pageKey=s}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:i}){this.ProcessAppRoved=new Vr({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:i}),await this.ProcessAppRoved.readyProcess()}#s(e,t={}){if(!e)return;const{css:s,load:i,unload:n}=function(e,t={}){const s=ee(!1),{document:i=ar,immediate:n=!0,manual:r=!1,id:a="vueuse_styletag_"+ ++fr}=t,o=ee(e);let u=()=>{};const c=()=>{if(!i)return;const e=i.getElementById(a)||i.createElement("style");e.isConnected||(e.id=a,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),i.head.appendChild(e)),s.value||(u=re(o,t=>{e.textContent=t},{immediate:!0}),s.value=!0)},h=()=>{i&&s.value&&(u(),i.head.removeChild(i.getElementById(a)),s.value=!1)};var l;return n&&!r&&ir(c),r||(l=h,z()&&j(l,void 0)),{id:a,css:o,unload:h,load:c,isLoaded:q(s)}}(e,t);return{css:s,load:i,unload:n}}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...s){const i=t[e];let n;if(i){if(Array.isArray(i))n=await async function(e,t,s){const i=e.map(Zr.bind(t,s));await Promise.all(i)}(i,this.context,s);else{const e=this.exports[i.name];if(!e)throw`函数${i.name}不存在`;n=await e(...s,te(i.extraParams))}return n}}async runExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return s(...t)}catch(s){console.error(s)}}async runAsyncExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return await this.getReadyByFun(s),s(...t)}catch(s){console.error(s)}}#i(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}initNode(e,t){e&&(this.#t[e]=t,this.#n(e,t))}destroyNode(e){delete this.#t[e],delete this.#e[e]}initSearchs(e,t,s){if(e)if(this.searchVNodes[e]){const i=this.searchVNodes[e].find(e=>e.comId===s);i?i.callback=t:this.searchVNodes[e].push({callback:t,comId:s})}else this.searchVNodes[e]=[{callback:t,comId:s}]}cancelInitSearchs(e,t){e&&this.searchVNodes[e]&&(this.searchVNodes[e]=this.searchVNodes[e].filter(e=>e.comId!==t),0===this.searchVNodes[e].length&&delete this.searchVNodes[e])}runTableBySearch(e,t){(this.searchVNodes[e]||[]).forEach(({callback:e})=>e(t))}#r(e,t){const s=this.#t[e];s?t(e,s):this.#e[e]?this.#e[e].push(t):this.#e[e]=[t]}#n(e,t){this.#e[e]&&this.#e[e].forEach(e=>{e(t)})}getComponent(e){const t=this.#t[e];if(t)return new Qr(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=this.#t[e];return t?Promise.resolve(new Qr(e,t)):new Promise((t,s)=>{const i=setTimeout(()=>{s(e+"不存在或者被隐藏")},3e4);this.#r(e,s=>{clearTimeout(i),t(new Qr(e,s))})})}async getReadyByFun(e){if("function"!=typeof e)return Promise.reject("参数必须是函数");const t=String(e).match(/\$ref\((["'A-Za-z0-9_-]+)\)/g)?.map(e=>{const t=e.match(/\$ref\(['|"]([A-Za-z0-9_-]+)['|"]\)/)?.[1];return this.getSyncComponent(t)})||[];await Promise.all(t)}async processHandle(e,{opinion:t,reassignId:s,signature:i,countersignUserIds:n,button:r}){const{taskId:a,processInstanceId:o}=this.ProcessAppRoved,u={procInstId:o,data:e,opinion:t,button:r,countersignUserIds:n,taskId:a,signature:i,reassignId:s};await _gct.api.apaas.pmProcessEngine.postProcExecute(u)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};return t?e!==t?Promise.reject(E("sys.process.processInstanceMismatch")):void 0:Promise.reject(E("sys.process.pleaseInitiateTheProcessFirst"))}},qr=class{$ref;$asyncRef;$getModal;$closeModal;$customBizService=$r;gctWidgets={};constructor({$ref:e,$asyncRef:t}){this.$asyncRef=t,this.$ref=e}$utility={_:C,cloneDeep:A,differenceBy:F,dayjs:y,BigNumber:P,plus:(e,t)=>new P(e).plus(new P(t)).toNumber(),minus:(e,t)=>new P(e).minus(new P(t)).toNumber(),multipliedBy:(e,t)=>new P(e).multipliedBy(new P(t)).toNumber(),div:(e,t)=>new P(e).div(new P(t)).toNumber(),transformSourceData:Oe,transformData:Me};$httpBizService=Yr;$request=jr;$loading=Gr;$getPremission(e){return Jr.getPremission(e)}$setPremission(e,t){Jr.setPremission(e,t)}$getAppGlobalVar(e){return Jr.getGlobalVar(e)}$setAppGlobalVar(e,t){Jr.setGlobalVar(e,t)}$getPageGlobalVar(e){return Jr.getPageGlobalVar(e)}$setPageGlobalVar(e,t){Jr.setPageGlobalVar(e,t)}$getPageVar(e){return Jr.getPageVar(e)}$setPageVar(e,t){Jr.setPageVar(e,t)}$getCtxById(e){return Jr.getContextByKey(e)}$setPropsByKey(e,t){const s=this.gctWidgets[e]?.props;if(s)for(const i in t)s[i]=t[i]}$getPropsByKey(e,t=[],s){const i=this.gctWidgets[e];if(!i)return{};const n=s||!i.props?i:i.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=n[t],e),{})}},Qr=class{modelKey;getValue;setValue;submit;reload;key;constructor(e,t){this.key=e;const s=t.elRef;Object.keys(s).forEach(e=>{this[e]=s[e]})}};async function Zr(e,t){const{name:s,refId:i,scopeId:n,modalTitle:r}=t,a=r?.split(".")||[];let o;if(a.length>1){const e=[];ea(e,this.gctWidgets?.[a[0]]||{}),o=e.find(e=>e.id===a[1])||{}}else a.length&&(o=this.gctWidgets?.[a[0]]);s===l.OPEN_MODAL&&await this.$getModal(i).open({title:o?.props?.title}),s===l.CLOSE_MODAL&&(i?await this.$getModal(i).close():await this.$closeModal()),s===l.REFRESH_TABLE&&await(await this.$getCtxById(n).$asyncRef(i)).reload(e?e[0]:null)}function ea(e,t){const s=t.children||[];for(const i of s)i.type&&i.type==c.CustomButton?e.push(i):i.children?.length&&ea(e,i)}function ta({expression:e="",rowData:t=null},s){if(!e||"true"===e)return void s(!0);const i=xr(e),n=i.reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),r=O(()=>i.reduce((e,s)=>{const i=s.split("."),n=i[0]+"",r=i[1];if(r){const s=(t?t[r]:Rr.value[n]?.[r])??"";e[n]?e[n][r]=s:e[n]={[r]:s}}else n.startsWith("$VAR_")||n.startsWith("$IVAR_")?e[n]=_r.value[n]?.value??"":(n.startsWith("$PAGERVAR_")||n.startsWith("$IPAGERVAR_"))&&(e[n]=Mr.value[n]?.value??"");return e},{}));function a(t){const i={};Object.keys(n).forEach(e=>{const{formKey:s,itemKey:r}=n[e];i[e]=r?t[s]?.[r]:t[s]}),Er(e,i).then(s)}t&&a(r.value),nr(r,()=>{a(r.value)},{debounce:200,immediate:!t})}async function sa({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const s=xr(e).reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),i={};return Object.keys(s).forEach(e=>{const{formKey:n,itemKey:r}=s[e];let a="";a=n.startsWith("$VAR_")?_r.value[n]?.value??"":n.startsWith("$PAGERVAR_")?Mr.value[n]?.value??"":r?(t?t[r]:Rr.value[n]?.[r])??"":(t?t[n]:Rr.value[n])??"",i[e]=a}),Er(e,i)}function ia(e,t){return!!Kr(t)&&(e.displayType===n.CONFIG?se(()=>!e.hidden):function(e){const t=Q(!1);return na(e,e=>{t.value=!!e}),t}(e))}function na({displayRule:e,tableForm:t},s){if(e){const i=xr(e),n=i.reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),r=se(()=>i.reduce((e,s)=>{const i=s.split("."),n=i[0]+"",r=i[1]+"",a={...t,...Rr.value}[n]?.[r];return e[n]?e[n][r]=a:e[n]={[r]:a},e},{}));nr(r,()=>{!function(e,t,s,i){const n={};Object.keys(t).forEach(s=>{const{formKey:i,itemKey:r}=t[s];n[s]=e?.[i]?.[r]}),Er(s,n).then(i)}(r.value,n,e,e=>{s(e)})},{immediate:!0,debounce:300})}else s(!0)}function ra(e,t){const s=W({});return se(()=>e?e.filter(e=>{const{displayRule:i,hidden:r,displayType:a}=e.props||e;return Kr(e.id)?a===n.CONFIG?s[e.id]=!r:na({displayRule:i,tableForm:t},t=>{s[e.id]=t}):s[e.id]=!1,s[e.id]}):[])}function aa(e,t){if(!e?.length)return;const s=[],i=[];e.forEach((e,t)=>{e.displayRule?i.push({...e,id:t}):s.push({...e,id:t})});const n=oa(i,t),r=oa(s,t);return se(()=>n?.value||r?.value)}function oa(e,t){const s=W({});if(e)return se(()=>e.find(e=>{const{displayRule:i,hidden:r,displayType:a}=e.props||e;return a===n.CONFIG?s[e.id]=!r:na({displayRule:i,tableForm:t},t=>{s[e.id]=t}),s[e.id]}))}function ua(e){return e.props?.displayRule&&e.props?.displayType===n.RULE?ia(e.props,e.id):ca(e)}function ca(e,t){if(!e.id)return!1;if(!Kr(e.id))return e.props.hidden=!0,!1;const s=J("useProcessFieldEvent",void 0);if(s)return s.useFieldToShow(e),!e.props.hidden;const{displayType:r,displayRule:a}=e.props||{},{value:o,expression:u}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};return o&&u?(e.props.hidden=!0,ta({expression:u,rowData:t},t=>{e.props.hidden=!!t})):o?e.props.hidden=!0:r===n.RULE&&a&&(e.props.hidden=!0,ta({expression:a,rowData:t},t=>{e.props.hidden=!t})),se(()=>!e.props.hidden)}async function ha(e,t){if(!e.id)return!1;if(!Kr(e.id))return e.props.hidden=!0,!1;const s=J("useProcessFieldEvent",void 0);if(s)return s.useFieldToShow(e),!e.props.hidden;const{displayType:r,displayRule:a}=e.props||{},{value:o,expression:u}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};return o&&u?(e.props.hidden=!0,e.props.hidden=!!(await sa({expression:u,rowData:t}))):o?e.props.hidden=!0:r===n.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await sa({expression:a,rowData:t}))),!e.props.hidden}function la(e,t){return e.forEach(e=>{ca(e,t)}),se(()=>e.filter(e=>!e.props.hidden))}function pa(e,t){const{value:s,expression:n}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};s&&n&&ta({expression:n},e=>{t(e)}),t(e.props.hidden)}function da(e){const t=e.props.componentDependency?.configDependency||{},{value:s,expression:n}=t[i.HIDDEN]||{};s&&n&&ta({expression:n},t=>{e.props.hidden=!!t});const{value:r,expression:a}=t[i.REQUIRED]||{};r&&a&&ta({expression:a},t=>{e.props.required=!!t})}function ma(t,s={},n=!1){const{readonly:r,field:a,isFieldModel:o,bindFieldLink:u,refOriginField:c,refOriginModelKey:h,refOriginFieldType:l}=t.props,p=t.props.componentDependency?.configDependency||{},d=J("formReadonly",void 0),m=J("useProcessFieldEvent",void 0);if(m&&m.useFieldWidget(t),!m&&t.formItem&&void 0!==d?.value&&(t.props.readonly=d?.value||t.props.readonly),!m&&!d?.value){const e=p[i.READONLY]?.expression,a=p[i.READONLY]?.fieldValue,o=p[i.READONLY]?.value;!a&&o&&e&&ta({expression:e,rowData:n?s:null},e=>{t.props.readonly=!!e});const u=p[i.REQUIRED]?.expression,c=p[i.REQUIRED]?.value;!p[i.REQUIRED]?.fieldValue&&c&&u&&ta({expression:u,rowData:n?s:null},e=>{t.props.required=!!e,t.props.readonly=!e&&r});const h=p[i.DISABLED]?.expression;p[i.DISABLED]?.value&&h&&ta({expression:h,rowData:n?s:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&r})}const D=p[i.ASSIGNMENT]?.expression,f=p[i.ASSIGNMENT]?.strategy;D&&ta({expression:D,rowData:n?s:null},e=>{s[a]=e});const x=o?u?.join("."):a;s._OPCT||(s._OPCT={_DICT:{}});const E=O(()=>o?s._OPCT:s),g=O({get:()=>x?E.value[x]:"",set(t){D&&f===e.alwaysCover||(E.value[x]=t)}});if(o&&c){const e=se(()=>s[u[0]]),t=u.length>2?[u[1]+".*"]:void 0;nr(e,async()=>{try{const s=await wr({ids:e.value,refOriginField:u[0],refOriginFieldType:l,model:h,foreignFields:t});E.value[x]=s._OPCT[x],E.value._DICT||(E.value._DICT={}),E.value._DICT[x]=s._OPCT._DICT[x]}catch{for(const e in E.value)e.startsWith(x)&&(E.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:g,formRowData:E,fieldKey:x}}function Da(e){const{readonly:t}=e.props,s=e.props.componentDependency?.configDependency||{},n=s[i.REQUIRED]?.expression,r=s[i.REQUIRED]?.value;!s[i.REQUIRED]?.fieldValue&&r&&n&&ta({expression:n},s=>{e.props.required=!!s,e.props.readonly=!s&&t})}var fa=class{context={}},xa=class{isDestroy=!1},Ea=class{state=new xa;constructor(e){this.model=e}mounted(){}destroy(){}},ga=class extends Ea{},ya=class extends Ea{},Ca=class{state=new fa;prefix="";preview=!1;item=/* @__PURE__ */new Map;nodes=[];tree=[];setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=be.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===B.CONTAINER)return void this.item.set(e.id,new ga(e));if(t.mode===B.ITEM)return void this.item.set(e.id,new ya(e))}this.item.set(e.id,new Ea(e))})}getNodes(e){if(e){const t=this.getTreeItem(e);return t&&t.children?t.children.map(e=>this.nodes.find(t=>e.id===t.id)):[]}return this.tree.map(e=>this.nodes.find(t=>e.id===t.id))}getTreeItem(e,t=this.tree){if(!e)return null;for(const s of t){if(s.id===e)return s;if(s.children&&s.children.length>0){const t=this.getTreeItem(e,s.children);if(t)return t}}return null}getController(e){return this.item.get(e)}mounted(){}unmounted(){this.reset()}reset(){this.nodes=[],this.item.forEach(e=>{e.destroy()})}};function Aa(e){let t=J(we.DESIGN_RENDER);return t||(t=e?e():new Ca,t.state=W(t.state),H(we.DESIGN_RENDER,t),Y(()=>{t.mounted()}),G(()=>{t.unmounted()})),t}function Fa(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new fe}var wa=new URL("./index.min.css",import.meta.url);m.load(wa.href);export{qr as Context,we as ControllerType,Ee as DESIGN_DATA_KEY_TAG,xe as DESIGN_TYPE,ye as DateRangeMap,ge as DesignItemAttribute,Se as DesignRenderViewPrefix,Wr as Events,Ne as FieldSchema,Qr as GctComponent,Jr as Globals,br as HandwritingPad,Pr as PageTypeEnum,be as RenderNodeRegister,ke as RenderNodeType,fe as RenderRegister,_e as addDataByForm,Er as calculate,sa as calculateDepResult,ca as dependencyToShow,ha as dependencyToShowSync,Rr as formMap,Fe as getDefaultDate,Ce as getDisabledDate,Ae as getMobileDateRange,zr as getPageTitle,Kr as getPremission,wr as getRefInfoId,_r as globalVarCaches,xr as identify,Pe as initFieldWidgetRuntime,ta as insetDep,Fa as onInit,Lr as pageDataforJson,Mr as pageGlobaVariables,Ie as schemaToStyle,Re as setDataByForm,Ur as setFormData,da as tableWidgetByDept,pa as tableWidgetToShow,Ue as transSelectData,Me as transformData,Le as transformDataToDict,Be as transformPropsField,Oe as transformSourceData,ma as useDependency,Da as useDependencyByRequired,ua as useDependencyToShow,la as useDependencyToShowList,Aa as useDesignRenderController,aa as useDisplayRuleColumnByStyles,ra as useDisplayRuleOptions,Tr as useGctSelect,Te as useStyle,ia as useVisibileByRuleHook};
|
|
1
|
+
import{ASSIGNMENTSTRATEGY_ENUM as e,BizServiceEnum as t,ButtonTypeEnum as s,Dependency_ENUM as i,DisplayType as n,EntityModelCategoryEnum as r,ExamineAndApproveStateEnum as a,FIELD_TYPE as o,FieldSysVarDefaultValueEnum as u,FormComponents as c,GLOBAL_VAR_TYPE as h,INNER_EVENT as l,OpinionTypeEnum as p,PluginModeEnum as d,PluginPgkUtil as m,SYSTEM_VAR_PREFIX as D,cssLoader as f,functionMap as x,innerVarIds as E,operator2FuncMap as g,t as y,usePermissionStore as C}from"@gct-paas/core";import A from"dayjs";import*as F from"lodash-es";import{cloneDeep as w,differenceBy as S,get as k,isEqual as b,isNull as v,isUndefined as B,merge as T}from"lodash-es";import I from"bignumber.js";import{computed as N,createElementBlock as P,createElementVNode as O,customRef as M,defineComponent as _,getCurrentInstance as R,getCurrentScope as U,inject as L,nextTick as z,onActivated as J,onBeforeUnmount as K,onMounted as X,onScopeDispose as $,onUnmounted as Y,openBlock as j,provide as G,reactive as V,readonly as H,ref as W,shallowReactive as q,shallowRef as Q,toRaw as Z,toRef as ee,toValue as te,unref as se,watch as ie}from"vue";import{DesignNodeMode as ne,extractFontStyle as re,generateWrapperStyle as ae,propsToStyle as oe}from"@gct-paas/schema";import ue from"qs";var ce,he=Object.create,le=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,de=Object.getOwnPropertyNames,me=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xe=(e,t)=>{let s={};for(var i in e)le(s,i,{get:e[i],enumerable:!0});return t||le(s,Symbol.toStringTag,{value:"Module"}),s},Ee=(e,t,s)=>(s=null!=e?he(me(e)):{},((e,t,s,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var n,r=de(t),a=0,o=r.length;a<o;a++)n=r[a],De.call(e,n)||void 0===n||le(e,n,{get:(e=>t[e]).bind(null,n),enumerable:!(i=pe(t,n))||i.enumerable});return e})(!t&&e&&e.__esModule?s:le(s,"default",{value:e,enumerable:!0}),e)),ge=class{map=/* @__PURE__ */new Map;register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}},ye="view-design",Ce="id",Ae=/* @__PURE__ */function(e){return e.ACTIVE_TAG="design-active-item",e.DRAG_TAG="design-drop-item",e.INDEX_TAG="design-item-index",e.NODE_ID_TAG="design-item-id",e.DESIGN_NAME="design-item-name",e.GROUP_TAG="design-group-tag",e.DRAG_GROUP_TYPE="drag-group-type",e.IS_INLINE_BLOCK="is-inline-block",e.SELECTOR_INDEX="selector-index",e}({}),Fe={WEEK_NOW:e=>{const t=A().startOf("week").add(1,"day"),s=A().endOf("week").add(1,"day"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},MONTH_NOW:e=>{const t=A().startOf("month"),s=A().endOf("month"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},QUARTER_NOW:e=>{const t=A().startOf("quarter"),s=A().endOf("quarter"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},YEAR_NOW:e=>{const t=A().startOf("year"),s=A().endOf("year"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},WEEk_BEFORE:e=>{A.locale("zh-cn");const t=A().startOf("week").subtract(1,"week"),s=t.clone().endOf("week"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},MONTH_BEFORE:e=>{const t=A().add(-1,"month").startOf("month"),s=A().add(-1,"month").endOf("month"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},QUARTER_BEFORE:e=>{const t=A().add(-1,"quarter").startOf("quarter"),s=A().add(-1,"quarter").endOf("quarter"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},YEAR_BEFORE:e=>{const t=A().add(-1,"year").startOf("year"),s=A().add(-1,"year").endOf("year"),i=t.valueOf(),n=s.valueOf();return{disabled:e<i||e>n,minDate:t,maxDate:s}},DATE_BEFORE:e=>{const t=A().add(-1,"day");return{disabled:e<t.valueOf(),maxDate:t}},DATE_AFTER:e=>{const t=A();return{disabled:e>t.valueOf(),minDate:t}}},we=(e,t)=>{const s=A(e).valueOf(),i=Fe[t];if(i){const{disabled:e}=i(s);return e}return!1},Se=e=>{const t=Fe[e];if(t){const{minDate:e,maxDate:s}=t(0);return Object.assign({},e&&{minDate:new Date(e)},s&&{maxDate:new Date(s)})}return{}},ke=(e,t)=>{let s;switch(e){case u.SYS_DATE:s=A().format(t??"YYYY-MM-DD");break;case u.SYS_DATE_TIME:s=A().format(t??"YYYY-MM-DD HH:mm:ss");break;case u.SYS_TIME:s=A().format(t??"HH:mm:ss")}return s},be=/* @__PURE__ */function(e){return e.DESIGN_RENDER="design-render",e}({}),ve=/* @__PURE__ */function(e){return e.CUSTOM_HOME="custom-home",e.CARD_VIEW="card-view",e.MOBILE_CARD_VIEW="mobile-card-view",e.DESIGN_EDITOR="design-editor",e}({}),Be=/* @__PURE__ */function(e){return e.PAGE="PAGE",e.PAGE_LOWER="page",e.FIELD="field",e.PANEL="panel",e.TABS="tabs",e.TAB_ITEM="tab-item",e.MENU_LIST="menu-list",e.SELECT_COMPONENT="select-component",e.GRID="grid",e.GRID_ITEM="grid-item",e.MESSAGE="message",e.WORKBENCH="workbench",e.PERSONAL_CENTER="personal-center",e.TODO="todo",e}({}),Te=class{static map=/* @__PURE__ */new Map;static cache=/* @__PURE__ */new Map;static register(e,t,s){const i=s?`${s}:${e}`:e;this.map.set(i,t)}static get(e,t){const s=t?`${t}:${e}`:e;if(this.cache.has(s))return this.cache.get(s);const i=this.map.get(s);if(i){const e=i();return this.cache.set(s,e),e}return null}static registerCustomHome(e,t){this.register(e,t,ve.CUSTOM_HOME)}static registerDesignEditorNode(e,t){this.register(e,t,ve.DESIGN_EDITOR)}static getCustomHome(e){return this.get(e,ve.CUSTOM_HOME)}static getDesignEditorNode(e){return this.get(e,ve.DESIGN_EDITOR)}},Ie=/* @__PURE__ */fe((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_utc=i()}(e,function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,n,r){var a=n.prototype;r.utc=function(e){return new n({date:e,utc:!0,args:arguments})},a.utc=function(t){var s=r(this.toDate(),{locale:this.$L,utc:!0});return t?s.add(this.utcOffset(),e):s},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(i,n){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var n=(""+i[0]).match(s)||["-",0,0],r=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===r?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i;if(0===a)return this.utc(n);var o=this.clone();if(n)return o.$offset=a,o.$u=!1,o;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(a+u,e)).$offset=a,o.$x.$localOffset=u,o};var h=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var l=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var p=a.diff;a.diff=function(e,t,s){if(e&&this.$u===e.$u)return p.call(this,e,t,s);var i=this.local(),n=r(e).local();return p.call(i,n,t,s)}}})}),Ne=/* @__PURE__ */fe((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_timezone=i()}(e,function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(s,i,n){var r,a=function(e,s,i){void 0===i&&(i={});var n=new Date(e);return function(e,s){void 0===s&&(s={});var i=s.timeZoneName||"short",n=e+"|"+i,r=t[n];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[n]=r),r}(s,i).formatToParts(n)},o=function(t,s){for(var i=a(t,s),r=[],o=0;o<i.length;o+=1){var u=i[o],c=u.type,h=u.value,l=e[c];l>=0&&(r[l]=parseInt(h,10))}var p=r[3],d=24===p?0:p,m=r[0]+"-"+r[1]+"-"+r[2]+" "+d+":"+r[4]+":"+r[5]+":000",D=+t;return(n.utc(m).valueOf()-(D-=D%1e3))/6e4},u=i.prototype;u.tz=function(e,t){void 0===e&&(e=r);var s,i=this.utcOffset(),a=this.toDate(),o=a.toLocaleString("en-US",{timeZone:e}),u=Math.round((a-new Date(o))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-u;if(Number(c)){if(s=n(o,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var h=s.utcOffset();s=s.add(i-h,"minute")}}else s=this.utcOffset(0,t);return s.$x.$timezone=e,s},u.offsetName=function(e){var t=this.$x.$timezone||n.tz.guess(),s=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return s&&s.value};var c=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var s=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(s,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,s){var i=s&&t,a=s||t||r,u=o(+n(),a);if("string"!=typeof e)return n(e).tz(a);var c=function(e,t,s){var i=e-60*t*1e3,n=o(i,s);if(t===n)return[i,t];var r=o(i-=60*(n-t)*1e3,s);return n===r?[i,n]:[e-60*Math.min(n,r)*1e3,Math.max(n,r)]}(n.utc(e,i).valueOf(),u,a),h=c[0],l=c[1],p=n(h).utcOffset(l);return p.$x.$timezone=a,p},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(e){r=e}}})}),Pe=/* @__PURE__ */fe((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_quarterOfYear=i()}(e,function(){var e="month",t="quarter";return function(s,i){var n=i.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var r=n.add;n.add=function(s,i){return s=Number(s),this.$utils().p(i)===t?this.add(3*s,e):r.bind(this)(s,i)};var a=n.startOf;n.startOf=function(s,i){var n=this.$utils(),r=!!n.u(i)||i;if(n.p(s)===t){var o=this.quarter()-1;return r?this.month(3*o).startOf(e).startOf("day"):this.month(3*o+2).endOf(e).endOf("day")}return a.bind(this)(s,i)}}})}),Oe=/* @__PURE__ */fe((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}:"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_toArray=function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}(e,function(){return function(e,t){t.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}})}),Me=/* @__PURE__ */fe((e,t)=>{!function(s,i){"object"==typeof e&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):(s="undefined"!=typeof globalThis?globalThis:s||self).dayjs_plugin_isoWeek=i()}(e,function(){var e="day";return function(t,s,i){var n=function(t){return t.add(4-t.isoWeekday(),e)},r=s.prototype;r.isoWeekYear=function(){return n(this).year()},r.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var s,r,a,o=n(this),u=(s=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(s).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,e));return o.diff(u,"week")+1},r.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=r.startOf;r.startOf=function(e,t){var s=this.$utils(),i=!!s.u(t)||t;return"isoweek"===s.p(e)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(e,t)}}})}),_e=/* @__PURE__ */xe({ABS:()=>vt,ADD:()=>ft,AND:()=>je,AVERAGE:()=>bt,CONCAT:()=>tt,COUNT:()=>os,DATE2TIMESTAMP:()=>Ut,DATEFORMAT:()=>Lt,DAY:()=>$t,DIVISION:()=>gt,EQ:()=>Ve,FINDSTR:()=>lt,FIXED:()=>yt,GE:()=>Qe,GET:()=>Pt,GT:()=>Ze,HEADPUSH:()=>_t,HOUR:()=>Yt,IF:()=>Ke,ISDATERANGE:()=>ts,ISEMPTY:()=>Xe,ISNULL:()=>$e,ISTIMERANGE:()=>ss,ISUNDEFINED:()=>Ye,LARGE:()=>wt,LASTMONTHRANGE:()=>Wt,LASTQUARTER:()=>es,LASTWEEKRANGE:()=>Vt,LASTYEARRANGE:()=>Qt,LE:()=>We,LEN:()=>et,LOWER:()=>rt,LT:()=>qe,LTRIM:()=>ot,MAX:()=>Ft,MIN:()=>St,MINUTE:()=>jt,MOD:()=>Bt,MONTH:()=>Xt,MONTHRANGE:()=>Ht,MULTIPLICATION:()=>Et,NE:()=>He,NOW:()=>zt,OR:()=>Ge,PARSENUMBER:()=>dt,POWER:()=>It,PUSH:()=>Mt,PUT:()=>Ot,QUARTER:()=>Zt,REDUCE:()=>xt,REPEAT:()=>ct,REPLACE:()=>ht,ROUND:()=>Ct,ROUNDUP:()=>At,RTRIM:()=>ut,SEARCHSTR:()=>pt,SEQMAP:()=>rs,SMALL:()=>kt,SPLIT:()=>mt,SQRT:()=>Nt,STDEV:()=>us,SUBSTR:()=>it,SUBSTRING:()=>st,SUM:()=>Dt,SUMSQ:()=>as,TIMESTAMP2DATE:()=>Rt,TODAY:()=>Jt,TRIM:()=>at,TUPLE:()=>ns,UPPER:()=>nt,WEEKRANGE:()=>Gt,YEAR:()=>Kt,YEARRANGE:()=>qt}),Re=/* @__PURE__ */Ee(Ie(),1),Ue=/* @__PURE__ */Ee(Ne(),1),Le=/* @__PURE__ */Ee(Pe(),1),ze=/* @__PURE__ */Ee(Oe(),1),Je=/* @__PURE__ */Ee(Me(),1);function Ke(e,t,s){return e?t:s}function Xe(e){return null==e||""===e||0===e}function $e(e){return v(e)}function Ye(e){return B(e)}function je(...e){return(()=>{for(const t of e)if(!t)return!1;return!0})()}function Ge(...e){return e.some(e=>e)}function Ve(e,t){return b(e,t)}function He(e,t){return e!==t}function We(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<=t}function qe(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e<t}function Qe(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>=t}function Ze(e,t){return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||e instanceof Date&&t instanceof Date)&&e>t}function et(e){return e?.length||0}function tt(...e){return e.join("")}function st(e="",t,s){return(()=>{const i=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(s)+Number(t>=0));return t<0?[...i].reverse().join(""):i})()}function it(e="",t,s){return(()=>{const i=(t<0?[...e].reverse().join(""):e).slice(Math.abs(t+Number(t<0)),Math.abs(t+Number(t<0))+Math.abs(s));return t<0?[...i].reverse().join(""):i})()}function nt(e=""){return e.toUpperCase()}function rt(e=""){return e.toLowerCase()}function at(e=""){return e.trim()}function ot(e=""){return e.replace(/^\s\s*/,"")}function ut(e=""){return e.replace(/\s\s*$/,"")}function ct(e="",t=""){return e.match(new RegExp(t,"g"))?.length||null}function ht(e="",t="",s=""){return e.replace(new RegExp(t,"g"),s)}function lt(e="",t=""){return e.includes(t)}function pt(e="",t=""){return(()=>{const s=e.match(new RegExp(t,"g"))?.length;return s||0})()}function dt(e=""){return(()=>{const t=parseFloat(e);return isNaN(t)?null:t})()}function mt(e="",t=""){return e.split(t)}function Dt(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?t.reduce(cs,0):""}function ft(...e){return e.flat().reduce(cs,0)}function xt(e,...t){return t.reduce(hs,e)}function Et(e,...t){const s=t.flat().filter(e=>""!==e&&null!=e);return s.length?s.reduce(ls,e):""}function gt(e,...t){return t.reduce(ps,e)}function yt(e,t){return(()=>{if(t<0)throw new Error("Decimal places should be non-negative.");const[s,i=""]=e.toString().split(".");if(0==t)return s;let n=i.split("");if(n.length>t)n=n.slice(0,t);else{const e=n.length;for(let s=0;s<t-e;s++)n.push("0")}return`${s}.${n.join("")}`})()}function Ct(e,t){return(()=>{if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");const s=Math.trunc(t),i=Number(e);if(isNaN(i))return"";const n=i>0?(+(Math.round(Number(i+`e${s}`))+`e-${s}`)).toFixed(s):-(+(Math.round(Number(-i+`e${s}`))+`e-${s}`)).toFixed(s);return parseFloat(n+"")})()}function At(e,t){if(null===e||""===e||void 0===e)return"";if(t<0)throw new Error("Decimal places should be non-negative.");return t=t?parseInt(t+""):0,new I(e).decimalPlaces(t,I.ROUND_UP).toNumber()}function Ft(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.max.apply(null,t):""}function wt(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>t-e)[t-1]})()}function St(...e){const t=e.flat().filter(e=>""!==e&&null!=e);return t.length?Math.min.apply(null,t):""}function kt(e,t){return(()=>{if(t<1||t>e.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return e.sort((e,t)=>e-t)[t-1]})()}function bt(...e){const t=e.flat().filter(e=>""!==e&&null!=e),s=t.length;if(!s)return"";let i=new I(0);for(const n of t)i=i.plus(n);return i.dividedBy(s).toNumber()}function vt(e){return Math.abs.call(null,e)}function Bt(e,t){return(()=>{if(0===e)throw new Error("The second value should not be zero.");const s=new I(e).mod(t).toNumber();return isNaN(s)?"":s})()}function Tt(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e){const t=e.trim();if(""===t)return null;const s=Number(t);return Number.isFinite(s)?s:null}if("bigint"==typeof e){const t=Number(e);return Number.isFinite(t)?t:null}return null}function It(e,t){return(()=>{const s=Tt(e),i=Tt(t);return null===s||null===i?NaN:Math.abs(i)>1e9?i>0?1/0:0:Math.pow(s,i)})()}function Nt(e){return(()=>{const t=Tt(e);return null===t?NaN:Math.sqrt(t)})()}function Pt(e,t){return(()=>{if(Array.isArray(e)){if("number"==typeof t)return e[t];throw new Error("For arrays, the second argument should be a number.")}if("object"==typeof e){if("string"==typeof t)return e[t];throw new Error("For objects, the second argument (b) should be a string.")}throw new Error("Unsupported data type. The first argument (a) should be an array or an object.")})()}function Ot(e,t,s){return(()=>{if(Array.isArray(e)){if(!("number"==typeof t&&t>=0&&t<e.length))throw new Error("For arrays, the second argument (b) should be a number.");e[t]=s}else{if("object"!=typeof e)throw new Error("Unsupported data type. The first argument (a) should be an array or an object.");if("string"!=typeof t||!e)throw new Error("For objects, the second argument (b) should be a string.");e[t]=s}return e})()}function Mt(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.push(t),e})()}function _t(e,t){return(()=>{if(!t)throw new Error("For arrays, the second argument should not be null or undefined");return e.unshift(t),e})()}function Rt(e){if(e)return(()=>{if(!e)throw new Error("the frist argument should not be null");const t=/* @__PURE__ */new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})()}function Ut(e){if(e)return A(e).unix()}function Lt(e,t){if(e)return A(e).format(t)}function zt(){return A().format("YYYY-MM-DD HH:MM:ss")}function Jt(){return A().format("YYYY-MM-DD")}function Kt(e){return A(e).year()}function Xt(e){return A(e).month()}function $t(e){return A(e).day()}function Yt(e){return A(e).hour()}function jt(e){return A(e).minute()}function Gt(){return[is(A().startOf("week").toDate()),is(A().endOf("week").toDate())]}function Vt(){return[is(A().subtract(1,"week").startOf("week").toDate()),is(A().subtract(1,"week").endOf("week").toDate())]}function Ht(){return[is(A().startOf("month").toDate()),is(A().endOf("month").toDate())]}function Wt(){return[is(A().subtract(1,"month").startOf("month").toDate()),is(A().subtract(1,"month").endOf("month").toDate())]}function qt(){return[is(A().startOf("year").toDate()),is(A().endOf("year").toDate())]}function Qt(){return[is(A().subtract(1,"year").startOf("year").toDate()),is(A().subtract(1,"year").endOf("year").toDate())]}function Zt(){return(()=>{const e=Math.floor((A().month()+3)/3);return[is(A().quarter(e).startOf("quarter").toDate()),is(A().quarter(e).endOf("quarter").toDate())]})()}function es(){return(()=>{const e=Math.floor((A().month()+3)/3);return[is(A().quarter(e-1).startOf("quarter").toDate()),is(A().quarter(e-1).endOf("quarter").toDate())]})()}function ts(e,t){return(()=>{const[s,i]=t;return e>=s&&e<=i})()}function ss(e,t){return(()=>{const[s,i]=t,n=A(e,"HH:mm");if(s>i){const e=A(s,"HH:mm"),t=A(i,"HH:mm").add(1,"day");return n>=e||n<=t}return n>=A(s,"HH:mm")&&n<=A(i,"HH:mm")})()}function is(e){return A(e).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function ns(...e){return[...e]}function rs(...e){const t=(e.length-e.length%2)/2,s={};return Array(t).forEach(t=>{const i=e[2*t];s[i]=e[2*t+1]}),s}function as(...e){return 0===(e=e.flat().filter(e=>""!==e&&null!=e)).length?"":e.map(e=>{const t=ls(e,e);return""!==t?t:new I(0).toNumber()}).reduce((e,t)=>cs(e,t)||I(0).toNumber(),new I(0).toNumber())}function os(e){return Array.isArray(e)?e.length:""}function us(...e){const t=e.flat().map(e=>Number(e)).filter(e=>Number.isFinite(e));if(t.length<2)return"";const s=t.reduce((e,t)=>e+t,0)/t.length,i=t.reduce((e,t)=>{const i=t-s;return e+i*i},0)/(t.length-1);return Math.sqrt(i)}function cs(e,t){const s=new I(e).plus(new I(t)).toNumber();return isNaN(s)?"":s}function hs(e,t){const s=new I(e).minus(new I(t)).toNumber();return isNaN(s)?"":s}function ls(e,t){const s=new I(e).multipliedBy(new I(t)).toNumber();return isNaN(s)?"":s}function ps(e,t){const s=new I(e).div(new I(t)).toNumber();return isNaN(s)?"":s}A.extend(Re.default),A.extend(Ue.default),A.extend(Le.default),A.extend(ze.default),A.extend(Je.default),function(e){e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AwaitExpression="AwaitExpression",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ChainExpression="ChainExpression",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.DebuggerStatement="DebuggerStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForStatement="ForStatement",e.ForOfStatement="ForOfStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportAttribute="ImportAttribute",e.ImportExpression="ImportExpression",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.Literal="Literal",e.LabeledStatement="LabeledStatement",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.PrivateIdentifier="PrivateIdentifier",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression"}(ce||(ce={}));var ds,ms=class{constructor(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}insertInnerComments(e,t){if(e.type===ce.BlockStatement&&0===e.body.length){const s=[];for(let e=this.leading.length-1;e>=0;--e){const i=this.leading[e];t.end.offset>=i.start&&(s.unshift(i.comment),this.leading.splice(e,1),this.trailing.splice(e,1))}s.length&&(e.innerComments=s)}}findTrailingComments(e){let t=[];if(this.trailing.length>0){for(let s=this.trailing.length-1;s>=0;--s){const i=this.trailing[s];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}const s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){const i=s.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=s.node.trailingComments,delete s.node.trailingComments)}return t}findLeadingComments(e){const t=[];let s;for(;this.stack.length>0;){const t=this.stack[this.stack.length-1];if(!(t&&t.start>=e.start.offset))break;s=t.node,this.stack.pop()}if(s){for(let i=(s.leadingComments?s.leadingComments.length:0)-1;i>=0;--i){const n=s.leadingComments[i];n.range[1]<=e.start.offset&&(t.unshift(n),s.leadingComments.splice(i,1))}return s.leadingComments&&0===s.leadingComments.length&&delete s.leadingComments,t}for(let i=this.leading.length-1;i>=0;--i){const s=this.leading[i];s.start<=e.start.offset&&(t.unshift(s.comment),this.leading.splice(i,1))}return t}visitNode(e,t){if(e.type===ce.Program&&e.body.length>0)return;this.insertInnerComments(e,t);const s=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),s.length>0&&(e.trailingComments=s),this.stack.push({node:e,start:t.start.offset})}visitComment(e,t){const s="L"===e.type[0]?"Line":"Block",i={type:s,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){const i={comment:{type:s,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=s,this.leading.push(i),this.trailing.push(i)}}visit(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)}},Ds={NonAsciiIdentifierStart:/[\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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-\u170C\u170E-\u1711\u1720-\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-\u1B4B\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\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-\uAB67\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},fs={fromCodePoint:e=>e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023)),isStringWellFormedUnicode(e){for(let t=0;t<e.length;t++){let s=e.charCodeAt(t);if(s>=55296&&s<=56319){if(t===e.length-1)return!1;if(t++,s=e.charCodeAt(t),s<56320&&s>57343)return!1}else if(s>=56320&&s<=57343)return!1}return!0},isWhiteSpace:e=>32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0,isLineTerminator:e=>10===e||13===e||8232===e||8233===e,isIdentifierStart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Ds.NonAsciiIdentifierStart.test(fs.fromCodePoint(e)),isIdentifierPart:e=>36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Ds.NonAsciiIdentifierPart.test(fs.fromCodePoint(e)),isDecimalDigit:e=>e>=48&&e<=57,isDecimalDigitChar:e=>1===e.length&&fs.isDecimalDigit(e.charCodeAt(0)),isHexDigit:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,isHexDigitChar:e=>1===e.length&&fs.isHexDigit(e.charCodeAt(0)),isOctalDigit:e=>e>=48&&e<=55,isOctalDigitChar:e=>1===e.length&&fs.isOctalDigit(e.charCodeAt(0))};!function(e){e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXNamespacedName="JSXNamespacedName",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXText="JSXText"}(ds||(ds={}));var xs=class{constructor(e){this.type=ds.JSXClosingElement,this.name=e}},Es=class{constructor(){this.type=ds.JSXClosingFragment}},gs=class{constructor(e,t,s){this.type=ds.JSXElement,this.openingElement=e,this.children=t,this.closingElement=s}},ys=class{constructor(){this.type=ds.JSXEmptyExpression}},Cs=class{constructor(e){this.type=ds.JSXExpressionContainer,this.expression=e}},As=class{constructor(e){this.type=ds.JSXIdentifier,this.name=e}},Fs=class{constructor(e,t){this.type=ds.JSXMemberExpression,this.object=e,this.property=t}},ws=class{constructor(e,t){this.type=ds.JSXAttribute,this.name=e,this.value=t}},Ss=class{constructor(e,t){this.type=ds.JSXNamespacedName,this.namespace=e,this.name=t}},ks=class{constructor(e,t,s){this.type=ds.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=s}},bs=class{constructor(e){this.type=ds.JSXOpeningFragment,this.selfClosing=e}},vs=class{constructor(e){this.type=ds.JSXSpreadAttribute,this.argument=e}},Bs=class{constructor(e,t){this.type=ds.JSXText,this.value=e,this.raw=t}},Ts=class{constructor(e){this.type=ce.ArrayExpression,this.elements=e}},Is=class{constructor(e){this.type=ce.ArrayPattern,this.elements=e}},Ns=class{constructor(e,t,s,i){this.type=ce.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=s,this.async=i}},Ps=class{constructor(e,t,s){this.type=ce.AssignmentExpression,this.operator=e,this.left=t,this.right=s}},Os=class{constructor(e,t){this.type=ce.AssignmentPattern,this.left=e,this.right=t}},Ms=class{constructor(e,t,s,i){this.type=ce.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=!0}},_s=class{constructor(e){this.type=ce.AwaitExpression,this.argument=e}},Rs=class{constructor(e,t,s){this.type=ce.Literal,this.value=e,this.raw=t,this.bigint=s}},Us=class{constructor(e,t,s){this.type=ce.BinaryExpression,this.operator=e,this.left=t,this.right=s}},Ls=class{constructor(e){this.type=ce.BlockStatement,this.body=e}},zs=class{constructor(e){this.type=ce.BreakStatement,this.label=e}},Js=class{constructor(e,t,s){this.type=ce.CallExpression,this.callee=e,this.arguments=t,this.optional=s}},Ks=class{constructor(e,t){this.type=ce.CatchClause,this.param=e,this.body=t}},Xs=class{constructor(e){this.type=ce.ChainExpression,this.expression=e}},$s=class{constructor(e){this.type=ce.ClassBody,this.body=e}},Ys=class{constructor(e,t,s,i){this.type=ce.ClassDeclaration,this.id=e,this.superClass=t,this.body=s,this.decorators=i}},js=class{constructor(e,t,s,i){this.type=ce.ClassExpression,this.id=e,this.superClass=t,this.body=s,this.decorators=i}},Gs=class{constructor(e,t,s){this.type=ce.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=s}},Vs=class{constructor(e){this.type=ce.ContinueStatement,this.label=e}},Hs=class{constructor(){this.type=ce.DebuggerStatement}},Ws=class{constructor(e){this.type=ce.Decorator,this.expression=e}},qs=class{constructor(e,t){this.type=ce.ExpressionStatement,this.expression=e,this.directive=t}},Qs=class{constructor(e,t){this.type=ce.DoWhileStatement,this.body=e,this.test=t}},Zs=class{constructor(){this.type=ce.EmptyStatement}},ei=class{constructor(e,t,s){this.type=ce.ExportAllDeclaration,this.source=e,this.exported=t,this.assertions=s}},ti=class{constructor(e){this.type=ce.ExportDefaultDeclaration,this.declaration=e}},si=class{constructor(e,t,s,i){this.type=ce.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=s,this.assertions=i}},ii=class{constructor(e,t){this.type=ce.ExportSpecifier,this.exported=t,this.local=e}},ni=class{constructor(e){this.type=ce.ExpressionStatement,this.expression=e}},ri=class{constructor(e,t,s){this.type=ce.ForInStatement,this.left=e,this.right=t,this.body=s,this.each=!1}},ai=class{constructor(e,t,s,i){this.type=ce.ForOfStatement,this.await=i,this.left=e,this.right=t,this.body=s}},oi=class{constructor(e,t,s,i){this.type=ce.ForStatement,this.init=e,this.test=t,this.update=s,this.body=i}},ui=class{constructor(e,t,s,i){this.type=ce.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=!1}},ci=class{constructor(e,t,s,i,n){this.type=ce.FunctionExpression,this.id=e,this.params=t,this.body=s,this.generator=i,this.expression=!1,this.async=n}},hi=class{constructor(e){this.type=ce.Identifier,this.name=e}},li=class{constructor(e,t,s){this.type=ce.IfStatement,this.test=e,this.consequent=t,this.alternate=s}},pi=class{constructor(e,t){this.type=ce.ImportAttribute,this.key=e,this.value=t}},di=class{constructor(e,t){this.type=ce.ImportExpression,this.source=e,this.attributes=t}},mi=class{constructor(e,t,s){this.type=ce.ImportDeclaration,this.specifiers=e,this.source=t,this.assertions=s}},Di=class{constructor(e){this.type=ce.ImportDefaultSpecifier,this.local=e}},fi=class{constructor(e){this.type=ce.ImportNamespaceSpecifier,this.local=e}},xi=class{constructor(e,t){this.type=ce.ImportSpecifier,this.local=e,this.imported=t}},Ei=class{constructor(e,t){this.type=ce.LabeledStatement,this.label=e,this.body=t}},gi=class{constructor(e,t){this.type=ce.Literal,this.value=e,this.raw=t}},yi=class{constructor(e,t,s){this.type=ce.LogicalExpression,this.operator=e,this.left=t,this.right=s}},Ci=class{constructor(e,t,s,i){this.type=ce.MemberExpression,this.computed=e,this.object=t,this.property=s,this.optional=i}},Ai=class{constructor(e,t){this.type=ce.MetaProperty,this.meta=e,this.property=t}},Fi=class{constructor(e,t,s,i,n,r){this.type=ce.MethodDefinition,this.key=e,this.computed=t,this.value=s,this.kind=i,this.static=n,this.decorators=r}},wi=class{constructor(e){this.type=ce.Program,this.body=e,this.sourceType="module"}},Si=class{constructor(e,t){this.type=ce.NewExpression,this.callee=e,this.arguments=t}},ki=class{constructor(e){this.type=ce.ObjectExpression,this.properties=e}},bi=class{constructor(e){this.type=ce.ObjectPattern,this.properties=e}},vi=class{constructor(e){this.type=ce.PrivateIdentifier,this.name=e}},Bi=class{constructor(e,t,s,i,n,r){this.type=ce.Property,this.key=t,this.computed=s,this.value=i,this.kind=e,this.method=n,this.shorthand=r}},Ti=class{constructor(e,t,s,i,n){this.type=ce.Property,this.key=e,this.computed=t,this.value=s,this.static=i,this.decorators=n}},Ii=class{constructor(e,t,s,i){this.type=ce.Literal,this.value=e,this.raw=t,this.regex={pattern:s,flags:i}}},Ni=class{constructor(e){this.type=ce.RestElement,this.argument=e}},Pi=class{constructor(e){this.type=ce.ReturnStatement,this.argument=e}},Oi=class{constructor(e){this.type=ce.Program,this.body=e,this.sourceType="script"}},Mi=class{constructor(e){this.type=ce.SequenceExpression,this.expressions=e}},_i=class{constructor(e){this.type=ce.SpreadElement,this.argument=e}},Ri=class{constructor(e){this.type=ce.StaticBlock,this.body=e}},Ui=class{constructor(){this.type=ce.Super}},Li=class{constructor(e,t){this.type=ce.SwitchCase,this.test=e,this.consequent=t}},zi=class{constructor(e,t){this.type=ce.SwitchStatement,this.discriminant=e,this.cases=t}},Ji=class{constructor(e,t){this.type=ce.TaggedTemplateExpression,this.tag=e,this.quasi=t}},Ki=class{constructor(e,t){this.type=ce.TemplateElement,this.value=e,this.tail=t}},Xi=class{constructor(e,t){this.type=ce.TemplateLiteral,this.quasis=e,this.expressions=t}},$i=class{constructor(){this.type=ce.ThisExpression}},Yi=class{constructor(e){this.type=ce.ThrowStatement,this.argument=e}},ji=class{constructor(e,t,s){this.type=ce.TryStatement,this.block=e,this.handler=t,this.finalizer=s}},Gi=class{constructor(e,t){this.type=ce.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}},Vi=class{constructor(e,t,s){this.type=ce.UpdateExpression,this.operator=e,this.argument=t,this.prefix=s}},Hi=class{constructor(e,t){this.type=ce.VariableDeclaration,this.declarations=e,this.kind=t}},Wi=class{constructor(e,t){this.type=ce.VariableDeclarator,this.id=e,this.init=t}},qi=class{constructor(e,t){this.type=ce.WhileStatement,this.test=e,this.body=t}},Qi=class{constructor(e,t){this.type=ce.WithStatement,this.object=e,this.body=t}},Zi=class{constructor(e,t){this.type=ce.YieldExpression,this.argument=e,this.delegate=t}};function en(e,t){if(!e)throw new Error("ASSERT: "+t)}var tn=class{constructor(){this.errors=[],this.tolerant=!1}recordError(e){this.errors.push(e)}tolerate(e){if(!this.tolerant)throw e;this.recordError(e)}constructError(e,t){let s=new Error(e);try{throw s}catch(i){Object.create&&Object.defineProperty&&(s=Object.create(i),Object.defineProperty(s,"column",{value:t}))}return s}createError(e,t,s,i){const n="Line "+t+": "+i,r=this.constructError(n,s);return r.index=e,r.lineNumber=t,r.description=i,r}throwError(e,t,s,i){throw this.createError(e,t,s,i)}tolerateError(e,t,s,i){const n=this.createError(e,t,s,i);if(!this.tolerant)throw n;this.recordError(n)}},sn="Duplicate parameter name not allowed in this context",nn="Unexpected token",rn="Unexpected token",an="Keyword must not contain escaped characters",on="Invalid hexadecimal escape sequence",un="Invalid left-hand side in assignment",cn="Unexpected token",hn="Invalid regular expression",ln="Invalid tagged template on optional chain",pn="Unexpected token",dn="The `as` and `from` contextual keywords must not contain Unicode escape sequences.",mn="Numeric separator is not allowed here",Dn="In strict mode code, functions can only be declared at top level or inside a block",fn="Function name may not be eval or arguments in strict mode",xn="Octal literals are not allowed in strict mode.",En="Parameter name eval or arguments is not allowed in strict mode",gn="Use of future reserved word in strict mode",yn="Variable name may not be eval or arguments in strict mode",Cn="Unexpected token %0",An="Unexpected token ILLEGAL",Fn="Undefined label '%0'",wn="Invalid regular expression: missing /";function Sn(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function kn(e){return"01234567".indexOf(e)}var bn=class{constructor(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this.length}throwUnexpectedToken(e=An){return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}tolerateUnexpectedToken(e=An){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}skipSingleLineComment(e){let t,s,i=[];for(this.trackComment&&(i=[],t=this.index-e,s={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){const n=this.source.charCodeAt(this.index);if(++this.index,fs.isLineTerminator(n)){if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart-1};const n={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:s};i.push(n)}return 13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};const n={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:s};i.push(n)}return i}skipMultiLineComment(){let e,t,s=[];for(this.trackComment&&(s=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){const i=this.source.charCodeAt(this.index);if(fs.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};const i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};s.push(i)}return s}++this.index}else++this.index}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};const i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t};s.push(i)}return this.tolerateUnexpectedToken(),s}scanComments(){let e;this.trackComment&&(e=[]);let t=0===this.index;for(;!this.eof();){let s=this.source.charCodeAt(this.index);if(fs.isWhiteSpace(s))++this.index;else if(fs.isLineTerminator(s))++this.index,13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===s)if(s=this.source.charCodeAt(this.index+1),47===s){this.index+=2;const s=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(s)),t=!0}else{if(42!==s)break;{this.index+=2;const t=this.skipMultiLineComment();this.trackComment&&(e=e.concat(t))}}else if(t&&45===s){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;{this.index+=3;const t=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(t))}}else{if(60!==s||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;{this.index+=4;const t=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(t))}}}return e}isFutureReservedWord(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}}isStrictModeReservedWord(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}isRestrictedWord(e){return"eval"===e||"arguments"===e}isKeyword(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){const s=this.source.charCodeAt(e+1);s>=56320&&s<=57343&&(t=1024*(t-55296)+s-56320+65536)}return t}scanHexEscape(e){const t="u"===e?4:2;let s=0;for(let i=0;i<t;++i){if(this.eof()||!fs.isHexDigit(this.source.charCodeAt(this.index)))return null;s=16*s+Sn(this.source[this.index++])}return String.fromCharCode(s)}tryToScanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;if("}"===e)return null;for(;!this.eof()&&(e=this.source[this.index++],fs.isHexDigit(e.charCodeAt(0)));)t=16*t+Sn(e);return t>1114111||"}"!==e?null:fs.fromCodePoint(t)}scanUnicodeCodePointEscape(){const e=this.tryToScanUnicodeCodePointEscape();return null===e?this.throwUnexpectedToken():e}getIdentifier(){const e=this.index++;for(;!this.eof();){const t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!fs.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)}getComplexIdentifier(){let e,t=this.codePointAt(this.index),s=fs.fromCodePoint(t);for(this.index+=s.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&fs.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken()),s=e);!this.eof()&&(t=this.codePointAt(this.index),fs.isIdentifierPart(t));)e=fs.fromCodePoint(t),s+=e,this.index+=e.length,92===t&&(s=s.substr(0,s.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):(e=this.scanHexEscape("u"),null!==e&&"\\"!==e&&fs.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken()),s+=e);return s}octalToDecimal(e){let t="0"!==e,s=kn(e);return!this.eof()&&fs.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,s=8*s+kn(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&fs.isOctalDigit(this.source.charCodeAt(this.index))&&(s=8*s+kn(this.source[this.index++]))),{code:s,octal:t}}scanIdentifier(){let e;const t=this.index,s=92===this.source.charCodeAt(t),i=s?this.getComplexIdentifier():this.getIdentifier();if(e=1===i.length?3:this.isKeyword(i)?4:"null"===i?5:"true"===i||"false"===i?1:3,3!==e&&t+i.length!==this.index){const e=this.index;this.index=t,this.tolerateUnexpectedToken(an),this.index=e}return{type:e,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index,escaped:s}}scanPunctuator(){const e=this.index;let t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case"?":++this.index,"?"===this.source[this.index]&&(++this.index,"="===this.source[this.index]?(++this.index,t="??="):t="??"),"."!==this.source[this.index]||/^\d$/.test(this.source[this.index+1])||(++this.index,t="?.");break;case"#":case")":case";":case",":case"[":case"]":case":":case"~":case"@":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t||"&&="===t||"||="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let t=this.scanLiteralPart(fs.isHexDigitChar);return 0===t.length&&this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0x"+t),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(fs.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanBinaryLiteral(e){let t,s=this.scanLiteralPart(e=>"0"===e||"1"===e);return 0===s.length&&this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0b"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(this.eof()||(t=this.source.charCodeAt(this.index),(fs.isIdentifierStart(t)||fs.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(s,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanOctalLiteral(e,t){let s="",i=!1;return fs.isOctalDigit(e.charCodeAt(0))?(i=!0,s="0"+this.source[this.index++]):++this.index,s+=this.scanLiteralPart(fs.isOctalDigitChar),i||0!==s.length||this.throwUnexpectedToken(),"n"===this.source[this.index]?(this.index++,{type:6,value:BigInt("0o"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}):((fs.isIdentifierStart(this.source.charCodeAt(this.index))||fs.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(s,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index})}isImplicitOctalLiteral(){for(let e=this.index+1;e<this.length;++e){const t=this.source[e];if("8"===t||"9"===t||"n"===t)return!1;if(!fs.isOctalDigit(t.charCodeAt(0)))return!0}return!0}scanLiteralPart(e){let t="";for("_"===this.source[this.index]&&this.throwUnexpectedToken(mn);this.source[this.index]&&(e(this.source[this.index])||"_"===this.source[this.index]);)"_"!==this.source[this.index]&&(t+=this.source[this.index]),this.index++,"_"===this.source[this.index-1]&&"_"===this.source[this.index]&&this.throwUnexpectedToken("Numeric separator must be exactly one underscore");return"_"===this.source[this.index-1]&&this.throwUnexpectedToken(mn),t}scanNumericLiteral(){const e=this.index;let t=this.source[e];en(fs.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");let s="";if("."!==t){if(s=this.source[this.index++],t=this.source[this.index],"0"===s){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&fs.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}this.index--,s=this.scanLiteralPart(fs.isDecimalDigitChar),t=this.source[this.index]}if("."===t&&(s+=this.source[this.index++],s+=this.scanLiteralPart(fs.isDecimalDigitChar),t=this.source[this.index]),"e"===t||"E"===t)s+=this.source[this.index++],t=this.source[this.index],"+"!==t&&"-"!==t||(s+=this.source[this.index++]),fs.isDecimalDigit(this.source.charCodeAt(this.index))?s+=this.scanLiteralPart(fs.isDecimalDigitChar):this.throwUnexpectedToken();else if("n"===t)return s.length>1&&"0"===s[0]&&this.throwUnexpectedToken(),this.index++,{type:6,value:BigInt(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index};return fs.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){const e=this.index;let t=this.source[e];en("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;let s=!1,i="";for(;!this.eof();){let e=this.source[this.index++];if(e===t){t="";break}if("\\"===e)if(e=this.source[this.index++],e&&fs.isLineTerminator(e.charCodeAt(0)))++this.lineNumber,"\r"===e&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(e){case"u":if("{"===this.source[this.index])++this.index,i+=this.scanUnicodeCodePointEscape();else{const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(),i+=t}break;case"x":const t=this.scanHexEscape(e);null===t&&this.throwUnexpectedToken(on),i+=t;break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;case"8":case"9":i+=e,this.tolerateUnexpectedToken();break;default:if(e&&fs.isOctalDigit(e.charCodeAt(0))){const t=this.octalToDecimal(e);s=t.octal||s,i+=String.fromCharCode(t.code)}else i+=e}else{if(fs.isLineTerminator(e.charCodeAt(0)))break;i+=e}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:i,octal:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1;const s=this.index,i="`"===this.source[s];let n=!1,r=null,a=2;for(++this.index;!this.eof();){let s=this.source[this.index++];if("`"===s){a=1,n=!0,t=!0;break}if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else{if(null!==r)continue;if("\\"===s)if(s=this.source[this.index++],fs.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;const t=this.tryToScanUnicodeCodePointEscape();null===t?r="u":e+=t}else{const t=this.scanHexEscape(s);null===t?r="u":e+=t}break;case"x":const t=this.scanHexEscape(s);null===t?r="x":e+=t;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?fs.isDecimalDigit(this.source.charCodeAt(this.index))?r="0":e+="\0":fs.isDecimalDigitChar(s)?r=s:e+=s}else fs.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s}}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(s+1,this.index-a),cooked:null===r?e:null,head:i,tail:n,notEscapeSequenceHead:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:s,end:this.index}}testRegExp(e,t){let s=e;t.indexOf("u")>=0&&(s=s.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(e,t,s)=>{const i=parseInt(t||s,16);return i>1114111&&this.throwUnexpectedToken(hn),i<=65535?String.fromCharCode(i):""}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(s)}catch(i){this.throwUnexpectedToken(hn)}try{return new RegExp(e,t)}catch(n){return null}}scanRegExpBody(){let e=this.source[this.index];en("/"===e,"Regular expression literal must start with a slash");let t=this.source[this.index++],s=!1,i=!1;for(;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],fs.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(wn),t+=e;else if(fs.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(wn);else if(s)"]"===e&&(s=!1);else{if("/"===e){i=!0;break}"["===e&&(s=!0)}return i||this.throwUnexpectedToken(wn),t.substr(1,t.length-2)}scanRegExpFlags(){let e="",t="";for(;!this.eof();){let s=this.source[this.index];if(!fs.isIdentifierPart(s.charCodeAt(0)))break;if(++this.index,"\\"!==s||this.eof())t+=s,e+=s;else if(s=this.source[this.index],"u"===s){++this.index;let s=this.index;const i=this.scanHexEscape("u");if(null!==i)for(t+=i,e+="\\u";s<this.index;++s)e+=this.source[s];else this.index=s,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken()}return t}scanRegExp(){const e=this.index,t=this.scanRegExpBody(),s=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:s,regex:this.testRegExp(t,s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}lex(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};const e=this.source.charCodeAt(this.index);return fs.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?fs.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():fs.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&fs.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}},vn={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},Bn="ArrowParameterPlaceHolder",Tn=class{constructor(e,t={},s){this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=s,this.errorHandler=new tn,this.errorHandler.tolerant=1==this.config.tolerant,this.scanner=new bn(e,this.errorHandler),this.scanner.trackComment=1==this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,isAsync:!1,allowIn:!0,allowStrictDirective:!0,allowSuper:!1,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inConstructor:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,inClassConstructor:!1,labelSet:{},strict:!1,decorators:null},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwError(e,...t){const s=t.slice(),i=e.replace(/%(\d)/g,(e,t)=>(en(t<s.length,"Message reference must be in range"),s[t])),n=this.lastMarker.index,r=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(n,r,a,i)}tolerateError(e,...t){const s=t.slice(),i=e.replace(/%(\d)/g,(e,t)=>(en(t<s.length,"Message reference must be in range"),s[t])),n=this.lastMarker.index,r=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(n,r,a,i)}unexpectedTokenError(e,t){let s,i=t||Cn;if(e?(t||(i=2===e.type?"Unexpected end of input":3===e.type?"Unexpected identifier":6===e.type?"Unexpected number":8===e.type?"Unexpected string":10===e.type?"Unexpected quasi %0":Cn,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i="Unexpected reserved word":this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=gn))),s=e.value):s="ILLEGAL",i=i.replace("%0",s),e&&"number"==typeof e.lineNumber){const t=e.start,s=e.lineNumber,n=this.lastMarker.index-this.lastMarker.column,r=e.start-n+1;return this.errorHandler.createError(t,s,r,i)}{const e=this.lastMarker.index,t=this.lastMarker.line,s=this.lastMarker.column+1;return this.errorHandler.createError(e,t,s,i)}}throwUnexpectedToken(e,t){throw this.unexpectedTokenError(e,t)}tolerateUnexpectedToken(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))}tolerateInvalidLoopStatement(){(this.matchKeyword("class")||this.matchKeyword("function"))&&this.tolerateError(Cn,this.lookahead)}collectComments(){if(this.config.comment){const e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(let t=0;t<e.length;++t){const s=e[t],i={type:s.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(s.slice[0],s.slice[1])};this.config.range&&(i.range=s.range),this.config.loc&&(i.loc=s.loc);const n={start:{line:s.loc.start.line,column:s.loc.start.column,offset:s.range[0]},end:{line:s.loc.end.line,column:s.loc.end.column,offset:s.range[1]}};this.delegate(i,n)}}else this.scanner.scanComments()}getTokenRaw(e){return this.scanner.source.slice(e.start,e.end)}convertToken(e){const t={type:vn[e.type],value:this.getTokenRaw(e)};return this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type&&(t.regex={pattern:e.pattern,flags:e.flags}),t}nextToken(){const e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);const t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e}nextRegexToken(){this.collectComments();const e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e}createNode(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}startNode(e,t=0){let s=e.start-e.lineStart,i=e.lineNumber;return s<0&&(s+=t,i--),{index:e.start,line:i,column:s}}finalize(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){const s={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,s)}return t}expect(e){const t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)}expectCommaSeparator(){if(this.config.tolerant){const e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,Cn)}else this.expect(",")}expectKeyword(e){const t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)}match(e){return 7===this.lookahead.type&&this.lookahead.value===e}matchKeyword(e){return 4===this.lookahead.type&&this.lookahead.value===e}matchContextualKeyword(e){return 3===this.lookahead.type&&this.lookahead.value===e}matchAssign(){if(7!==this.lookahead.type)return!1;const e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e||"&&="===e||"||="===e||"??="===e}isolateCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const n=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=s,this.context.firstCoverInitializedNameError=i,n}inheritCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const n=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&s,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,n}consumeSemicolon(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)}parsePrimaryExpression(){const e=this.createNode();let t,s,i;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.isAsync)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new hi(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,xn),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t="bigint"==typeof s.value?this.finalize(e,new Rs(s.value,i,s.value.toString())):this.finalize(e,new gi(s.value,i));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t=this.finalize(e,new gi("true"===s.value,i));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),i=this.getTokenRaw(s),t=this.finalize(e,new gi(null,i));break;case 10:t=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,s=this.nextRegexToken(),i=this.getTokenRaw(s),t=this.finalize(e,new Ii(s.regex,i,s.pattern,s.flags));break;case"#":this.nextToken(),t=this.finalize(e,new vi(this.nextToken().value));break;case"@":let n=this.parseDecorators();this.context.decorators=n,this.parsePrimaryExpression(),this.context.decorators=null,t=this.finalize(e,new vi(this.nextToken().value));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new hi(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new $i)):this.matchKeyword("class")?t=this.parseClassExpression():this.matchKeyword("new")?t=this.parseNewExpression():this.matchImportCall()?t=this.parseImportCall():this.matchImportMeta()?(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,"Cannot use 'import.meta' outside a module"),t=this.parseImportMeta()):t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t}parseSpreadElement(){const e=this.createNode();this.expect("...");const t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new _i(t))}parseArrayInitializer(){const e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){const e=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(e)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new Ts(t))}parsePropertyMethod(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;const i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=s,i}parsePropertyMethodFunction(e){const t=this.createNode(),s=this.context.allowYield;this.context.allowYield=!0;const i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=s,this.finalize(t,new ci(null,i.params,n,e,!1))}parsePropertyMethodAsyncFunction(e){const t=this.createNode(),s=this.context.allowYield,i=this.context.isAsync;this.context.allowYield=!1,this.context.isAsync=!0;const n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=s,this.context.isAsync=i,this.finalize(t,new ci(null,n.params,r,e,!0))}parseObjectPropertyKey(e=!1){const t=this.createNode(),s=this.nextToken();let i;switch(s.type){case 8:case 6:this.context.strict&&s.octal&&this.tolerateUnexpectedToken(s,xn);const n=this.getTokenRaw(s);i="bigint"==typeof s.value?this.finalize(t,new Rs(s.value,n,s.value.toString())):this.finalize(t,new gi(s.value,n));break;case 3:case 1:case 5:case 4:i=this.finalize(t,e?new vi(s.value):new hi(s.value));break;case 7:"["===s.value?(i=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):i=this.throwUnexpectedToken(s);break;default:i=this.throwUnexpectedToken(s)}return i}isPropertyKey(e,t){return e.type===ce.Identifier&&e.name===t||e.type===ce.Literal&&e.value===t}parseObjectProperty(e){const t=this.createNode(),s=this.lookahead;let i,n=null,r=null,a=!1,o=!1,u=!1,c=!1,h=!1;if(3===s.type){const e=s.value;this.nextToken(),a=this.match("["),c=!(this.hasLineTerminator||"async"!==e||this.match(":")||this.match("(")||this.match(",")),h=this.match("*"),h&&this.nextToken(),n=c?this.parseObjectPropertyKey():this.finalize(t,new hi(e))}else this.match("*")?this.nextToken():(a=this.match("["),n=this.parseObjectPropertyKey());const l=this.qualifiedPropertyName(this.lookahead);if(3===s.type&&!c&&"get"===s.value&&l)i="get",a=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(3===s.type&&!c&&"set"===s.value&&l)i="set",a=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(7===s.type&&"*"===s.value&&l)i="init",a=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(!1),o=!0;else if(n||this.throwUnexpectedToken(this.lookahead),i="init",this.match(":")&&!c)!a&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError("Duplicate __proto__ fields are not allowed in object literals"),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=c?this.parsePropertyMethodAsyncFunction(h):this.parsePropertyMethodFunction(h),o=!0;else if(3===s.type){const e=this.finalize(t,new hi(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;const s=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(t,new Os(e,s))}else u=!0,r=e}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new Bi(i,n,a,r,o,u))}parseObjectInitializer(){const e=this.createNode();this.expect("{");const t=[],s={value:!1};for(;!this.match("}");){const e=this.match("...")?this.parseSpreadElement():this.parseObjectProperty(s);t.push(e),this.match("}")||e.method&&!this.match(",")||this.expectCommaSeparator()}return this.expect("}"),this.finalize(e,new ki(t))}throwTemplateLiteralEarlyErrors(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,"Invalid Unicode escape sequence");case"x":return this.throwUnexpectedToken(e,on);case"8":case"9":return this.throwUnexpectedToken(e,"\\8 and \\9 are not allowed in template strings.");default:return this.throwUnexpectedToken(e,"Octal literals are not allowed in template strings.")}}parseTemplateHead(e){en(this.lookahead.head,"Template literal must start with a template head");const t=this.createNode(),s=this.nextToken();e.isTagged||null===s.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(s);const i=s.value,n=s.cooked;return this.finalize(t,new Ki({raw:i,cooked:n},s.tail))}parseTemplateElement(e){10!==this.lookahead.type&&this.throwUnexpectedToken();const t=this.createNode(),s=this.nextToken();e.isTagged||null===s.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(s);const i=s.value,n=s.cooked;return this.finalize(t,new Ki({raw:i,cooked:n},s.tail))}parseTemplateLiteral(e){const t=this.createNode(),s=[],i=[];let n=this.parseTemplateHead(e);for(i.push(n);!n.tail;)s.push(this.parseExpression()),n=this.parseTemplateElement(e),i.push(n);return this.finalize(t,new Xi(i,s))}reinterpretExpressionAsPattern(e){switch(e.type){case ce.Identifier:case ce.MemberExpression:case ce.RestElement:case ce.AssignmentPattern:break;case ce.SpreadElement:e.type=ce.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case ce.ArrayExpression:e.type=ce.ArrayPattern;for(let t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case ce.ObjectExpression:e.type=ce.ObjectPattern;for(let t=0;t<e.properties.length;t++){const s=e.properties[t];this.reinterpretExpressionAsPattern(s.type===ce.SpreadElement?s:s.value)}break;case ce.AssignmentExpression:e.type=ce.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}}parseGroupExpression(){let e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:Bn,params:[],async:!1};else{const t=this.lookahead,s=[];if(this.match("..."))e=this.parseRestElement(s),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:Bn,params:[e],async:!1};else{let i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){const n=[];for(this.context.isAssignmentTarget=!1,n.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(let e=0;e<n.length;e++)this.reinterpretExpressionAsPattern(n[e]);i=!0,e={type:Bn,params:n,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),n.push(this.parseRestElement(s)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(let e=0;e<n.length;e++)this.reinterpretExpressionAsPattern(n[e]);i=!0,e={type:Bn,params:n,async:!1}}else n.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new Mi(n)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===ce.Identifier&&"yield"===e.name&&(i=!0,e={type:Bn,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===ce.SequenceExpression)for(let t=0;t<e.expressions.length;t++)this.reinterpretExpressionAsPattern(e.expressions[t]);else this.reinterpretExpressionAsPattern(e);e={type:Bn,params:e.type===ce.SequenceExpression?e.expressions:[e],async:!1}}this.context.isBindingElement=!1}}}return e}parseArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e}isIdentifierName(e){return 3===e.type||4===e.type||1===e.type||5===e.type}parseIdentifierName(e=!1){let t=!1,s=this.createNode(),i=this.nextToken();return"#"===i.value&&e&&(i=this.nextToken(),t=!0),this.isIdentifierName(i)||this.throwUnexpectedToken(i),this.finalize(s,t?new vi(i.value):new hi(i.value))}parseNewExpression(){const e=this.createNode(),t=this.parseIdentifierName();let s;return en("new"===t.name,"New expression must start with `new`"),this.match(".")?(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value?s=new Ai(t,this.parseIdentifierName()):this.throwUnexpectedToken(this.lookahead)):this.matchKeyword("import")?this.throwUnexpectedToken(this.lookahead):(s=new Si(this.isolateCoverGrammar(this.parseLeftHandSideExpression),this.match("(")?this.parseArguments():[]),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),this.finalize(e,s)}parseAsyncArgument(){const e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e}parseAsyncArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e}matchImportCall(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=7===s.type&&"("===s.value}return e}parseImportCall(){const e=this.createNode();this.expectKeyword("import"),this.expect("(");const t=this.parseAssignmentExpression();let s=null;return this.match(",")&&(this.nextToken(),s=this.parseObjectInitializer()),!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new di(t,s))}matchImportMeta(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();if(7===s.type&&"."===s.value){this.scanner.scanComments();const t=this.scanner.lex();e=3===t.type&&"meta"===t.value,e&&t.end-t.start!==4&&this.tolerateUnexpectedToken(t,an)}else e=!1;this.scanner.restoreState(t)}return e}parseImportMeta(){const e=this.createNode(),t=this.parseIdentifierName();this.expect(".");const s=this.parseIdentifierName();return this.context.isAssignmentTarget=!1,this.finalize(e,new Ai(t,s))}parseLeftHandSideExpressionAllowCall(){const e=this.lookahead,t=this.matchContextualKeyword("async"),s=this.context.allowIn;let i;this.context.allowIn=!0;const n=this.matchKeyword("super");n&&this.context.inFunctionBody?(i=this.createNode(),this.nextToken(),i=this.finalize(i,new Ui),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):i=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),!n||!this.match("(")||this.context.inClassConstructor&&this.context.allowSuper||this.tolerateError("'super' keyword unexpected here");let r=!1;for(;;){let s=!1;if(this.match("?.")&&(s=!0,r=!0,this.expect("?.")),this.match("(")){const n=t&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;const r=n?this.parseAsyncArguments():this.parseArguments();if(i.type===ce.ImportExpression&&1!==r.length&&this.tolerateError("Unexpected token"),i=this.finalize(this.startNode(e),new Js(i,r,s)),n&&this.match("=>")){for(let e=0;e<r.length;++e)this.reinterpretExpressionAsPattern(r[e]);i={type:Bn,params:r,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!s,this.expect("[");const t=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),i=this.finalize(this.startNode(e),new Ci(!0,i,t,s))}else if(10===this.lookahead.type&&this.lookahead.head){s&&this.throwUnexpectedToken(this.lookahead),r&&this.throwError(ln);const t=this.parseTemplateLiteral({isTagged:!0});i=this.finalize(this.startNode(e),new Ji(i,t))}else{if(!this.match(".")&&!s)break;{this.context.isBindingElement=!1,this.context.isAssignmentTarget=!s,s||this.expect(".");const t=this.parseIdentifierName(!0);i=this.finalize(this.startNode(e),new Ci(!1,i,t,s))}}}return this.context.allowIn=s,r?new Xs(i):i}parseSuper(){const e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new Ui)}parseLeftHandSideExpression(){en(this.context.allowIn,"callee of new expression always allow in keyword.");const e=this.startNode(this.lookahead);let t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),s=!1;for(;;){let i=!1;if(this.match("?.")&&(i=!0,s=!0,this.expect("?.")),this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!i,this.expect("[");const s=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new Ci(!0,t,s,i))}else if(10===this.lookahead.type&&this.lookahead.head){i&&this.throwUnexpectedToken(this.lookahead),s&&this.throwError(ln);const n=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new Ji(t,n))}else{if(!this.match(".")&&!i)break;{this.context.isBindingElement=!1,this.context.isAssignmentTarget=!i,i||this.expect(".");const s=this.parseIdentifierName();t=this.finalize(e,new Ci(!1,t,s,i))}}}return s?new Xs(t):t}parseUpdateExpression(){let e;const t=this.lookahead;if(this.match("++")||this.match("--")){const s=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===ce.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError("Prefix increment/decrement may not have eval or arguments operand in strict mode"),this.context.isAssignmentTarget||this.tolerateError(un),e=this.finalize(s,new Vi(i.value,e,!0)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===ce.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError("Postfix increment/decrement may not have eval or arguments operand in strict mode"),this.context.isAssignmentTarget||this.tolerateError(un),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const s=this.nextToken().value;e=this.finalize(this.startNode(t),new Vi(s,e,!1))}return e}parseAwaitExpression(){const e=this.createNode();this.nextToken();const t=this.parseUnaryExpression();return this.finalize(e,new _s(t))}parseUnaryExpression(){let e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){const t=this.startNode(this.lookahead),s=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new Gi(s.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===ce.Identifier&&this.tolerateError("Delete of an unqualified identifier in strict mode."),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=(this.context.isModule&&!this.context.inFunctionBody||this.context.isAsync)&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e}parseExponentiationExpression(){const e=this.lookahead,t=this.match("(");let s=this.inheritCoverGrammar(this.parseUnaryExpression);if((s.type!==ce.UnaryExpression||t)&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=s,i=this.isolateCoverGrammar(this.parseExponentiationExpression);s=this.finalize(this.startNode(e),new Us("**",t,i))}return s}binaryPrecedence(e){const t=e.value;let s;return s=7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?12:0,s}parseBinaryExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseExponentiationExpression),s=!0,i=!0;const n=e=>{"&&"!==e.value&&"||"!==e.value||(i=!1),"??"===e.value&&(s=!1)},r=this.lookahead;let a=this.binaryPrecedence(r);if(a>0){n(r),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const o=[e,this.lookahead];let u=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression);const h=[u,r.value,c],l=[a];for(;a=this.binaryPrecedence(this.lookahead),!(a<=0);){for((s||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(i||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),n(this.lookahead);h.length>2&&a<=l[l.length-1];){c=h.pop();const e=h.pop();l.pop(),u=h.pop(),o.pop();const t=o[o.length-1],s=this.startNode(t,t.lineStart),i="||"===e||"&&"===e||"??"===e;h.push(this.finalize(s,i?new yi(e,u,c):new Us(e,u,c)))}h.push(this.nextToken().value),l.push(a),o.push(this.lookahead),h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}let p=h.length-1;t=h[p];let d=o.pop();for(;p>1;){const e=o.pop(),s=d&&d.lineStart,i=this.startNode(e,s),n=h[p-1],r="||"===n||"&&"===n||"??"===n;t=this.finalize(i,r?new yi(n,h[p-2],t):new Us(n,h[p-2],t)),p-=2,d=e}}return t}parseConditionalExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();const s=this.context.allowIn;this.context.allowIn=!0;const i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=s,this.expect(":");const n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new Gs(t,i,n)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t}checkPatternParam(e,t){switch(t.type){case ce.Identifier:this.validateParam(e,t,t.name);break;case ce.RestElement:this.checkPatternParam(e,t.argument);break;case ce.AssignmentPattern:this.checkPatternParam(e,t.left);break;case ce.ArrayPattern:for(let s=0;s<t.elements.length;s++)null!==t.elements[s]&&this.checkPatternParam(e,t.elements[s]);break;case ce.ObjectPattern:for(let s=0;s<t.properties.length;s++){const i=t.properties[s];this.checkPatternParam(e,i.type===ce.RestElement?i:i.value)}}e.simple=e.simple&&t instanceof hi}reinterpretAsCoverFormalsList(e){let t=[e];const s={simple:!0,paramSet:{}};let i=!1;switch(e.type){case ce.Identifier:break;case Bn:t=e.params,i=e.async;break;default:return null}for(let n=0;n<t.length;++n){const e=t[n];e.type===ce.AssignmentPattern?e.right.type===ce.YieldExpression&&(e.right.argument&&this.throwUnexpectedToken(this.lookahead),e.right.type=ce.Identifier,e.right.name="yield",delete e.right.argument,delete e.right.delegate):i&&e.type===ce.Identifier&&"await"===e.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(s,e),t[n]=e}if(this.context.strict||!this.context.allowYield)for(let n=0;n<t.length;++n)t[n].type===ce.YieldExpression&&this.throwUnexpectedToken(this.lookahead);if(s.hasDuplicateParameterNames){const e=this.context.strict?s.stricted:s.firstRestricted;this.throwUnexpectedToken(e,sn)}return{simple:s.simple,params:t,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}parseAssignmentExpression(){let e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{const t=this.lookahead;let s=t;if(e=this.parseConditionalExpression(),3===s.type&&s.lineNumber===this.lookahead.lineNumber&&"async"===s.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){const t=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(t),e={type:Bn,params:[t],async:!0}}if(e.type===Bn||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const s=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;const n=this.context.strict,r=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;const a=this.context.allowYield,o=this.context.isAsync;this.context.allowYield=!0,this.context.isAsync=s;const u=this.startNode(t);let c;if(this.expect("=>"),this.match("{")){const e=this.context.allowIn;this.context.allowIn=!0,c=this.parseFunctionSourceElements(),this.context.allowIn=e}else c=this.isolateCoverGrammar(this.parseAssignmentExpression);const h=c.type!==ce.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=this.finalize(u,new Ns(i.params,c,h,s)),this.context.strict=n,this.context.allowStrictDirective=r,this.context.allowYield=a,this.context.isAsync=o}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(un),this.context.strict&&e.type===ce.Identifier){const t=e;this.scanner.isRestrictedWord(t.name)&&this.tolerateUnexpectedToken(s,"Assignment to eval or arguments is not allowed in strict mode"),this.scanner.isStrictModeReservedWord(t.name)&&this.tolerateUnexpectedToken(s,gn)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),s=this.nextToken();const i=s.value,n=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new Ps(i,e,n)),this.context.firstCoverInitializedNameError=null}}return e}parseExpression(){const e=this.lookahead;let t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){const s=[];for(s.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),s.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new Mi(s))}return t}parseStatementListItem(){let e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,nn),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():this.matchImportMeta()?e=this.parseStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,rn),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e}parseBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new Ls(t))}parseLexicalBinding(e,t){const s=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===ce.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(yn);let n=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError("Missing initializer in %0 declaration","const")):(!t.inFor&&i.type!==ce.Identifier||this.match("="))&&(this.expect("="),n=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(s,new Wi(i,n))}parseBindingList(e,t){const s=[this.parseLexicalBinding(e,t)];for(;this.match(",");)this.nextToken(),s.push(this.parseLexicalBinding(e,t));return s}isLexicalDeclaration(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value}parseLexicalDeclaration(e){const t=this.createNode(),s=this.nextToken().value;en("let"===s||"const"===s,"Lexical declaration must be either let or const");const i=this.parseBindingList(s,e);return this.consumeSemicolon(),this.finalize(t,new Hi(i,s))}isInitializedProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),3===this.lookahead.type&&"="===t.value}isDeclaredProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),3===this.lookahead.type&&";"===t.value||3===this.lookahead.type&&t.lineNumber!==this.startMarker.line}parseBindingRestElement(e,t){const s=this.createNode();this.expect("...");const i=this.parsePattern(e,t);return this.finalize(s,new Ni(i))}parseArrayPattern(e,t){const s=this.createNode();this.expect("[");const i=[];for(;!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(s,new Is(i))}parsePropertyPattern(e,t){const s=this.createNode();let i,n,r=!1,a=!1;if(3===this.lookahead.type){const r=this.lookahead;i=this.parseVariableIdentifier();const o=this.finalize(s,new hi(r.value));if(this.match("=")){e.push(r),a=!0,this.nextToken();const t=this.parseAssignmentExpression();n=this.finalize(this.startNode(r),new Os(o,t))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(r),a=!0,n=o)}else r=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(s,new Bi("init",i,r,n,!1,a))}parseRestProperty(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError("Unexpected token ="),this.match("}")||this.throwError("Unexpected token"),this.finalize(t,new Ni(s))}parseObjectPattern(e,t){const s=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.match("...")?this.parseRestProperty(e):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(s,new bi(i))}parsePattern(e,t){let s;return this.match("[")?s=this.parseArrayPattern(e,t):this.match("{")?s=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,"let is disallowed as a lexically bound name"),e.push(this.lookahead),s=this.parseVariableIdentifier(t)),s}parsePatternWithDefault(e,t){const s=this.lookahead;let i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();const e=this.context.allowYield;this.context.allowYield=!0;const t=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=e,i=this.finalize(this.startNode(s),new Os(i,t))}return i}parseVariableIdentifier(e){const t=this.createNode(),s=this.nextToken();return 4===s.type&&"yield"===s.value?this.context.strict?this.tolerateUnexpectedToken(s,gn):this.context.allowYield||this.throwUnexpectedToken(s):3!==s.type?this.context.strict&&4===s.type&&this.scanner.isStrictModeReservedWord(s.value)?this.tolerateUnexpectedToken(s,gn):(this.context.strict||"let"!==s.value||"var"!==e)&&this.throwUnexpectedToken(s):(this.context.isModule||this.context.isAsync)&&3===s.type&&"await"===s.value&&this.tolerateUnexpectedToken(s),this.finalize(t,new hi(s.value))}parseVariableDeclaration(e){const t=this.createNode(),s=this.parsePattern([],"var");this.context.strict&&s.type===ce.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(yn);let i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):s.type===ce.Identifier||e.inFor||this.expect("="),this.finalize(t,new Wi(s,i))}parseVariableDeclarationList(e){const t={inFor:e.inFor},s=[];for(s.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),s.push(this.parseVariableDeclaration(t));return s}parseVariableStatement(){const e=this.createNode();this.expectKeyword("var");const t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new Hi(t,"var"))}parseEmptyStatement(){const e=this.createNode();return this.expect(";"),this.finalize(e,new Zs)}parseExpressionStatement(){const e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ni(t))}parseIfClause(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Dn),this.parseStatement()}parseIfStatement(){const e=this.createNode();let t,s=null;this.expectKeyword("if"),this.expect("(");const i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new Zs)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),s=this.parseIfClause())),this.finalize(e,new li(i,t,s))}parseDoWhileStatement(){const e=this.createNode();this.expectKeyword("do"),this.tolerateInvalidLoopStatement();const t=this.context.inIteration;this.context.inIteration=!0;const s=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");const i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new Qs(s,i))}parseWhileStatement(){const e=this.createNode();let t;this.expectKeyword("while"),this.expect("(");const s=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new Zs);else{this.expect(")");const e=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=e}return this.finalize(e,new qi(s,t))}parseForStatement(){let e,t,s=null,i=null,n=null,r=!0,a=!1;const o=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.isAsync||this.tolerateUnexpectedToken(this.lookahead),a=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){s=this.createNode(),this.nextToken();const i=this.context.allowIn;this.context.allowIn=!1;const n=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=i,!a&&1===n.length&&this.matchKeyword("in")){const i=n[0];i.init&&(i.id.type===ce.ArrayPattern||i.id.type===ce.ObjectPattern||this.context.strict)&&this.tolerateError("%0 loop variable declaration may not have an initializer","for-in"),s=this.finalize(s,new Hi(n,"var")),this.nextToken(),e=s,t=this.parseExpression(),s=null}else 1===n.length&&null===n[0].init&&this.matchContextualKeyword("of")?(s=this.finalize(s,new Hi(n,"var")),this.nextToken(),e=s,t=this.parseAssignmentExpression(),s=null,r=!1):(s=this.finalize(s,new Hi(n,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){s=this.createNode();const i=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){const n=this.context.allowIn;this.context.allowIn=!1;const a=this.parseBindingList(i,{inFor:!0});this.context.allowIn=n,1===a.length&&null===a[0].init&&this.matchKeyword("in")?(s=this.finalize(s,new Hi(a,i)),this.nextToken(),e=s,t=this.parseExpression(),s=null):1===a.length&&null===a[0].init&&this.matchContextualKeyword("of")?(s=this.finalize(s,new Hi(a,i)),this.nextToken(),e=s,t=this.parseAssignmentExpression(),s=null,r=!1):(this.consumeSemicolon(),s=this.finalize(s,new Hi(a,i)))}else s=this.finalize(s,new hi(i)),this.nextToken(),e=s,t=this.parseExpression(),s=null}else{const i=this.lookahead,n=this.context.isBindingElement,a=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError,u=this.context.allowIn;if(this.context.allowIn=!1,s=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=u,this.matchKeyword("in"))this.context.isAssignmentTarget&&s.type!==ce.AssignmentExpression||this.tolerateError("Invalid left-hand side in for-in"),this.nextToken(),this.reinterpretExpressionAsPattern(s),e=s,t=this.parseExpression(),s=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&s.type!==ce.AssignmentExpression||this.tolerateError("Invalid left-hand side in for-loop"),this.nextToken(),this.reinterpretExpressionAsPattern(s),e=s,t=this.parseAssignmentExpression(),s=null,r=!1;else{if(this.context.isBindingElement=n,this.context.isAssignmentTarget=a,this.context.firstCoverInitializedNameError=o,this.match(",")){const e=[s];for(;this.match(",");)this.nextToken(),e.push(this.isolateCoverGrammar(this.parseAssignmentExpression));s=this.finalize(this.startNode(i),new Mi(e))}this.expect(";")}}let u;if(void 0===e&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(n=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new Zs);else{this.expect(")"),this.tolerateInvalidLoopStatement();const e=this.context.inIteration;this.context.inIteration=!0,u=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=e}return void 0===e?this.finalize(o,new oi(s,i,n,u)):r?this.finalize(o,new ri(e,t,u)):this.finalize(o,new ai(e,t,u,a))}parseContinueStatement(){const e=this.createNode();this.expectKeyword("continue");let t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){const e=this.parseVariableIdentifier();t=e;const s="$"+e.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)||this.throwError(Fn,e.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError("Illegal continue statement"),this.finalize(e,new Vs(t))}parseBreakStatement(){const e=this.createNode();this.expectKeyword("break");let t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){const e=this.parseVariableIdentifier(),s="$"+e.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,s)||this.throwError(Fn,e.name),t=e}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError("Illegal break statement"),this.finalize(e,new zs(t))}parseReturnStatement(){this.context.inFunctionBody||this.tolerateError("Illegal return statement");const e=this.createNode();this.expectKeyword("return");const t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new Pi(t))}parseWithStatement(){this.context.strict&&this.tolerateError("Strict mode code may not include a with statement");const e=this.createNode();let t;this.expectKeyword("with"),this.expect("(");const s=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new Zs)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new Qi(s,t))}parseSwitchCase(){const e=this.createNode();let t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");const s=[];for(;!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)s.push(this.parseStatementListItem());return this.finalize(e,new Li(t,s))}parseSwitchStatement(){const e=this.createNode();this.expectKeyword("switch"),this.expect("(");const t=this.parseExpression();this.expect(")");const s=this.context.inSwitch;this.context.inSwitch=!0;const i=[];let n=!1;for(this.expect("{");!this.match("}");){const e=this.parseSwitchCase();null===e.test&&(n&&this.throwError("More than one default clause in switch statement"),n=!0),i.push(e)}return this.expect("}"),this.context.inSwitch=s,this.finalize(e,new zi(t,i))}parseLabelledStatement(){const e=this.createNode(),t=this.parseExpression();let s;if(t.type===ce.Identifier&&this.match(":")){this.nextToken();const e=t,i="$"+e.name;let n;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError("%0 '%1' has already been declared","Label",e.name),this.context.labelSet[i]=!0,this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),n=this.parseClassDeclaration();else if(this.matchKeyword("function")){const e=this.lookahead,t=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(e,Dn):t.generator&&this.tolerateUnexpectedToken(e,"Generator declarations are not allowed in legacy contexts"),n=t}else n=this.parseStatement();delete this.context.labelSet[i],s=new Ei(e,n)}else this.consumeSemicolon(),s=new ni(t);return this.finalize(e,s)}parseThrowStatement(){const e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError("Illegal newline after throw");const t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new Yi(t))}parseCatchClause(){const e=this.createNode();this.expectKeyword("catch");let t=null;if(this.match("(")){this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);const e=[];t=this.parsePattern(e);const s={};for(let t=0;t<e.length;t++){const i="$"+e[t].value;Object.prototype.hasOwnProperty.call(s,i)&&this.tolerateError("Duplicate binding %0",e[t].value),s[i]=!0}this.context.strict&&t.type===ce.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError("Catch variable may not be eval or arguments in strict mode"),this.expect(")")}const s=this.parseBlock();return this.finalize(e,new Ks(t,s))}parseFinallyClause(){return this.expectKeyword("finally"),this.parseBlock()}parseTryStatement(){const e=this.createNode();this.expectKeyword("try");const t=this.parseBlock(),s=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return s||i||this.throwError("Missing catch or finally after try"),this.finalize(e,new ji(t,s,i))}parseDebuggerStatement(){const e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new Hs)}parseStatement(){let e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:const t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e}parseFunctionSourceElements(){const e=this.createNode();this.expect("{");const t=this.parseDirectivePrologues(),s=this.context.labelSet,i=this.context.inIteration,n=this.context.inSwitch,r=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=s,this.context.inIteration=i,this.context.inSwitch=n,this.context.inFunctionBody=r,this.finalize(e,new Ls(t))}validateParam(e,t,s){const i="$"+s;this.context.strict?(this.scanner.isRestrictedWord(s)&&(e.stricted=t,e.message=En),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)):e.firstRestricted||(this.scanner.isRestrictedWord(s)?(e.firstRestricted=t,e.message=En):this.scanner.isStrictModeReservedWord(s)?(e.firstRestricted=t,e.message=gn):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0}parseRestElement(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError("Unexpected token ="),this.match(")")||this.throwError("Rest parameter must be last formal parameter"),this.finalize(t,new Ni(s))}parseFormalParameter(e){const t=[],s=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t);for(let i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&s instanceof hi,e.params.push(s)}parseFormalParameters(e){const t={simple:!0,hasDuplicateParameterNames:!1,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),t.hasDuplicateParameterNames&&(this.context.strict||this.context.isAsync||!t.simple)&&this.throwError(sn),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}matchAsyncFunction(){let e=this.matchContextualKeyword("async");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===s.lineNumber&&4===s.type&&"function"===s.value}return e}parseFunctionDeclaration(e){const t=this.createNode(),s=this.matchContextualKeyword("async");s&&(this.context.inIteration&&this.tolerateError("Async functions can only be declared at the top level or inside a block."),this.nextToken()),this.expectKeyword("function");const i=this.match("*");let n;i&&this.nextToken();let r=null,a=null;if(!e||!this.match("(")){const e=this.lookahead;r=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(e.value)&&this.tolerateUnexpectedToken(e,fn):this.scanner.isRestrictedWord(e.value)?(a=e,n=fn):this.scanner.isStrictModeReservedWord(e.value)&&(a=e,n=gn)}const o=this.context.isAsync,u=this.context.allowYield;this.context.isAsync=s,this.context.allowYield=!i;const c=this.parseFormalParameters(a),h=c.params,l=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);const p=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;const m=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&l&&this.tolerateUnexpectedToken(l,n),this.context.strict=p,this.context.allowStrictDirective=d,this.context.isAsync=o,this.context.allowYield=u,s?this.finalize(t,new Ms(r,h,m,i)):this.finalize(t,new ui(r,h,m,i))}parseFunctionExpression(){const e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");const s=this.match("*");let i;s&&this.nextToken();let n,r=null;const a=this.context.isAsync,o=this.context.allowYield;if(this.context.isAsync=t,this.context.allowYield=!s,!this.match("(")){const e=this.lookahead;r=this.context.strict||s||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(e.value)&&this.tolerateUnexpectedToken(e,fn):this.scanner.isRestrictedWord(e.value)?(n=e,i=fn):this.scanner.isStrictModeReservedWord(e.value)&&(n=e,i=gn)}const u=this.parseFormalParameters(n),c=u.params,h=u.stricted;n=u.firstRestricted,u.message&&(i=u.message);const l=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=u.simple;const d=this.parseFunctionSourceElements();return this.context.strict&&n&&this.throwUnexpectedToken(n,i),this.context.strict&&h&&this.tolerateUnexpectedToken(h,i),this.context.strict=l,this.context.allowStrictDirective=p,this.context.isAsync=a,this.context.allowYield=o,this.finalize(e,new ci(r,c,d,s,t))}parseDirective(){const e=this.lookahead,t=this.createNode(),s=this.parseExpression(),i=s.type===ce.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new qs(s,i):new ni(s))}parseDirectivePrologues(){let e=null;const t=[];for(;;){const s=this.lookahead;if(8!==s.type)break;const i=this.parseDirective();t.push(i);const n=i.directive;if("string"!=typeof n)break;"use strict"===n?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,xn),this.context.allowStrictDirective||this.tolerateUnexpectedToken(s,"Illegal 'use strict' directive in function with non-simple parameter list")):!e&&s.octal&&(e=s)}return t}qualifiedPropertyName(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value||"#"===e.value}return!1}parseGetterMethod(){const e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;const s=this.parseFormalParameters();s.params.length>0&&this.tolerateError("Getter must not have any formal parameters");const i=this.parsePropertyMethod(s);return this.context.allowYield=t,this.finalize(e,new ci(null,s.params,i,!1,!1))}parseSetterMethod(){const e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;const s=this.parseFormalParameters();1!==s.params.length?this.tolerateError("Setter must have exactly one formal parameter"):s.params[0]instanceof Ni&&this.tolerateError("Setter function argument must not be a rest parameter");const i=this.parsePropertyMethod(s);return this.context.allowYield=t,this.finalize(e,new ci(null,s.params,i,!1,!1))}parseGeneratorMethod(e){const t=this.createNode(),s=this.context.allowYield;this.context.allowYield=!0;const i=this.parseFormalParameters();this.context.allowYield=!1;const n=this.parsePropertyMethod(i);return this.context.allowYield=s,this.finalize(t,new ci(null,i.params,n,!0,e))}isStartOfExpression(){let e=!0;const t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e}parseYieldExpression(){const e=this.createNode();this.expectKeyword("yield");let t=null,s=!1;if(!this.hasLineTerminator){const e=this.context.allowYield;this.context.allowYield=!1,s=this.match("*"),s?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=e}return this.finalize(e,new Zi(t,s))}parseStaticBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new Ri(t))}parseDecorator(){const e=this.createNode();this.expect("@");const t=this.context.strict,s=this.context.allowYield,i=this.context.isAsync;this.context.strict=!1,this.context.allowYield=!0,this.context.isAsync=!1;const n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);return this.context.strict=t,this.context.allowYield=s,this.context.isAsync=i,this.match(";")&&this.throwError("Decorators must not be followed by a semicolon."),this.finalize(e,new Ws(n))}parseDecorators(){let e=null;for(;this.match("@");)null==e&&(e=[]),e.push(this.parseDecorator());return e}parseClassElement(e){let t=this.lookahead;const s=this.createNode(),i=this.context.inConstructor;let n="",r=null,a=null,o=!1,u=!1,c=!1,h=!1,l=!1,p=!1;const d=this.parseDecorators();if(d&&(t=this.lookahead),this.match("*"))this.nextToken();else{o=this.match("["),this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p);const e=r;if(this.context.inConstructor=3===t.type&&"constructor"===t.value,"static"===e.name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,o=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead)):(this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p))),"static"===e.name&&this.match("{"))return this.parseStaticBlock();if(3===t.type&&!this.hasLineTerminator&&"async"===t.value){const e=this.lookahead.value;":"!==e&&"("!==e&&(h=!0,l=this.match("*"),l&&this.nextToken(),t=this.lookahead,o=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(p=!0,this.nextToken())):(this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),r=this.parseObjectPropertyKey(p)),3!==t.type||"constructor"!==t.value||c||this.tolerateUnexpectedToken(t,"Class constructor may not be an async method"))}}3===t.type&&"constructor"===t.value&&p&&this.tolerateUnexpectedToken(t,"Class constructor may not be a private method");const m=this.qualifiedPropertyName(this.lookahead);if(3===t.type||8===t.type?"get"===t.value&&m?(n="get",this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),o=this.match("["),r=this.parseObjectPropertyKey(p),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&m?(n="set",this.match("#")&&(p=!0,this.nextToken(),t=this.lookahead),o=this.match("["),r=this.parseObjectPropertyKey(p),a=this.parseSetterMethod()):this.match("(")||(n="property",o=!1,this.match("=")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression))):7===t.type&&"*"===t.value&&m?(n="init",o=this.match("["),r=this.parseObjectPropertyKey(p),a=this.parseGeneratorMethod(h),u=!0):7!==t.type||"["!==t.value||this.match("(")||(n="property",o=!0,this.match("=")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression))),!n&&r&&this.match("(")){const e=this.context.inClassConstructor;this.context.inClassConstructor="constructor"===t.value,n="init",a=h?this.parsePropertyMethodAsyncFunction(l):this.parsePropertyMethodFunction(l),this.context.inClassConstructor=e,u=!0}return n||this.throwUnexpectedToken(this.lookahead),"init"===n&&(n="method"),o||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,"Classes may not have static property named prototype"),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==n||!u||a&&a.generator)&&this.throwUnexpectedToken(t,"Class constructor may not be an accessor"),e.value?this.throwUnexpectedToken(t,"A class may only have one constructor"):e.value=!0,n="constructor")),this.context.inConstructor=i,"property"===n?(this.consumeSemicolon(),this.finalize(s,new Ti(r,o,a,c,d))):this.finalize(s,new Fi(r,o,a,n,c,d))}parseClassElementList(){const e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e}parseClassBody(){const e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new $s(t))}parseClassDeclaration(e){const t=this.createNode(),s=this.context.strict,i=this.context.allowSuper;this.context.strict=!0,this.expectKeyword("class");const n=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier();let r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const a=this.parseClassBody();return this.context.allowSuper=i,this.context.strict=s,this.finalize(t,new Ys(n,r,a,this.context.decorators))}parseClassExpression(){const e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");const s=3===this.lookahead.type?this.parseVariableIdentifier():null;let i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const n=this.parseClassBody();return this.context.strict=t,this.finalize(e,new js(s,i,n,this.context.decorators))}parseModule(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;const e=this.createNode(),t=this.parseDirectivePrologues();for(;2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new wi(t))}parseScript(){const e=this.createNode(),t=this.parseDirectivePrologues();for(;2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Oi(t))}parseImportAttributes(){if("assert"===this.lookahead.value){this.nextToken(),this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportAttribute()),this.match("}")||this.expectCommaSeparator();return this.expect("}"),e}return null}parseImportAttribute(){const e=this.createNode();3!==this.lookahead.type&&this.throwUnexpectedToken(this.nextToken());const t=this.parseIdentifierName();this.match(":")||this.throwUnexpectedToken(this.nextToken()),this.nextToken();const s=this.nextToken(),i=this.getTokenRaw(s),n=this.finalize(e,new gi(s.value,i));return this.finalize(e,new pi(t,n))}parseModuleSpecifier(){const e=this.createNode();8!==this.lookahead.type&&this.throwError(cn);const t=this.nextToken(),s=this.getTokenRaw(t);return fs.isStringWellFormedUnicode(t.value)||this.throwError(cn),this.finalize(e,new gi(t.value,s))}parseImportSpecifier(){const e=this.createNode();let t,s;return 3===this.lookahead.type?(t=this.parseVariableIdentifier(),s=t,this.matchContextualKeyword("as")&&(this.nextToken(),s=this.parseVariableIdentifier())):(t=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName(),s=t,this.matchContextualKeyword("as")?(this.nextToken(),s=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(e,new xi(s,t))}parseNamedImports(){this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e}parseImportDefaultSpecifier(){const e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new Di(t))}parseImportNamespaceSpecifier(){const e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError("Unexpected token"),this.lookahead.escaped&&this.throwError(dn),this.nextToken();const t=this.parseIdentifierName();return this.finalize(e,new fi(t))}parseImportDeclaration(){this.context.inFunctionBody&&this.throwError(rn);const e=this.createNode();let t;this.expectKeyword("import");let s=[];if(8===this.lookahead.type)t=this.parseModuleSpecifier();else{if(this.match("{")?s=s.concat(this.parseNamedImports()):this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(s.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.match("{")?s=s.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){const e=this.lookahead.value?Cn:pn;this.throwError(e,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}const i=this.parseImportAttributes();return this.consumeSemicolon(),this.finalize(e,new mi(s,t,i))}parseExportSpecifier(){const e=this.createNode(),t=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName();let s=t;return this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(dn),this.nextToken(),s=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName()),this.finalize(e,new ii(t,s))}parseExportDeclaration(){this.context.inFunctionBody&&this.throwError(nn);const e=this.createNode();let t;if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){const s=this.parseFunctionDeclaration(!0);t=this.finalize(e,new ti(s))}else if(this.matchKeyword("class")){const s=this.parseClassDeclaration(!0);t=this.finalize(e,new ti(s))}else if(this.matchContextualKeyword("async")){const s=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new ti(s))}else{this.matchContextualKeyword("from")&&this.throwError(Cn,this.lookahead.value);const s=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new ti(s))}else if(this.match("*")){this.nextToken();let s=null;if(this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(dn),this.nextToken(),s=8==this.lookahead.type?this.parseModuleSpecifier():this.parseIdentifierName()),!this.matchContextualKeyword("from")){const e=this.lookahead.value?Cn:pn;this.throwError(e,this.lookahead.value)}this.lookahead.escaped&&this.throwError(dn),this.nextToken();const i=this.parseModuleSpecifier(),n=this.parseImportAttributes();this.consumeSemicolon(),t=this.finalize(e,new ei(i,s,n))}else if(4===this.lookahead.type){let s;switch(this.lookahead.value){case"let":case"const":s=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":s=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new si(s,[],null,null))}else if(this.matchAsyncFunction()){const s=this.parseFunctionDeclaration();t=this.finalize(e,new si(s,[],null,null))}else{const s=[];let i=null,n=!1,r=null;for(this.expect("{");!this.match("}");)n=n||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.lookahead.escaped&&this.throwError(dn),this.nextToken(),i=this.parseModuleSpecifier(),r=this.parseImportAttributes(),this.consumeSemicolon();else if(n){const e=this.lookahead.value?Cn:pn;this.throwError(e,this.lookahead.value)}else r=this.parseImportAttributes(),this.consumeSemicolon();t=this.finalize(e,new si(null,s,i,r))}return t}},In={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"};function Nn(e){let t;switch(e.type){case ds.JSXIdentifier:t=e.name;break;case ds.JSXNamespacedName:const s=e;t=Nn(s.namespace)+":"+Nn(s.name);break;case ds.JSXMemberExpression:const i=e;t=Nn(i.object)+"."+Nn(i.property)}return t}vn[100]="JSXIdentifier",vn[101]="JSXText";var Pn=class extends Tn{constructor(e,t,s){super(e,t,s)}parsePrimaryExpression(){return this.match("<")?this.parseJSXRoot():super.parsePrimaryExpression()}startJSX(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column}finishJSX(){this.nextToken()}reenterJSX(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()}createJSXNode(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}createJSXChildNode(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}scanXHTMLEntity(e){let t="&",s=!0,i=!1,n=!1,r=!1;for(;!this.scanner.eof()&&s&&!i;){const a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:n="#"===a;break;case 3:n&&(r="x"===a,s=r||fs.isDecimalDigit(a.charCodeAt(0)),n=n&&!r);break;default:s=s&&!(n&&!fs.isDecimalDigit(a.charCodeAt(0))),s=s&&!(r&&!fs.isHexDigit(a.charCodeAt(0)))}}if(s&&i&&t.length>2){const e=t.substr(1,t.length-2);n&&e.length>1?t=String.fromCharCode(parseInt(e.substr(1),10)):r&&e.length>2?t=String.fromCharCode(parseInt("0"+e.substr(1),16)):n||r||!In[e]||(t=In[e])}return t}lexJSX(){const e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){const e=this.scanner.index,t=this.scanner.source[this.scanner.index++];let s="";for(;!this.scanner.eof();){const e=this.scanner.source[this.scanner.index++];if(e===t)break;s+="&"===e?this.scanXHTMLEntity(t):e}return{type:8,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(46===e){const e=this.scanner.source.charCodeAt(this.scanner.index+1),t=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===e&&46===t?"...":".",i=this.scanner.index;return this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:i,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(fs.isIdentifierStart(e)&&92!==e){const e=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){const e=this.scanner.source.charCodeAt(this.scanner.index);if(fs.isIdentifierPart(e)&&92!==e)++this.scanner.index;else{if(45!==e)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(e,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}return this.scanner.lex()}nextJSXToken(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e}nextJSXText(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.scanner.index;let t="";for(;!this.scanner.eof();){const e=this.scanner.source[this.scanner.index];if("{"===e||"<"===e)break;++this.scanner.index,t+=e,fs.isLineTerminator(e.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===e&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;const s={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(s)),s}peekJSXToken(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.lexJSX();return this.scanner.restoreState(e),t}expectJSX(e){const t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)}matchJSX(e){const t=this.peekJSXToken();return 7===t.type&&t.value===e}parseJSXIdentifier(){const e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new As(t.value))}parseJSXElementName(){const e=this.createJSXNode();let t=this.parseJSXIdentifier();if(this.matchJSX(":")){const s=t;this.expectJSX(":");const i=this.parseJSXIdentifier();t=this.finalize(e,new Ss(s,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){const s=t;this.expectJSX(".");const i=this.parseJSXIdentifier();t=this.finalize(e,new Fs(s,i))}return t}parseJSXAttributeName(){const e=this.createJSXNode();let t;const s=this.parseJSXIdentifier();if(this.matchJSX(":")){const i=s;this.expectJSX(":");const n=this.parseJSXIdentifier();t=this.finalize(e,new Ss(i,n))}else t=s;return t}parseJSXStringLiteralAttribute(){const e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);const s=this.getTokenRaw(t);return this.finalize(e,new gi(t.value,s))}parseJSXExpressionAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new Cs(t))}parseJSXAttributeValue(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()}parseJSXNameValueAttribute(){const e=this.createJSXNode(),t=this.parseJSXAttributeName();let s=null;return this.matchJSX("=")&&(this.expectJSX("="),s=this.parseJSXAttributeValue()),this.finalize(e,new ws(t,s))}parseJSXSpreadAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new vs(t))}parseJSXAttributes(){const e=[];for(;!this.matchJSX("/")&&!this.matchJSX(">");){const t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e}parseJSXOpeningElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new bs(!1));const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new ks(t,i,s))}parseJSXBoundaryElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){if(this.expectJSX("/"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new Es);const t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new xs(t))}const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new ks(t,i,s))}parseJSXEmptyExpression(){const e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new ys)}parseJSXExpressionContainer(){const e=this.createJSXNode();let t;return this.expectJSX("{"),this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new Cs(t))}parseJSXChildren(){const e=[];for(;!this.scanner.eof();){const t=this.createJSXChildNode(),s=this.nextJSXText();if(s.start<s.end){const i=this.getTokenRaw(s),n=this.finalize(t,new Bs(s.value,i));e.push(n)}if("{"!==this.scanner.source[this.scanner.index])break;{const t=this.parseJSXExpressionContainer();e.push(t)}}return e}parseComplexJSXElement(e){const t=[];for(;!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());const s=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===ds.JSXOpeningElement){const n=i;if(n.selfClosing){const t=this.finalize(s,new gs(n,[],null));e.children.push(t)}else t.push(e),e={node:s,opening:n,closing:null,children:[]}}if(i.type===ds.JSXClosingElement){e.closing=i;const s=Nn(e.opening.name);if(s!==Nn(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",s),!(t.length>0))break;{const s=this.finalize(e.node,new gs(e.opening,e.children,e.closing));(e=t[t.length-1]).children.push(s),t.pop()}}if(i.type===ds.JSXClosingFragment){if(e.closing=i,e.opening.type===ds.JSXOpeningFragment)break;this.tolerateError("Expected corresponding JSX closing tag for jsx fragment")}}return e}parseJSXElement(){const e=this.createJSXNode(),t=this.parseJSXOpeningElement();let s=[],i=null;if(!t.selfClosing){const n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:s});s=n.children,i=n.closing}return this.finalize(e,new gs(t,s,i))}parseJSXRoot(){this.config.tokens&&this.tokens.pop(),this.startJSX();const e=this.parseJSXElement();return this.finishJSX(),e}isStartOfExpression(){return super.isStartOfExpression()||this.match("<")}};function On(e,t,s){let i=null;const n=(e,t)=>{s&&s(e,t),i&&i.visit(e,t)};let r="function"==typeof s?n:null,a=!1;if(t){a="boolean"==typeof t.comment&&t.comment;const e="boolean"==typeof t.attachComment&&t.attachComment;(a||e)&&(i=new ms,i.attach=e,t.comment=!0,r=n)}let o,u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType),o=t&&"boolean"==typeof t.jsx&&t.jsx?new Pn(e,t,r):new Tn(e,t,r);const c=u?o.parseModule():o.parseScript();return a&&i&&(c.comments=i.comments),o.config.tokens&&(c.tokens=o.tokens),o.config.tolerant&&(c.errors=o.errorHandler.errors),c}var Mn=/* @__PURE__ */fe(e=>{!function e(t){var s,i,n,r,a,o;function u(e){var t,s,i={};for(t in e)e.hasOwnProperty(t)&&(s=e[t],i[t]="object"==typeof s&&null!==s?u(s):s);return i}function c(e,t){this.parent=e,this.key=t}function h(e,t,s,i){this.node=e,this.path=t,this.wrap=s,this.ref=i}function l(){}function p(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function d(e,t){return(e===s.ObjectExpression||e===s.ObjectPattern)&&"properties"===t}function m(e,t){for(var s=e.length-1;s>=0;--s)if(e[s].node===t)return!0;return!1}function D(e,t){return(new l).traverse(e,t)}function f(e,t){var s=function(e,t){for(var s,i,n=e.length,r=0;n;)t(e[i=r+(s=n>>>1)])?n=s:(r=i+1,n-=s+1);return r}(t,function(t){return t.range[0]>e.range[0]});return e.extendedRange=[e.range[0],e.range[1]],s!==t.length&&(e.extendedRange[1]=t[s].range[0]),(s-=1)>=0&&(e.extendedRange[0]=t[s].range[1]),e}return s={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},n={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:r={},Skip:a={},Remove:o={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},l.prototype.path=function(){var e,t,s,i,n;function r(e,t){if(Array.isArray(t))for(s=0,i=t.length;s<i;++s)e.push(t[s]);else e.push(t)}if(!this.__current.path)return null;for(n=[],e=2,t=this.__leavelist.length;e<t;++e)r(n,this.__leavelist[e].path);return r(n,this.__current.path),n},l.prototype.type=function(){return this.current().type||this.__current.wrap},l.prototype.parents=function(){var e,t,s=[];for(e=1,t=this.__leavelist.length;e<t;++e)s.push(this.__leavelist[e].node);return s},l.prototype.current=function(){return this.__current.node},l.prototype.__execute=function(e,t){var s,i=void 0;return s=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=s,i},l.prototype.notify=function(e){this.__state=e},l.prototype.skip=function(){this.notify(a)},l.prototype.break=function(){this.notify(r)},l.prototype.remove=function(){this.notify(o)},l.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=n,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},l.prototype.traverse=function(e,t){var s,i,n,o,u,c,l,D,f,x,E,g;for(this.__initialize(e,t),g={},s=this.__worklist,i=this.__leavelist,s.push(new h(e,null,null,null)),i.push(new h(null,null,null,null));s.length;)if((n=s.pop())!==g){if(n.node){if(c=this.__execute(t.enter,n),this.__state===r||c===r)return;if(s.push(g),i.push(n),this.__state===a||c===a)continue;if(u=(o=n.node).type||n.wrap,!(x=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");x=this.__fallback(o)}for(D=x.length;(D-=1)>=0;)if(E=o[l=x[D]])if(Array.isArray(E)){for(f=E.length;(f-=1)>=0;)if(E[f]&&!m(i,E[f])){if(d(u,x[D]))n=new h(E[f],[l,f],"Property",null);else{if(!p(E[f]))continue;n=new h(E[f],[l,f],null,null)}s.push(n)}}else if(p(E)){if(m(i,E))continue;s.push(new h(E,l,null,null))}}}else if(n=i.pop(),c=this.__execute(t.leave,n),this.__state===r||c===r)return},l.prototype.replace=function(e,t){var s,i,n,u,l,m,D,f,x,E,g,y,C;function A(e){var t,i,n,r;if(e.ref.remove())for(i=e.ref.key,r=e.ref.parent,t=s.length;t--;)if((n=s[t]).ref&&n.ref.parent===r){if(n.ref.key<i)break;--n.ref.key}}for(this.__initialize(e,t),g={},s=this.__worklist,i=this.__leavelist,m=new h(e,null,null,new c(y={root:e},"root")),s.push(m),i.push(m);s.length;)if((m=s.pop())!==g){if(void 0!==(l=this.__execute(t.enter,m))&&l!==r&&l!==a&&l!==o&&(m.ref.replace(l),m.node=l),this.__state!==o&&l!==o||(A(m),m.node=null),this.__state===r||l===r)return y.root;if((n=m.node)&&(s.push(g),i.push(m),this.__state!==a&&l!==a)){if(u=n.type||m.wrap,!(x=this.__keys[u])){if(!this.__fallback)throw new Error("Unknown node type "+u+".");x=this.__fallback(n)}for(D=x.length;(D-=1)>=0;)if(E=n[C=x[D]])if(Array.isArray(E)){for(f=E.length;(f-=1)>=0;)if(E[f]){if(d(u,x[D]))m=new h(E[f],[C,f],"Property",new c(E,f));else{if(!p(E[f]))continue;m=new h(E[f],[C,f],null,new c(E,f))}s.push(m)}}else p(E)&&s.push(new h(E,C,null,new c(n,C)))}}else if(m=i.pop(),void 0!==(l=this.__execute(t.leave,m))&&l!==r&&l!==a&&l!==o&&m.ref.replace(l),this.__state!==o&&l!==o||A(m),this.__state===r||l===r)return y.root;return y.root},t.Syntax=s,t.traverse=D,t.replace=function(e,t){return(new l).replace(e,t)},t.attachComments=function(e,t,s){var n,r,a,o,c=[];if(!e.range)throw new Error("attachComments needs range information");if(!s.length){if(t.length){for(a=0,r=t.length;a<r;a+=1)(n=u(t[a])).extendedRange=[0,e.range[0]],c.push(n);e.leadingComments=c}return e}for(a=0,r=t.length;a<r;a+=1)c.push(f(u(t[a]),s));return o=0,D(e,{enter:function(e){for(var t;o<c.length&&!((t=c[o]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(o,1)):o+=1;return o===c.length?i.Break:c[o].extendedRange[0]>e.range[1]?i.Skip:void 0}}),o=0,D(e,{leave:function(e){for(var t;o<c.length&&(t=c[o],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),c.splice(o,1)):o+=1;return o===c.length?i.Break:c[o].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=n,t.VisitorOption=i,t.Controller=l,t.cloneEnvironment=function(){return e({})},t}(e)}),_n=/* @__PURE__ */Ee(Mn(),1),Rn="undefined"!=typeof window&&"undefined"!=typeof document,Un=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),Object.prototype.toString),Ln=()=>{},zn=e=>e();function Jn(e,t={}){let s,i,n=Ln;const r=e=>{clearTimeout(e),n(),n=Ln};let a;return o=>{const u=te(e),c=te(t.maxWait);return s&&r(s),u<=0||void 0!==c&&c<=0?(i&&(r(i),i=void 0),Promise.resolve(o())):new Promise((e,h)=>{n=t.rejectOnCancel?h:e,a=o,c&&!i&&(i=setTimeout(()=>{s&&r(s),i=void 0,e(a())},c)),s=setTimeout(()=>{i&&r(i),i=void 0,e(o())},u)})}}function Kn(e){return Array.isArray(e)?e:[e]}function Xn(e){const t=Object.create(null);return s=>t[s]||(t[s]=e(s))}var $n=/\B([A-Z])/g,Yn=(Xn(e=>e.replace($n,"-$1").toLowerCase()),/-(\w)/g);function jn(e,t,s={}){const{eventFilter:i=zn,...n}=s;return ie(e,(r=i,a=t,function(...e){return new Promise((t,s)=>{Promise.resolve(r(()=>a.apply(this,e),{fn:a,thisArg:this,args:e})).then(t).catch(s)})}),n);var r,a}function Gn(e,t=!0,s){!function(e){return e||R()}(s)?t?e():z(e):X(e,s)}function Vn(e,t,s={}){const{debounce:i=0,maxWait:n,...r}=s;return jn(e,t,{...r,eventFilter:Jn(i,{maxWait:n})})}Xn(e=>e.replace(Yn,(e,t)=>t?t.toUpperCase():""));var Hn=Rn?window:void 0,Wn=Rn?window.document:void 0;function qn(...e){const t=N(()=>{const t=Kn(te(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return s=([e,t,s,i],n,r)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==s?void 0:s.length))return;const a=(o=i,"[object Object]"===Un.call(o)?{...i}:i);var o;const u=e.flatMap(e=>t.flatMap(t=>s.map(s=>((e,t,s,i)=>(e.addEventListener(t,s,i),()=>e.removeEventListener(t,s,i)))(e,t,s,a))));r(()=>{u.forEach(e=>e())})},i={flush:"post"},ie(()=>{var s,i;return[null!==(s=null===(i=t.value)||void 0===i?void 0:i.map(e=>function(e){var t;const s=te(e);return null!==(t=null==s?void 0:s.$el)&&void 0!==t?t:s}(e)))&&void 0!==s?s:[Hn].filter(e=>null!=e),Kn(te(t.value?e[1]:e[0])),Kn(se(t.value?e[2]:e[1])),te(t.value?e[3]:e[2])]},s,{...i,immediate:!0});var s,i}Rn&&window.navigator,Rn&&window.location;var Qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Zn="__vueuse_ssr_handlers__",er=/* @__PURE__ */tr();function tr(){return Zn in Qn||(Qn[Zn]=Qn[Zn]||{}),Qn[Zn]}var sr={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ir="vueuse-storage";function nr(e,t,s,i={}){var n;const{flush:r="pre",deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:h,window:l=Hn,eventFilter:p,onError:d=e=>{console.error(e)},initOnMounted:m}=i,D=(h?Q:W)("function"==typeof t?t():t),f=N(()=>te(e));if(!s)try{s=(er.getDefaultStorage||(()=>null==Hn?void 0:Hn.localStorage))()}catch(S){d(S)}if(!s)return D;const x=te(t),E=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(x),g=null!==(n=i.serializer)&&void 0!==n?n:sr[E],{pause:y,resume:C}=function(e,t,s={}){const{eventFilter:i,initialState:n="active",...r}=s,{eventFilter:a,pause:o,resume:u,isActive:c}=function(e=zn,t={}){const{initialState:s="active"}=t,i=function(...e){if(1!==e.length)return ee(...e);const t=e[0];return"function"==typeof t?H(M(()=>({get:t,set:Ln}))):W(t)}("active"===s);return{isActive:H(i),pause:function(){i.value=!1},resume:function(){i.value=!0},eventFilter:(...t)=>{i.value&&e(...t)}}}(i,{initialState:n});return{stop:jn(e,t,{...r,eventFilter:a}),pause:o,resume:u,isActive:c}}(D,e=>function(e){try{const t=s.getItem(f.value);if(null==e)F(t,null),s.removeItem(f.value);else{const i=g.write(e);t!==i&&(s.setItem(f.value,i),F(t,i))}}catch(S){d(S)}}(e),{flush:r,deep:a,eventFilter:p});ie(f,()=>w(),{flush:r});let A=!1;function F(e,t){if(l){const i={key:f.value,oldValue:e,newValue:t,storageArea:s};l.dispatchEvent(s instanceof Storage?new StorageEvent("storage",i):new CustomEvent(ir,{detail:i}))}}function w(e){if(!e||e.storageArea===s)if(e&&null==e.key)D.value=x;else if(!e||e.key===f.value){y();try{const t=g.write(D.value);void 0!==e&&(null==e?void 0:e.newValue)===t||(D.value=function(e){const t=e?e.newValue:s.getItem(f.value);if(null==t)return u&&null!=x&&s.setItem(f.value,g.write(x)),x;if(!e&&c){const e=g.read(t);return"function"==typeof c?c(e,x):"object"!==E||Array.isArray(e)?e:{...x,...e}}return"string"!=typeof t?t:g.read(t)}(e))}catch(S){d(S)}finally{e?z(C):C()}}}return l&&o&&(s instanceof Storage?qn(l,"storage",e=>{m&&!A||w(e)},{passive:!0}):qn(l,ir,e=>{m&&!A||w(e.detail)})),m?Gn(()=>{A=!0,w()}):w(),D}function rr(e,t){const s=(null==t?void 0:t.cache)?q(t.cache):q(/* @__PURE__ */new Map),i=(...e)=>(null==t?void 0:t.getKey)?t.getKey(...e):JSON.stringify(e),n=(t,...i)=>(s.set(t,e(...i)),s.get(t)),r=(...e)=>{const t=i(...e);return s.has(t)?s.get(t):n(t,...e)};return r.load=(...e)=>n(i(...e),...e),r.delete=(...e)=>{s.delete(i(...e))},r.clear=()=>{s.clear()},r.generateKey=i,r.cache=s,r}var ar=0;Number.POSITIVE_INFINITY,window._METHOD_DEBUG_=_e;var or=rr(function(e,t=!1){const s=On(e);let i=[];return _n.default.traverse(s,{enter:function(e){if(e.type===ce.MemberExpression){const t=cr(e);i.push(t),Object.assign(e,{name:t,type:ce.Identifier})}else e.type===ce.Identifier&&i.push(e.name);i=t?i.filter(e=>!x[e]&&"undefined"!==e):i.filter(e=>!(x[e]||"undefined"===e||E.includes(e)||e.startsWith(D)||e.startsWith("undefined.")))}}),[...new Set(i)]}),ur=rr(async function(e,t){const s=or(e,!0),i=s.filter(e=>E.includes(e)).sort(),n=s.filter(e=>e.startsWith(D)).sort(),r=await lr([...i,...n]),a=On(e);_n.default.replace(a,{enter(e){if(e.type===ce.BinaryExpression){const{operator:t}=e,s=g[t];return s?{type:ce.CallExpression,arguments:[e.left,e.right],callee:{type:ce.Identifier,name:s},optional:!1}:e}return e}}),_n.default.traverse(a,{enter:function(e){e.type===ce.CallExpression&&e.callee.type===ce.Identifier&&(e.callee.name=`await Methods.${e.callee.name}`)}});const o={},u=[];r.forEach(e=>{u.push(`const ${e.key} = ${JSON.stringify(e.value)};`)}),Object.keys(t).map(e=>{if(e.includes(".")){const[s="",i]=e.split(".");o[s]||(u.push(`const ${s} = {};`),o[s]=!0),u.push(`${s}.${i} = ${JSON.stringify(t[e])};`)}else u.push(`const ${e} = ${JSON.stringify(t[e])};`)});const c=new hr("Methods",[...u,"return new Promise(async(resolve)=>{","const res = ;","resolve(res);","})"].join("\n")),h=await c(_e);return console.info("【表达式】",e),console.info("【参数】",t),console.info("【执行语句】",c.toString()),console.info("【执行结果】",h),h});function cr(e){return e.type===ce.MemberExpression?`${e.object.type===ce.MemberExpression?cr(e.object):e.object.name}.${e.property.name}`:e.type===ce.Identifier?e.name:""}var hr=Object.getPrototypeOf(async function(){}).constructor,lr=rr(async function(e){let t=[];return e.length>0&&(t=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:e.join(",")})),t});window.gct_expression={execute:ur,identify:or};var pr={[o.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},dr=(e,t)=>{const{attrsTransform:s=[]}=pr[e]??{};return s.reduce((e,s)=>{const i=k(t,s.from);return e[s.to]=i,e},{})},mr=class extends m{static async loadRenderPlugin(e,t=[]){try{const s=await this.loadPlugins(e,t);t.forEach(e=>{const t=e.key;s[t]?_gct.register.render.register(t,s[t].default):console.error(`${t} 插件加载失败,请检查插件配置是否正确`)})}catch(s){console.error(s)}}static loadMobilePlugin(e=[]){return this.loadRenderPlugin(d.MOBILE,e)}static loadPadPlugin(e=[]){return this.loadRenderPlugin(d.PAD,e)}static loadWebPlugin(e=[]){return this.loadRenderPlugin(d.WEB,e)}};function Dr(e){const{style:t={}}=e||{},s="ignoringStyle"in e?e.ignoringStyle??[]:[],i=oe(t);return{wrapperStyle:ae(t,s),wStyle:i,labelFont:re(t.labelFont),contentFont:re(t.contentFont)}}var fr=e=>re(e),xr=class{static modelData=/* @__PURE__ */new Map;static FiledData=/* @__PURE__ */new Map;static responsePromise=/* @__PURE__ */new Map;static silent=!1;static async getMap(e,t=!0){if(!e)return Promise.reject();if(!this.responsePromise.has(e)||!t){const t=(async()=>{const t=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,t);const s=!!t?.fieldMetaList&&t.fieldMetaList.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{});s&&this.FiledData.set(e,s)})();this.responsePromise.set(e,t)}return this.responsePromise.get(e)}static async getConfigByField(e,t,s=!0){return await this.getMap(e,s),this.FiledData.get(e)[t]}static async getConfigByModel(e){return await this.getMap(e),this.modelData.get(e)}static clearCacheMap(e=!1){e&&this.responsePromise.clear(),this.modelData.clear(),this.FiledData.clear()}};async function Er(e,t=!1){const{modelKey:s,field:i,isCustomField:n,fieldName:r,readonly:a,fieldType:o}=e.props;if(!e.isField&&!t||"table_name_"===i)return{};let u;if(n?u={name:r,type:""}:s&&(u=await xr.getConfigByField(s,i)),!(n||u&&u.type===o))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:h}=u;return e.props.fieldRequired=!!c,c&&!a&&(e.props.required=!0),void 0!==h?.digits&&(e.props.precision=h.digits),u}function gr(e,t){return e?.map(e=>yr(e,t))||[]}function yr(e={},t={}){const s=w(e);s._X_ROW_KEY=void 0;const i=Object.keys(t??{})?.length?Object.keys(s).reduce((e,i)=>{const n=t[i],r=s[i];if(n&&r)try{const t=(r+"").split(",").map(e=>n[e]);e[i]={[r+""]:t}}catch{}return e},{}):s._DICT||{};return{...s,_DICT:i,_OPCT:s.__FOREIGN__&&"object"==typeof s.__FOREIGN__?yr(s.__FOREIGN__,t):{}}}function Cr(e,t,s){"object"==typeof t&&T(e,yr(t,s))}function Ar(e,t,s){if("object"!=typeof t)return;for(const n in e)"_OPCT"!==n&&"_NOSUBMIT"!==n&&delete e[n];const i=yr(t,s);i._X_ROW_KEY=t._X_ROW_KEY,T(e,i)}function Fr(e,t={},s={}){const i=w(t.__FOREIGN__||t),n={_DICT:{}};return Object.keys(i).forEach(t=>{const r=`${e}.${t}`,a=s[t],o=i[t];if(a&&o)try{const e=(o+"").split(",").map(e=>a[e]);n._DICT[r]={[o+""]:e}}catch{}n[r]=o}),{...i,_OPCT:n}}function wr(e={},t={}){const s=w(e);return Object.keys(t??{})?.length?Object.keys(s).reduce((e,i)=>{const n=t[i]||{},r=s[i];try{e[i]=(r+"").split(",").map(e=>n[e]).join(",")}catch{e[i]=r}return e},{}):s}var Sr=class{static cachedata={};static set(e,t,s){this.cachedata[e]={maxAge:s||0,value:t,now:Date.now()}}static get(e){this.reset();const t=this.cachedata[e];return t?t.value:null}static delete(e){return delete this.cachedata[e]}static clear(){this.cachedata={}}static reset(){for(const e in this.cachedata){const t=this.cachedata[e];t&&Date.now()-t.now>t.maxAge&&this.delete(e)}}};async function kr({ids:e,refOriginField:t,refOriginFieldType:s,model:i,foreignFields:n}){if(!e)return Promise.reject();const a=await async function({refOriginFieldType:e,modelKey:t,foreignFields:s,ids:i}){if(e===o.RDO_REF){const{data:e={},dict:n={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:r.ENTITY},{foreignFields:s},{refId:i});return{data:e,dict:n}}{const{data:e={},dict:n={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:r.ENTITY},{query:{"id_.eq":i},foreignFields:s},{});return{data:e,dict:n}}}({refOriginFieldType:s,modelKey:i,foreignFields:n,ids:e});return a?.data?Fr(t,a.data,a.dict):void 0}var br=e=>function(e,t,s=!1){if(s||e?.customApi?.value)return t(e);const i="object"==typeof e?ue.stringify({...e,customApi:null}):e;let n=Sr.get(i);return n||(n=(async()=>{try{return await t(e)}catch(s){throw Sr.delete(i),s}})(),Sr.set(i,n,5e3),n)}(e,kr),vr={class:"handwriting-pad"},Br=["width","height"],Tr=/* @__PURE__ */(e=>{const t=e.__vccOpts||e;for(const[s,i]of[["__scopeId","data-v-d5b980b7"]])t[s]=i;return t})(/* @__PURE__ */_({__name:"HandwritingPad",props:{width:{default:300},height:{default:150},backgroundColor:{default:"transparent"},lineWidth:{default:2},strokeStyle:{default:"#000"}},setup(e,{expose:t}){const s=e,i=W(null);let n=null,r=!1,a=0,o=0;function u(e){const t=i.value.getBoundingClientRect();return"touches"in e?{x:e.touches[0].clientX-t.left,y:e.touches[0].clientY-t.top}:{x:e.offsetX,y:e.offsetY}}function c(e){e.preventDefault(),r=!0;const{x:t,y:s}=u(e);a=t,o=s}function h(e){if(!r||!n)return;e.preventDefault();const{x:t,y:s}=u(e);n.beginPath(),n.moveTo(a,o),n.lineTo(t,s),n.stroke(),n.closePath(),a=t,o=s}function l(e){e.preventDefault(),r=!1}return X(()=>{n=i.value.getContext("2d"),"transparent"!==s.backgroundColor&&(n.fillStyle=s.backgroundColor,n.fillRect(0,0,s.width,s.height)),n.lineWidth=s.lineWidth,n.strokeStyle=s.strokeStyle}),t({getValue:function(){return i.value?.toDataURL()},setValue:function(e){const t=new Image;t.src=e,t.onload=()=>{n?.drawImage(t,0,0)}},clear:function(){n?.clearRect(0,0,s.width,s.height),"transparent"!==s.backgroundColor&&(n.fillStyle=s.backgroundColor,n.fillRect(0,0,s.width,s.height))}}),(t,s)=>(j(),P("div",vr,[O("canvas",{ref_key:"canvasRef",ref:i,width:e.width,height:e.height,class:"canvas",onMousedown:c,onMousemove:h,onMouseup:l,onMouseleave:l,onTouchstart:c,onTouchmove:h,onTouchend:l},null,40,Br)]))}})),Ir=/* @__PURE__ */function(e){return e.SELECT_ID="$VAR_GCT_SELECT_ID",e}({}),Nr=function(e,t,s={}){const{window:i=Hn}=s;return nr(e,t,null==i?void 0:i.localStorage,s)}("GCT_APP_GlobalCache",{}),Pr=e=>{const t=N({get:()=>Nr.value[e]||{},set(t){Nr.value[e]=t}});return{selectID:N({get:()=>t.value[Ir.SELECT_ID],set(e){t.value[Ir.SELECT_ID]?t.value[Ir.SELECT_ID]=e:t.value={...t.value,[Ir.SELECT_ID]:e}}}),cacheMap:t}},Or=class{static ENV;static AID;static userInfo;static runApp({userInfo:e,env:t,aid:s}){this.ENV=t,this.AID=s,this.userInfo=e}},Mr={[h.DATE]:{callback:e=>A(e,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid(),message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[h.TIME]:{callback:e=>A(e,"HH:mm:ss",!0).isValid(),message:"时间变量格式HH:mm:ss"},[h.DATETIME]:{callback:e=>A(e,["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss"]).isValid(),message:"日期时间变量格式为YYYY-MM-DD HH:mm:ss,YYYY/MM/DD HH:mm:ss"}},_r=/* @__PURE__ */function(e){return e.WEB="web_module",e.MOBILE="mobile_module",e.PAD="pad_module",e}({}),Rr={[_r.WEB]:{getPageInfo:_gct.api.apaas.webpage.getInfo},[_r.MOBILE]:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},[_r.PAD]:{getPageInfo:_gct.api.apaas.padPage.getInfo}},Ur=W({}),Lr=W({}),zr=W({});function Jr(e,t){zr.value[e]=t}var Kr=W({pageStyle:{},pageConfig:{},pageName:""}),Xr=ee(()=>{const{title:e}=Kr.value.pageConfig||{};return e}),$r=class e{static modalsCache={};static pageID="";static permissions={};static ContextCache={};static startRuning=!1;static globalHookCaches={pageMounted:[],pageActivated:[],pageDestroyed:[]};static setModals(e){this.modalsCache={},e?.forEach(e=>{this.modalsCache[e.id]=e})}static async getModalById(e){if(!e)return Promise.reject();if(/^i?g_modal_/.test(e)&&!this.modalsCache[e]){const[t]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(t?.configJson){const s=JSON.parse(t.configJson);this.modalsCache[e]=s}}return this.modalsCache[e]||(console.error(`模态框${e}不存在`),Promise.reject())}static getPremission(e){if(!e)return!0;const t=this.permissions[e];return!t||C().getPermissionByKey(this.pageID,t)}static setPremission(e,t){this.permissions[t]=e}static setContextByKey(e,t){t?this.ContextCache[t]=e:this.ContextCache={page:e}}static getContextByKey(e){return this.ContextCache[e||"page"]}static async initvars(){(await _gct.api.apaas.appGlobalSettings.getList({type:"var",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=JSON.parse(e.configJson);Lr.value[t.key]=(({value:e,appredis:t,key:s,type:i})=>{const n="dev"!==Or.ENV&&t,{cacheMap:r}=Pr(`${Or.AID}_${Or.userInfo?.userId}`);return new Proxy({value:e,type:i},{get:(e,t)=>n&&"value"===t?r.value[s]:Reflect.get(e,t),set:(e,t,i,a)=>(n&&"value"===t&&(r.value[s]?r.value[s]=i:r.value={...r.value,[s]:i}),Reflect.set(e,t,i,a))})})({value:t.defaultValue,appredis:t.appredis,key:t.key,type:t.type})}catch(t){console.error("initvars",t)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(e=>{if(e.configJson)try{const t=new Function(JSON.parse(e.configJson).runJs),s=this.globalHookCaches[e.key];s&&s.push(t)}catch(t){console.error("inithooks",t)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){if(this.setModals(e.modals),e.pageVars?.forEach(e=>{Ur.value[e.key]={value:e.varInfo?.defaultValue,type:e.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(t){console.log(t)}}}static getGlobalVar(e){const t=Lr.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const s=Lr.value[e];if(!s)return console.warn("变量key不存在");s.value=t}static getPageVar(e){const t=Ur.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const s=Ur.value[e];if(!s)return console.warn("变量key不存在");await function(e,t){if(t===h.NULL)return!0;const{callback:s,message:i}=Mr[t]||{callback:e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===t,value:"变量值必须为"+t};return s(e)?Promise.resolve():Promise.reject(i)}(t,s.type),Ur.value[e]&&(Ur.value[e].value=t)}static getPageGlobalVar(e){return Ur.value[e]?.value}static setPageGlobalVar(e,t){Ur.value[e]?Ur.value[e].value=t:Ur.value[e]={value:t,type:"string"}}static async initPageByid(e,t=_r.WEB){this.pageID=e;const s=Rr[t].getPageInfo,i=await s({id:e}),{runtimeJson:n,name:r}=i||{};if(Kr.value.pageName=r,!n)return Promise.reject();const a=JSON.parse(n);return a.widgets.filter(e=>"bottom-button-container"!==e.type).length?(await this.initGlobalS(a),Kr.value.pageConfig=a.pageConfig||{},Kr.value.pageStyle=a.pageStyle||{},{res:i,data:a,name:r}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:s,name:i}=t||{};if(!s)return Promise.reject();Kr.value.pageName=i;const n=JSON.parse(s);return await this.initGlobalS(n),Kr.value.pageConfig=n.pageConfig||{},Kr.value.pageStyle=n.pageStyle||{},{res:t,data:n,name:i}}static usePageHooks(t,s,i,n){const r=W(!1);return X(async()=>{await z();const e=s?.pageBeforeMount;if(e?.name&&await t.runExportByName(e.name,e.extraParams),n&&await n(t),r.value=!0,i?.pageMounted)for(const t of this.globalHookCaches.pageMounted)await t();const{extraParams:a,name:o}=s?.pageMounted||{};o&&t.runAsyncExportByName(o,a)}),K(async()=>{Kr.value={};const{extraParams:e,name:n}=s?.pageDestroyed||{};if(n&&t.runExportByName(n,e),i?.pageDestroyed)for(const t of this.globalHookCaches.pageDestroyed)await t()}),J(async()=>{if(e.setContextByKey(t.context),i?.pageActivated)for(const e of this.globalHookCaches.pageActivated)await e();const{extraParams:n,name:r}=s?.pageActivated||{};r&&t.runAsyncExportByName(r,n)}),{pageload:r}}},Yr=$r.getPremission.bind($r),jr=e=>(t,s={},i={},n={})=>e({modelKey:t.key,bsKey:t.action,modelCategory:t.modelCategory??r.ENTITY},s,i,n),Gr={post:jr(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:jr(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:jr(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:jr(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function Vr(e,s,...i){return Gr[t[e.action]](e,s,...i)}async function Hr(e,t,{body:s={},query:i={}}={},n={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:t,modelKey:e,modelCategory:r.ENTITY},i,s,n)}var Wr=new class e{static instance;mask;container;spinner;constructor(){if(e.instance)return e.instance;e.instance=this,this.createLoadingElement(),this.initStyle()}createLoadingElement(){this.mask=document.createElement("div"),this.mask.id="gct-global-loading-mask",this.container=document.createElement("div"),this.container.id="gct-global-loading-container",this.spinner=document.createElement("div"),this.spinner.id="gct-global-loading-spinner",this.container.appendChild(this.spinner),this.mask.appendChild(this.container),document.body.appendChild(this.mask)}initStyle(){Object.assign(this.mask.style,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999,display:"none",justifyContent:"center",alignItems:"center"}),Object.assign(this.container.style,{display:"flex",flexDirection:"column",alignItems:"center",width:"43px",height:"43px",backgroundColor:"transparent",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.15)"}),Object.assign(this.spinner.style,{display:"grid",width:"43px",height:"43px",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",gap:"3px"});const e=getComputedStyle(document.documentElement).getPropertyValue("--gct-color-primary").trim();[{id:"gct-global-loading-item_1",delay:"0s"},{id:"gct-global-loading-item_2",delay:"0.25s"},{id:"gct-global-loading-item_3",delay:"0.75s"},{id:"gct-global-loading-item_4",delay:"0.5s"}].forEach(t=>{const s=document.createElement("div");s.id=t.id,Object.assign(s.style,{backgroundColor:e,opacity:.2,animation:"globalLoading 1s infinite",animationDelay:t.delay}),this.spinner.appendChild(s)});const t=document.createElement("style");t.textContent="\n @keyframes globalLoading {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n }",document.head.appendChild(t)}show(){this.mask.style.display="flex",document.body.style.overflow="hidden"}hide(){this.mask.style.display="none",document.body.style.overflow=""}},qr=class{isHandle=!1;buttonConfig={};fieldConfig={};processId="";dataId="";taskId;processInstanceId;refFormId;examineAndApproveState=a.MY_CUSTOM;fieldStatus="";viewPageKey;isviewPage;isAPPviewPage;nonRelatedPerson=!1;constructor({taskId:e,processInstanceId:t,examineAndApproveState:s=a.MY_CUSTOM,refFormId:i}){this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=s,this.refFormId=i}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===a.MY_AGENT){await this.getDataInfo();const{node:t,processDefId:i,webViewPageKey:n,mobileViewPageKey:r}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(t),this.processId=i;for(const e in this.buttonConfig)e===s.Withdraw&&(this.buttonConfig[e].show=!1);this.viewPageKey=t?.webViewPageKey||n,this.isAPPviewPage=!!t?.mobileViewPageKey||!!r}if(this.examineAndApproveState===a.MY_APPLICATION){await this.getDataInfo();const{node:e,processDefId:i,withdrawOp:n}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(e),this.processId=i;for(const t in this.buttonConfig)t===s.End&&(this.buttonConfig[t].show=!1),t===s.Withdraw&&(this.buttonConfig[t].show=!!n),t===s.Resubmit&&(this.buttonConfig[t].show=!1)}if(this.examineAndApproveState===a.MY_DONE){await this.getDataInfo();const{node:t,processDefId:s}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(t),this.processId=s}if(this.examineAndApproveState===a.MY_CUSTOM){await this.getDataInfo();const{node:e,processDefId:s,btnList:i,webViewPageKey:n,taskId:r,initiatorNode:a}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),o=i||[];this.withdrawByNode(a),this.transformByNode(e),this.processId=s;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=o.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);!o.length||"__initiator__"===e?.key&&!r?this.isviewPage=!0:this.viewPageKey=e?.webViewPageKey||n}if(this.examineAndApproveState===a.MY_CUSTOM_Modal){await this.getDataInfo();const{node:e,btnList:s,taskId:i,processDefId:n,initiatorNode:r}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),a=s||[];this.withdrawByNode(r),this.transformByNode(e),this.processId=n;for(const t in this.buttonConfig){const e=t;this.buttonConfig[e].show&&(this.buttonConfig[e].show=a.includes(t))}if(!e)return void(this.nonRelatedPerson=!0);a.length&&("__initiator__"!==e?.key||i)||(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(e=>{const t=y(`sys.process.paasBpmnButtonEvent.${e.type}`);this.buttonConfig[e.type]={showModel:!1,title:y("sys.process.element.approval")+t,success:t+y("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:i,fieldConfig:n}=e,r=JSON.parse(i||"[]"),a=JSON.parse(t||'{"enabled":false,"opinionType":[]}');r.forEach(e=>{const t=y(`sys.process.paasBpmnButtonEvent.${e.type}`);var i,n;this.buttonConfig[e.type]={showModel:![s.Resubmit,s.Withdraw,s.End].includes(e.type),title:y("sys.process.element.approval")+t,success:t+y("sys.success")+"!",show:e.enable,alias:e.alias,signature:!!e.signature,opinion:{show:a.enabled,required:(i=a.opinionType,n=e.type,!!i.includes(p.Required)||!i.includes(p.Optional)&&(i.includes(p.ApproveRequired)||i.includes(p.ApproveRequired)?n===s.Approve:i.includes(p.CountersignRequired)?n===s.Countersign:i.includes(p.ReassignRequired)?n===s.Reassign:i.includes(p.RejectRequired)?n===s.Reject:i.includes(p.RefuseRequired)?n===s.Refuse:void 0))},user:{show:[s.Reassign,s.Countersign].includes(e.type),multiple:s.Countersign===e.type,label:y(`sys.process.user.${e.type}`)}}}),this.fieldConfig=JSON.parse(n+"")}catch(t){console.log("流程信息解析失败",t)}}async getDataInfo(){const{dataId:e}=await _gct.api.apaas.pmProcessEngine.getModel({processInstanceId:this.processInstanceId});this.dataId=e}filterButton(e){return this.nonRelatedPerson||this.examineAndApproveState===a.MY_DONE?[]:e.filter(e=>{if(e.type===c.ProcessApproveButton){const t=this.buttonConfig[e.props.action],s=!!t?.show;return s&&(e.props.title=t.alias),s}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:s,examineAndApproveState:i}=this;if(s&&s[t]){const{permission:i}=s[t];switch(i){case Qr.disabled:e.props.disabled=!0,e.props.readonly=!1;break;case Qr.editable:e.props.disabled=!1,e.props.readonly=!1;break;case Qr.readonly:e.props.readonly=!0}}else e.props.readonly=!0;e.props.disabled||![a.MY_APPLICATION,a.MY_DONE].includes(i)&&!this.isviewPage||(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:s}=this;if(s&&s[t]){const{permission:i}=s[t];i===Qr.hidden&&(e.props.hidden=!0)}}};var Qr=/* @__PURE__ */function(e){return e.hidden="hidden",e.readonly="readonly",e.disabled="disabled",e.editable="editable",e}({}),Zr=class{context;searchVNodes;cssData;pageKey;exports;#e;#t;ProcessAppRoved;pageLayoutMode;constructor({js:e,css:t,pageKey:s,ContextVm:i}){this.cssData=this.#s(t),this.searchVNodes={},this.exports={},this.#t={},this.#e={},this.context=new i({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),this.#i(e),$r.setContextByKey(this.context,s),this.pageKey=s}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:i}){this.ProcessAppRoved=new qr({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:i}),await this.ProcessAppRoved.readyProcess()}#s(e,t={}){if(!e)return;const{css:s,load:i,unload:n}=function(e,t={}){const s=Q(!1),{document:i=Wn,immediate:n=!0,manual:r=!1,id:a="vueuse_styletag_"+ ++ar}=t,o=Q(e);let u=()=>{};const c=()=>{if(!i)return;const e=i.getElementById(a)||i.createElement("style");e.isConnected||(e.id=a,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),i.head.appendChild(e)),s.value||(u=ie(o,t=>{e.textContent=t},{immediate:!0}),s.value=!0)},h=()=>{i&&s.value&&(u(),i.head.removeChild(i.getElementById(a)),s.value=!1)};var l;return n&&!r&&Gn(c),r||(l=h,U()&&$(l,void 0)),{id:a,css:o,unload:h,load:c,isLoaded:H(s)}}(e,t);return{css:s,load:i,unload:n}}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...s){const i=t[e];let n;if(i){if(Array.isArray(i))n=await async function(e,t,s){const i=e.map(sa.bind(t,s));await Promise.all(i)}(i,this.context,s);else{const e=this.exports[i.name];if(!e)throw`函数${i.name}不存在`;n=await e(...s,Z(i.extraParams))}return n}}async runExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return s(...t)}catch(s){console.error(s)}}async runAsyncExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return await this.getReadyByFun(s),s(...t)}catch(s){console.error(s)}}#i(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}initNode(e,t){e&&(this.#t[e]=t,this.#n(e,t))}destroyNode(e){delete this.#t[e],delete this.#e[e]}initSearchs(e,t,s){if(e)if(this.searchVNodes[e]){const i=this.searchVNodes[e].find(e=>e.comId===s);i?i.callback=t:this.searchVNodes[e].push({callback:t,comId:s})}else this.searchVNodes[e]=[{callback:t,comId:s}]}cancelInitSearchs(e,t){e&&this.searchVNodes[e]&&(this.searchVNodes[e]=this.searchVNodes[e].filter(e=>e.comId!==t),0===this.searchVNodes[e].length&&delete this.searchVNodes[e])}runTableBySearch(e,t){(this.searchVNodes[e]||[]).forEach(({callback:e})=>e(t))}#r(e,t){const s=this.#t[e];s?t(e,s):this.#e[e]?this.#e[e].push(t):this.#e[e]=[t]}#n(e,t){this.#e[e]&&this.#e[e].forEach(e=>{e(t)})}getComponent(e){const t=this.#t[e];if(t)return new ta(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=this.#t[e];return t?Promise.resolve(new ta(e,t)):new Promise((t,s)=>{const i=setTimeout(()=>{s(e+"不存在或者被隐藏")},3e4);this.#r(e,s=>{clearTimeout(i),t(new ta(e,s))})})}async getReadyByFun(e){if("function"!=typeof e)return Promise.reject("参数必须是函数");const t=String(e).match(/\$ref\((["'A-Za-z0-9_-]+)\)/g)?.map(e=>{const t=e.match(/\$ref\(['|"]([A-Za-z0-9_-]+)['|"]\)/)?.[1];return this.getSyncComponent(t)})||[];await Promise.all(t)}async processHandle(e,{opinion:t,reassignId:s,signature:i,countersignUserIds:n,button:r}){const{taskId:a,processInstanceId:o}=this.ProcessAppRoved,u={procInstId:o,data:e,opinion:t,button:r,countersignUserIds:n,taskId:a,signature:i,reassignId:s};await _gct.api.apaas.pmProcessEngine.postProcExecute(u)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};return t?e!==t?Promise.reject(y("sys.process.processInstanceMismatch")):void 0:Promise.reject(y("sys.process.pleaseInitiateTheProcessFirst"))}},ea=class{$ref;$asyncRef;$getModal;$closeModal;$customBizService=Gr;gctWidgets={};constructor({$ref:e,$asyncRef:t}){this.$asyncRef=t,this.$ref=e}$utility={_:F,cloneDeep:w,differenceBy:S,dayjs:A,BigNumber:I,plus:(e,t)=>new I(e).plus(new I(t)).toNumber(),minus:(e,t)=>new I(e).minus(new I(t)).toNumber(),multipliedBy:(e,t)=>new I(e).multipliedBy(new I(t)).toNumber(),div:(e,t)=>new I(e).div(new I(t)).toNumber(),transformSourceData:gr,transformData:yr};$httpBizService=Vr;$request=Hr;$loading=Wr;$getPremission(e){return $r.getPremission(e)}$setPremission(e,t){$r.setPremission(e,t)}$getAppGlobalVar(e){return $r.getGlobalVar(e)}$setAppGlobalVar(e,t){$r.setGlobalVar(e,t)}$getPageGlobalVar(e){return $r.getPageGlobalVar(e)}$setPageGlobalVar(e,t){$r.setPageGlobalVar(e,t)}$getPageVar(e){return $r.getPageVar(e)}$setPageVar(e,t){$r.setPageVar(e,t)}$getCtxById(e){return $r.getContextByKey(e)}$setPropsByKey(e,t){const s=this.gctWidgets[e]?.props;if(s)for(const i in t)s[i]=t[i]}$getPropsByKey(e,t=[],s){const i=this.gctWidgets[e];if(!i)return{};const n=s||!i.props?i:i.props;return"string"==typeof t&&(t=[t]),t.reduce((e,t)=>(e[t]=n[t],e),{})}},ta=class{modelKey;getValue;setValue;submit;reload;key;constructor(e,t){this.key=e;const s=t.elRef;Object.keys(s).forEach(e=>{this[e]=s[e]})}};async function sa(e,t){const{name:s,refId:i,scopeId:n,modalTitle:r}=t,a=r?.split(".")||[];let o;if(a.length>1){const e=[];ia(e,this.gctWidgets?.[a[0]]||{}),o=e.find(e=>e.id===a[1])||{}}else a.length&&(o=this.gctWidgets?.[a[0]]);s===l.OPEN_MODAL&&await this.$getModal(i).open({title:o?.props?.title}),s===l.CLOSE_MODAL&&(i?await this.$getModal(i).close():await this.$closeModal()),s===l.REFRESH_TABLE&&await(await this.$getCtxById(n).$asyncRef(i)).reload(e?e[0]:null)}function ia(e,t){const s=t.children||[];for(const i of s)i.type&&i.type==c.CustomButton?e.push(i):i.children?.length&&ia(e,i)}function na({expression:e="",rowData:t=null},s){if(!e||"true"===e)return void s(!0);const i=or(e),n=i.reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),r=N(()=>i.reduce((e,s)=>{const i=s.split("."),n=i[0]+"",r=i[1];if(r){const s=(t?t[r]:zr.value[n]?.[r])??"";e[n]?e[n][r]=s:e[n]={[r]:s}}else n.startsWith("$VAR_")||n.startsWith("$IVAR_")?e[n]=Lr.value[n]?.value??"":(n.startsWith("$PAGERVAR_")||n.startsWith("$IPAGERVAR_"))&&(e[n]=Ur.value[n]?.value??"");return e},{}));function a(t){const i={};Object.keys(n).forEach(e=>{const{formKey:s,itemKey:r}=n[e];i[e]=r?t[s]?.[r]:t[s]}),ur(e,i).then(s)}t&&a(r.value),Vn(r,()=>{a(r.value)},{debounce:200,immediate:!t})}async function ra({expression:e="",rowData:t=null}){if(!e||"true"===e)return!0;const s=or(e).reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),i={};return Object.keys(s).forEach(e=>{const{formKey:n,itemKey:r}=s[e];let a="";a=n.startsWith("$VAR_")?Lr.value[n]?.value??"":n.startsWith("$PAGERVAR_")?Ur.value[n]?.value??"":r?(t?t[r]:zr.value[n]?.[r])??"":(t?t[n]:zr.value[n])??"",i[e]=a}),ur(e,i)}function aa(e,t){return!!Yr(t)&&(e.displayType===n.CONFIG?ee(()=>!e.hidden):function(e){const t=W(!1);return oa(e,e=>{t.value=!!e}),t}(e))}function oa({displayRule:e,tableForm:t},s){if(e){const i=or(e),n=i.reduce((e,t)=>{const s=t.split(".");return e[t]={formKey:s[0],itemKey:s[1]},e},{}),r=ee(()=>i.reduce((e,s)=>{const i=s.split("."),n=i[0]+"",r=i[1]+"",a={...t,...zr.value}[n]?.[r];return e[n]?e[n][r]=a:e[n]={[r]:a},e},{}));Vn(r,()=>{!function(e,t,s,i){const n={};Object.keys(t).forEach(s=>{const{formKey:i,itemKey:r}=t[s];n[s]=e?.[i]?.[r]}),ur(s,n).then(i)}(r.value,n,e,e=>{s(e)})},{immediate:!0,debounce:300})}else s(!0)}function ua(e,t){const s=V({});return ee(()=>e?e.filter(e=>{const{displayRule:i,hidden:r,displayType:a}=e.props||e;return Yr(e.id)?a===n.CONFIG?s[e.id]=!r:oa({displayRule:i,tableForm:t},t=>{s[e.id]=t}):s[e.id]=!1,s[e.id]}):[])}function ca(e,t){if(!e?.length)return;const s=[],i=[];e.forEach((e,t)=>{e.displayRule?i.push({...e,id:t}):s.push({...e,id:t})});const n=ha(i,t),r=ha(s,t);return ee(()=>n?.value||r?.value)}function ha(e,t){const s=V({});if(e)return ee(()=>e.find(e=>{const{displayRule:i,hidden:r,displayType:a}=e.props||e;return a===n.CONFIG?s[e.id]=!r:oa({displayRule:i,tableForm:t},t=>{s[e.id]=t}),s[e.id]}))}function la(e){return e.props?.displayRule&&e.props?.displayType===n.RULE?aa(e.props,e.id):pa(e)}function pa(e,t){if(!e.id)return!1;if(!Yr(e.id))return e.props.hidden=!0,!1;const s=L("useProcessFieldEvent",void 0);if(s)return s.useFieldToShow(e),!e.props.hidden;const{displayType:r,displayRule:a}=e.props||{},{value:o,expression:u}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};return o&&u?(e.props.hidden=!0,na({expression:u,rowData:t},t=>{e.props.hidden=!!t})):o?e.props.hidden=!0:r===n.RULE&&a&&(e.props.hidden=!0,na({expression:a,rowData:t},t=>{e.props.hidden=!t})),ee(()=>!e.props.hidden)}async function da(e,t){if(!e.id)return!1;if(!Yr(e.id))return e.props.hidden=!0,!1;const s=L("useProcessFieldEvent",void 0);if(s)return s.useFieldToShow(e),!e.props.hidden;const{displayType:r,displayRule:a}=e.props||{},{value:o,expression:u}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};return o&&u?(e.props.hidden=!0,e.props.hidden=!!(await ra({expression:u,rowData:t}))):o?e.props.hidden=!0:r===n.RULE&&a&&(e.props.hidden=!0,e.props.hidden=!!(await ra({expression:a,rowData:t}))),!e.props.hidden}function ma(e,t){return e.forEach(e=>{pa(e,t)}),ee(()=>e.filter(e=>!e.props.hidden))}function Da(e,t){const{value:s,expression:n}=(e.props.componentDependency?.configDependency||{})[i.HIDDEN]||{};s&&n&&na({expression:n},e=>{t(e)}),t(e.props.hidden)}function fa(e){const t=e.props.componentDependency?.configDependency||{},{value:s,expression:n}=t[i.HIDDEN]||{};s&&n&&na({expression:n},t=>{e.props.hidden=!!t});const{value:r,expression:a}=t[i.REQUIRED]||{};r&&a&&na({expression:a},t=>{e.props.required=!!t})}function xa(t,s={},n=!1){const{readonly:r,field:a,isFieldModel:o,bindFieldLink:u,refOriginField:c,refOriginModelKey:h,refOriginFieldType:l}=t.props,p=t.props.componentDependency?.configDependency||{},d=L("formReadonly",void 0),m=L("useProcessFieldEvent",void 0);if(m&&m.useFieldWidget(t),!m&&t.formItem&&void 0!==d?.value&&(t.props.readonly=d?.value||t.props.readonly),!m&&!d?.value){const e=p[i.READONLY]?.expression,a=p[i.READONLY]?.fieldValue,o=p[i.READONLY]?.value;!a&&o&&e&&na({expression:e,rowData:n?s:null},e=>{t.props.readonly=!!e});const u=p[i.REQUIRED]?.expression,c=p[i.REQUIRED]?.value;!p[i.REQUIRED]?.fieldValue&&c&&u&&na({expression:u,rowData:n?s:null},e=>{t.props.required=!!e,t.props.readonly=!e&&r});const h=p[i.DISABLED]?.expression;p[i.DISABLED]?.value&&h&&na({expression:h,rowData:n?s:null},e=>{t.props.disabled=!!e,t.props.readonly=!e&&r})}const D=p[i.ASSIGNMENT]?.expression,f=p[i.ASSIGNMENT]?.strategy;D&&na({expression:D,rowData:n?s:null},e=>{s[a]=e});const x=o?u?.join("."):a;s._OPCT||(s._OPCT={_DICT:{}});const E=N(()=>o?s._OPCT:s),g=N({get:()=>x?E.value[x]:"",set(t){D&&f===e.alwaysCover||(E.value[x]=t)}});if(o&&c){const e=ee(()=>s[u[0]]),t=u.length>2?[u[1]+".*"]:void 0;Vn(e,async()=>{try{const s=await br({ids:e.value,refOriginField:u[0],refOriginFieldType:l,model:h,foreignFields:t});E.value[x]=s._OPCT[x],E.value._DICT||(E.value._DICT={}),E.value._DICT[x]=s._OPCT._DICT[x]}catch{for(const e in E.value)e.startsWith(x)&&(E.value[e]=void 0)}},{debounce:100,immediate:!0})}return{value:g,formRowData:E,fieldKey:x}}function Ea(e){const{readonly:t}=e.props,s=e.props.componentDependency?.configDependency||{},n=s[i.REQUIRED]?.expression,r=s[i.REQUIRED]?.value;!s[i.REQUIRED]?.fieldValue&&r&&n&&na({expression:n},s=>{e.props.required=!!s,e.props.readonly=!s&&t})}var ga=class{context={}},ya=class{isDestroy=!1},Ca=class{state=new ya;constructor(e){this.model=e}mounted(){}destroy(){}},Aa=class extends Ca{},Fa=class extends Ca{},wa=class{state=new ga;prefix="";preview=!1;item=/* @__PURE__ */new Map;nodes=[];tree=[];setTree(e){this.tree=e}setNodes(e){this.reset(),this.nodes=e,this.nodes.forEach(e=>{const t=Te.get(e.type,this.prefix);if(t){if(t.createController)return void this.item.set(e.id,t.createController(e));if(t.mode===ne.CONTAINER)return void this.item.set(e.id,new Aa(e));if(t.mode===ne.ITEM)return void this.item.set(e.id,new Fa(e))}this.item.set(e.id,new Ca(e))})}getNodes(e){if(e){const t=this.getTreeItem(e);return t&&t.children?t.children.map(e=>this.nodes.find(t=>e.id===t.id)):[]}return this.tree.map(e=>this.nodes.find(t=>e.id===t.id))}getTreeItem(e,t=this.tree){if(!e)return null;for(const s of t){if(s.id===e)return s;if(s.children&&s.children.length>0){const t=this.getTreeItem(e,s.children);if(t)return t}}return null}getController(e){return this.item.get(e)}mounted(){}unmounted(){this.reset()}reset(){this.nodes=[],this.item.forEach(e=>{e.destroy()})}};function Sa(e){let t=L(be.DESIGN_RENDER);return t||(t=e?e():new wa,t.state=V(t.state),G(be.DESIGN_RENDER,t),X(()=>{t.mounted()}),Y(()=>{t.unmounted()})),t}function ka(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new ge}var ba=new URL("./index.min.css",import.meta.url);f.load(ba.href);export{ea as Context,be as ControllerType,Ce as DESIGN_DATA_KEY_TAG,ye as DESIGN_TYPE,Fe as DateRangeMap,Ae as DesignItemAttribute,ve as DesignRenderViewPrefix,Zr as Events,xr as FieldSchema,ta as GctComponent,$r as Globals,Tr as HandwritingPad,_r as PageTypeEnum,Te as RenderNodeRegister,Be as RenderNodeType,mr as RenderPluginPgkUtil,ge as RenderRegister,Cr as addDataByForm,ur as calculate,ra as calculateDepResult,pa as dependencyToShow,da as dependencyToShowSync,zr as formMap,ke as getDefaultDate,we as getDisabledDate,Se as getMobileDateRange,Xr as getPageTitle,Yr as getPremission,br as getRefInfoId,Lr as globalVarCaches,or as identify,Er as initFieldWidgetRuntime,na as insetDep,ka as onInit,Kr as pageDataforJson,Ur as pageGlobaVariables,fr as schemaToStyle,Ar as setDataByForm,Jr as setFormData,fa as tableWidgetByDept,Da as tableWidgetToShow,Fr as transSelectData,yr as transformData,wr as transformDataToDict,dr as transformPropsField,gr as transformSourceData,xa as useDependency,Ea as useDependencyByRequired,la as useDependencyToShow,ma as useDependencyToShowList,Sa as useDesignRenderController,ca as useDisplayRuleColumnByStyles,ua as useDisplayRuleOptions,Pr as useGctSelect,Dr as useStyle,aa as useVisibileByRuleHook};
|