@arcgis/coding-components 5.0.0-next.67 → 5.0.0-next.69

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.
Files changed (86) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{B44B6FIR.js → 2ANBIXMV.js} +2 -2
  3. package/dist/cdn/{RIEEEA5Z.js → 2PWQ6IX6.js} +2 -2
  4. package/dist/cdn/{FDY44CF6.js → 4VBKGY3Y.js} +2 -2
  5. package/dist/cdn/{VTNZIY4L.js → 63L3I4AR.js} +2 -2
  6. package/dist/cdn/{D4XR3PRK.js → 6VMVE6UY.js} +2 -2
  7. package/dist/cdn/{MCSHVTJN.js → 6YWQZYFT.js} +2 -2
  8. package/dist/cdn/{SQGNUFMS.js → 7QXI5S54.js} +1 -1
  9. package/dist/cdn/{EXB6KYBZ.js → ANIEGF3M.js} +2 -2
  10. package/dist/cdn/{2CAIZVL2.js → BJNO4URE.js} +2 -2
  11. package/dist/cdn/{NBB2XVFK.js → BKZSRBOI.js} +2 -2
  12. package/dist/cdn/{NU5U4Y4U.js → BLRFHPRW.js} +2 -2
  13. package/dist/cdn/{4AWV36TP.js → DHQRJUWX.js} +2 -2
  14. package/dist/cdn/{4SZRAA64.js → ELSCOMZM.js} +2 -2
  15. package/dist/cdn/{QCLXWZPN.js → GIHHXU4F.js} +2 -2
  16. package/dist/cdn/{JIV3CWPJ.js → GSDCAR3G.js} +2 -2
  17. package/dist/cdn/{VJMSES6B.js → HLAMSGZK.js} +2 -2
  18. package/dist/cdn/{QIQDQ5KW.js → HWRLCN2M.js} +1 -1
  19. package/dist/cdn/{ULMLJ3RX.js → ITC6545B.js} +2 -2
  20. package/dist/cdn/{BK4ALHKA.js → JJZI272B.js} +2 -2
  21. package/dist/cdn/{VHXXUYRU.js → JUFC5X3F.js} +2 -2
  22. package/dist/cdn/{O74IVRES.js → LGKCX7PF.js} +2 -2
  23. package/dist/cdn/{UY6SDYG5.js → M5VHMSKM.js} +2 -2
  24. package/dist/cdn/{SOW3RJC4.js → M6JNMYW5.js} +2 -2
  25. package/dist/cdn/{V6LO42NM.js → MFSYPFUV.js} +2 -2
  26. package/dist/cdn/{7JDBIZO6.js → MI5L5JTP.js} +2 -2
  27. package/dist/cdn/{BAAZ2S2B.js → MT7NSK5M.js} +2 -2
  28. package/dist/cdn/{AW7OVMHD.js → N7F4ZKCY.js} +2 -2
  29. package/dist/cdn/{ULT2L7SH.js → NZRBDLSX.js} +2 -2
  30. package/dist/cdn/{ASU5YBAD.js → O4BHVHTN.js} +1 -1
  31. package/dist/cdn/{3HFXJFB2.js → QA6V6PEF.js} +2 -2
  32. package/dist/cdn/{36SZPYY6.js → QRVBNTXX.js} +2 -2
  33. package/dist/cdn/{S4G4KEKR.js → SAWAI47N.js} +2 -2
  34. package/dist/cdn/{4ZQFA2WW.js → SF55K6KD.js} +1 -1
  35. package/dist/cdn/{BZYWUYOW.js → SGH5BVF7.js} +2 -2
  36. package/dist/cdn/{T277HXQK.js → SRB64GE3.js} +2 -2
  37. package/dist/cdn/T74STOLC.js +37 -0
  38. package/dist/cdn/{FBZPULXF.js → UA34XXRL.js} +2 -2
  39. package/dist/cdn/{XYXEBLI3.js → UGMFX4YE.js} +2 -2
  40. package/dist/cdn/{ZDCGFKHU.js → WG4PF6TQ.js} +1 -1
  41. package/dist/cdn/{SHJDCIEA.js → XCSB3ZH4.js} +2 -2
  42. package/dist/cdn/{5QTL73GN.js → XNMETXSZ.js} +2 -2
  43. package/dist/cdn/{CIXOOC6Z.js → XUGXA467.js} +3 -3
  44. package/dist/cdn/{TJESP5NH.js → Y2GWKRO7.js} +2 -2
  45. package/dist/cdn/YK6ZSDG7.js +4 -0
  46. package/dist/cdn/{53WK6TO5.js → YSK3GR2U.js} +1 -1
  47. package/dist/cdn/{BUFYDDRF.js → YXKNJPRJ.js} +1 -1
  48. package/dist/cdn/{PDVDDJ5V.js → ZOSYVM7K.js} +2 -2
  49. package/dist/cdn/assets/code-editor/arcade.worker.js +1454 -1413
  50. package/dist/cdn/index.js +2 -2
  51. package/dist/chunks/arcade-contribution.js +1 -1
  52. package/dist/chunks/arcade-defaults.js +1 -1
  53. package/dist/chunks/arcade-executor.js +1 -1
  54. package/dist/chunks/arcade-mode.js +1 -1
  55. package/dist/chunks/arcade-service-accessors.js +1 -1
  56. package/dist/chunks/colorize.js +1 -1
  57. package/dist/chunks/editor.js +1 -1
  58. package/dist/chunks/fields.js +1 -1
  59. package/dist/chunks/language-defaults-base.js +1 -1
  60. package/dist/chunks/markdown.js +1 -1
  61. package/dist/chunks/monaco-importer.js +1 -1
  62. package/dist/chunks/runtime.js +1 -1
  63. package/dist/chunks/sql-expr-defaults.js +1 -1
  64. package/dist/chunks/sql-expr-mode.js +1 -1
  65. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  66. package/dist/chunks/useT9n.js +1 -1
  67. package/dist/chunks/utilities.js +1 -1
  68. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  69. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  71. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  72. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  73. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  74. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  75. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  76. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  77. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  78. package/dist/docs/api.json +2 -2
  79. package/dist/docs/docs.json +2 -2
  80. package/dist/docs/web-types.json +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/loader.js +1 -1
  83. package/dist/monacoStyles.js +1 -1
  84. package/package.json +5 -5
  85. package/dist/cdn/HQ5LDPXF.js +0 -4
  86. package/dist/cdn/VITSIUXE.js +0 -37
@@ -1,37 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.67 */
4
- var Ye;(function(i){function e(t){return typeof t=="string"}i.is=e})(Ye||(Ye={}));var de;(function(i){function e(t){return typeof t=="string"}i.is=e})(de||(de={}));var et;(function(i){i.MIN_VALUE=-2147483648,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(et||(et={}));var X;(function(i){i.MIN_VALUE=0,i.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&i.MIN_VALUE<=t&&t<=i.MAX_VALUE}i.is=e})(X||(X={}));var k;(function(i){function e(n,r){return n===Number.MAX_VALUE&&(n=X.MAX_VALUE),r===Number.MAX_VALUE&&(r=X.MAX_VALUE),{line:n,character:r}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&a.uinteger(r.line)&&a.uinteger(r.character)}i.is=t})(k||(k={}));var A;(function(i){function e(n,r,s,u){if(a.uinteger(n)&&a.uinteger(r)&&a.uinteger(s)&&a.uinteger(u))return{start:k.create(n,r),end:k.create(s,u)};if(k.is(n)&&k.is(r))return{start:n,end:r};throw new Error(`Range#create called with invalid arguments[${n}, ${r}, ${s}, ${u}]`)}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&k.is(r.start)&&k.is(r.end)}i.is=t})(A||(A={}));var J;(function(i){function e(n,r){return{uri:n,range:r}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&A.is(r.range)&&(a.string(r.uri)||a.undefined(r.uri))}i.is=t})(J||(J={}));var tt;(function(i){function e(n,r,s,u){return{targetUri:n,targetRange:r,targetSelectionRange:s,originSelectionRange:u}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&A.is(r.targetRange)&&a.string(r.targetUri)&&A.is(r.targetSelectionRange)&&(A.is(r.originSelectionRange)||a.undefined(r.originSelectionRange))}i.is=t})(tt||(tt={}));var pe;(function(i){function e(n,r,s,u){return{red:n,green:r,blue:s,alpha:u}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&a.numberRange(r.red,0,1)&&a.numberRange(r.green,0,1)&&a.numberRange(r.blue,0,1)&&a.numberRange(r.alpha,0,1)}i.is=t})(pe||(pe={}));var it;(function(i){function e(n,r){return{range:n,color:r}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&A.is(r.range)&&pe.is(r.color)}i.is=t})(it||(it={}));var nt;(function(i){function e(n,r,s){return{label:n,textEdit:r,additionalTextEdits:s}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&a.string(r.label)&&(a.undefined(r.textEdit)||j.is(r))&&(a.undefined(r.additionalTextEdits)||a.typedArray(r.additionalTextEdits,j.is))}i.is=t})(nt||(nt={}));var rt;(function(i){i.Comment="comment",i.Imports="imports",i.Region="region"})(rt||(rt={}));var st;(function(i){function e(n,r,s,u,c,l){let D={startLine:n,endLine:r};return a.defined(s)&&(D.startCharacter=s),a.defined(u)&&(D.endCharacter=u),a.defined(c)&&(D.kind=c),a.defined(l)&&(D.collapsedText=l),D}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&a.uinteger(r.startLine)&&a.uinteger(r.startLine)&&(a.undefined(r.startCharacter)||a.uinteger(r.startCharacter))&&(a.undefined(r.endCharacter)||a.uinteger(r.endCharacter))&&(a.undefined(r.kind)||a.string(r.kind))}i.is=t})(st||(st={}));var De;(function(i){function e(n,r){return{location:n,message:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&J.is(r.location)&&a.string(r.message)}i.is=t})(De||(De={}));var Z;(function(i){i.Error=1,i.Warning=2,i.Information=3,i.Hint=4})(Z||(Z={}));var ut;(function(i){i.Unnecessary=1,i.Deprecated=2})(ut||(ut={}));var at;(function(i){function e(t){let n=t;return a.objectLiteral(n)&&a.string(n.href)}i.is=e})(at||(at={}));var Q;(function(i){function e(n,r,s,u,c,l){let D={range:n,message:r};return a.defined(s)&&(D.severity=s),a.defined(u)&&(D.code=u),a.defined(c)&&(D.source=c),a.defined(l)&&(D.relatedInformation=l),D}i.create=e;function t(n){var r;let s=n;return a.defined(s)&&A.is(s.range)&&a.string(s.message)&&(a.number(s.severity)||a.undefined(s.severity))&&(a.integer(s.code)||a.string(s.code)||a.undefined(s.code))&&(a.undefined(s.codeDescription)||a.string((r=s.codeDescription)===null||r===void 0?void 0:r.href))&&(a.string(s.source)||a.undefined(s.source))&&(a.undefined(s.relatedInformation)||a.typedArray(s.relatedInformation,De.is))}i.is=t})(Q||(Q={}));var _;(function(i){function e(n,r,...s){let u={title:n,command:r};return a.defined(s)&&s.length>0&&(u.arguments=s),u}i.create=e;function t(n){let r=n;return a.defined(r)&&a.string(r.title)&&a.string(r.command)}i.is=t})(_||(_={}));var j;(function(i){function e(s,u){return{range:s,newText:u}}i.replace=e;function t(s,u){return{range:{start:s,end:s},newText:u}}i.insert=t;function n(s){return{range:s,newText:""}}i.del=n;function r(s){let u=s;return a.objectLiteral(u)&&a.string(u.newText)&&A.is(u.range)}i.is=r})(j||(j={}));var fe;(function(i){function e(n,r,s){let u={label:n};return r!==void 0&&(u.needsConfirmation=r),s!==void 0&&(u.description=s),u}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&a.string(r.label)&&(a.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(a.string(r.description)||r.description===void 0)}i.is=t})(fe||(fe={}));var O;(function(i){function e(t){let n=t;return a.string(n)}i.is=e})(O||(O={}));var ot;(function(i){function e(s,u,c){return{range:s,newText:u,annotationId:c}}i.replace=e;function t(s,u,c){return{range:{start:s,end:s},newText:u,annotationId:c}}i.insert=t;function n(s,u){return{range:s,newText:"",annotationId:u}}i.del=n;function r(s){let u=s;return j.is(u)&&(fe.is(u.annotationId)||O.is(u.annotationId))}i.is=r})(ot||(ot={}));var me;(function(i){function e(n,r){return{textDocument:n,edits:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&Fe.is(r.textDocument)&&Array.isArray(r.edits)}i.is=t})(me||(me={}));var ge;(function(i){function e(n,r,s){let u={kind:"create",uri:n};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(u.options=r),s!==void 0&&(u.annotationId=s),u}i.create=e;function t(n){let r=n;return r&&r.kind==="create"&&a.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||a.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||a.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||O.is(r.annotationId))}i.is=t})(ge||(ge={}));var xe;(function(i){function e(n,r,s,u){let c={kind:"rename",oldUri:n,newUri:r};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(c.options=s),u!==void 0&&(c.annotationId=u),c}i.create=e;function t(n){let r=n;return r&&r.kind==="rename"&&a.string(r.oldUri)&&a.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||a.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||a.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||O.is(r.annotationId))}i.is=t})(xe||(xe={}));var Ce;(function(i){function e(n,r,s){let u={kind:"delete",uri:n};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(u.options=r),s!==void 0&&(u.annotationId=s),u}i.create=e;function t(n){let r=n;return r&&r.kind==="delete"&&a.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||a.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||a.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||O.is(r.annotationId))}i.is=t})(Ce||(Ce={}));var Ee;(function(i){function e(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(r=>a.string(r.kind)?ge.is(r)||xe.is(r)||Ce.is(r):me.is(r)))}i.is=e})(Ee||(Ee={}));var ct;(function(i){function e(n){return{uri:n}}i.create=e;function t(n){let r=n;return a.defined(r)&&a.string(r.uri)}i.is=t})(ct||(ct={}));var lt;(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&a.string(r.uri)&&a.integer(r.version)}i.is=t})(lt||(lt={}));var Fe;(function(i){function e(n,r){return{uri:n,version:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&a.string(r.uri)&&(r.version===null||a.integer(r.version))}i.is=t})(Fe||(Fe={}));var ht;(function(i){function e(n,r,s,u){return{uri:n,languageId:r,version:s,text:u}}i.create=e;function t(n){let r=n;return a.defined(r)&&a.string(r.uri)&&a.string(r.languageId)&&a.integer(r.version)&&a.string(r.text)}i.is=t})(ht||(ht={}));var R;(function(i){i.PlainText="plaintext",i.Markdown="markdown";function e(t){let n=t;return n===i.PlainText||n===i.Markdown}i.is=e})(R||(R={}));var W;(function(i){function e(t){let n=t;return a.objectLiteral(t)&&R.is(n.kind)&&a.string(n.value)}i.is=e})(W||(W={}));var B;(function(i){i.Text=1,i.Method=2,i.Function=3,i.Constructor=4,i.Field=5,i.Variable=6,i.Class=7,i.Interface=8,i.Module=9,i.Property=10,i.Unit=11,i.Value=12,i.Enum=13,i.Keyword=14,i.Snippet=15,i.Color=16,i.File=17,i.Reference=18,i.Folder=19,i.EnumMember=20,i.Constant=21,i.Struct=22,i.Event=23,i.Operator=24,i.TypeParameter=25})(B||(B={}));var b;(function(i){i.PlainText=1,i.Snippet=2})(b||(b={}));var dt;(function(i){i.Deprecated=1})(dt||(dt={}));var pt;(function(i){function e(n,r,s){return{newText:n,insert:r,replace:s}}i.create=e;function t(n){let r=n;return r&&a.string(r.newText)&&A.is(r.insert)&&A.is(r.replace)}i.is=t})(pt||(pt={}));var w;(function(i){i.asIs=1,i.adjustIndentation=2})(w||(w={}));var Dt;(function(i){function e(t){let n=t;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}i.is=e})(Dt||(Dt={}));var ft;(function(i){function e(t){return{label:t}}i.create=e})(ft||(ft={}));var mt;(function(i){function e(t,n){return{items:t||[],isIncomplete:!!n}}i.create=e})(mt||(mt={}));var Y;(function(i){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i.fromPlainText=e;function t(n){let r=n;return a.string(r)||a.objectLiteral(r)&&a.string(r.language)&&a.string(r.value)}i.is=t})(Y||(Y={}));var gt;(function(i){function e(t){let n=t;return!!n&&a.objectLiteral(n)&&(W.is(n.contents)||Y.is(n.contents)||a.typedArray(n.contents,Y.is))&&(t.range===void 0||A.is(t.range))}i.is=e})(gt||(gt={}));var xt;(function(i){function e(t,n){return n?{label:t,documentation:n}:{label:t}}i.create=e})(xt||(xt={}));var Ct;(function(i){function e(t,n,...r){let s={label:t};return a.defined(n)&&(s.documentation=n),a.defined(r)?s.parameters=r:s.parameters=[],s}i.create=e})(Ct||(Ct={}));var Et;(function(i){i.Text=1,i.Read=2,i.Write=3})(Et||(Et={}));var Ft;(function(i){function e(t,n){let r={range:t};return a.number(n)&&(r.kind=n),r}i.create=e})(Ft||(Ft={}));var At;(function(i){i.File=1,i.Module=2,i.Namespace=3,i.Package=4,i.Class=5,i.Method=6,i.Property=7,i.Field=8,i.Constructor=9,i.Enum=10,i.Interface=11,i.Function=12,i.Variable=13,i.Constant=14,i.String=15,i.Number=16,i.Boolean=17,i.Array=18,i.Object=19,i.Key=20,i.Null=21,i.EnumMember=22,i.Struct=23,i.Event=24,i.Operator=25,i.TypeParameter=26})(At||(At={}));var yt;(function(i){i.Deprecated=1})(yt||(yt={}));var Bt;(function(i){function e(t,n,r,s,u){let c={name:t,kind:n,location:{uri:s,range:r}};return u&&(c.containerName=u),c}i.create=e})(Bt||(Bt={}));var bt;(function(i){function e(t,n,r,s){return s!==void 0?{name:t,kind:n,location:{uri:r,range:s}}:{name:t,kind:n,location:{uri:r}}}i.create=e})(bt||(bt={}));var wt;(function(i){function e(n,r,s,u,c,l){let D={name:n,detail:r,kind:s,range:u,selectionRange:c};return l!==void 0&&(D.children=l),D}i.create=e;function t(n){let r=n;return r&&a.string(r.name)&&a.number(r.kind)&&A.is(r.range)&&A.is(r.selectionRange)&&(r.detail===void 0||a.string(r.detail))&&(r.deprecated===void 0||a.boolean(r.deprecated))&&(r.children===void 0||Array.isArray(r.children))&&(r.tags===void 0||Array.isArray(r.tags))}i.is=t})(wt||(wt={}));var It;(function(i){i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll"})(It||(It={}));var ee;(function(i){i.Invoked=1,i.Automatic=2})(ee||(ee={}));var kt;(function(i){function e(n,r,s){let u={diagnostics:n};return r!=null&&(u.only=r),s!=null&&(u.triggerKind=s),u}i.create=e;function t(n){let r=n;return a.defined(r)&&a.typedArray(r.diagnostics,Q.is)&&(r.only===void 0||a.typedArray(r.only,a.string))&&(r.triggerKind===void 0||r.triggerKind===ee.Invoked||r.triggerKind===ee.Automatic)}i.is=t})(kt||(kt={}));var vt;(function(i){function e(n,r,s){let u={title:n},c=!0;return typeof r=="string"?(c=!1,u.kind=r):_.is(r)?u.command=r:u.edit=r,c&&s!==void 0&&(u.kind=s),u}i.create=e;function t(n){let r=n;return r&&a.string(r.title)&&(r.diagnostics===void 0||a.typedArray(r.diagnostics,Q.is))&&(r.kind===void 0||a.string(r.kind))&&(r.edit!==void 0||r.command!==void 0)&&(r.command===void 0||_.is(r.command))&&(r.isPreferred===void 0||a.boolean(r.isPreferred))&&(r.edit===void 0||Ee.is(r.edit))}i.is=t})(vt||(vt={}));var Lt;(function(i){function e(n,r){let s={range:n};return a.defined(r)&&(s.data=r),s}i.create=e;function t(n){let r=n;return a.defined(r)&&A.is(r.range)&&(a.undefined(r.command)||_.is(r.command))}i.is=t})(Lt||(Lt={}));var St;(function(i){function e(n,r){return{tabSize:n,insertSpaces:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&a.uinteger(r.tabSize)&&a.boolean(r.insertSpaces)}i.is=t})(St||(St={}));var Tt;(function(i){function e(n,r,s){return{range:n,target:r,data:s}}i.create=e;function t(n){let r=n;return a.defined(r)&&A.is(r.range)&&(a.undefined(r.target)||a.string(r.target))}i.is=t})(Tt||(Tt={}));var Pt;(function(i){function e(n,r){return{range:n,parent:r}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&A.is(r.range)&&(r.parent===void 0||i.is(r.parent))}i.is=t})(Pt||(Pt={}));var Nt;(function(i){i.namespace="namespace",i.type="type",i.class="class",i.enum="enum",i.interface="interface",i.struct="struct",i.typeParameter="typeParameter",i.parameter="parameter",i.variable="variable",i.property="property",i.enumMember="enumMember",i.event="event",i.function="function",i.method="method",i.macro="macro",i.keyword="keyword",i.modifier="modifier",i.comment="comment",i.string="string",i.number="number",i.regexp="regexp",i.operator="operator",i.decorator="decorator"})(Nt||(Nt={}));var Mt;(function(i){i.declaration="declaration",i.definition="definition",i.readonly="readonly",i.static="static",i.deprecated="deprecated",i.abstract="abstract",i.async="async",i.modification="modification",i.documentation="documentation",i.defaultLibrary="defaultLibrary"})(Mt||(Mt={}));var Ut;(function(i){function e(t){let n=t;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i.is=e})(Ut||(Ut={}));var _t;(function(i){function e(n,r){return{range:n,text:r}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&a.string(r.text)}i.is=t})(_t||(_t={}));var jt;(function(i){function e(n,r,s){return{range:n,variableName:r,caseSensitiveLookup:s}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&a.boolean(r.caseSensitiveLookup)&&(a.string(r.variableName)||r.variableName===void 0)}i.is=t})(jt||(jt={}));var Ot;(function(i){function e(n,r){return{range:n,expression:r}}i.create=e;function t(n){let r=n;return r!=null&&A.is(r.range)&&(a.string(r.expression)||r.expression===void 0)}i.is=t})(Ot||(Ot={}));var zt;(function(i){function e(n,r){return{frameId:n,stoppedLocation:r}}i.create=e;function t(n){let r=n;return a.defined(r)&&A.is(n.stoppedLocation)}i.is=t})(zt||(zt={}));var Ae;(function(i){i.Type=1,i.Parameter=2;function e(t){return t===1||t===2}i.is=e})(Ae||(Ae={}));var ye;(function(i){function e(n){return{value:n}}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&(r.tooltip===void 0||a.string(r.tooltip)||W.is(r.tooltip))&&(r.location===void 0||J.is(r.location))&&(r.command===void 0||_.is(r.command))}i.is=t})(ye||(ye={}));var Vt;(function(i){function e(n,r,s){let u={position:n,label:r};return s!==void 0&&(u.kind=s),u}i.create=e;function t(n){let r=n;return a.objectLiteral(r)&&k.is(r.position)&&(a.string(r.label)||a.typedArray(r.label,ye.is))&&(r.kind===void 0||Ae.is(r.kind))&&r.textEdits===void 0||a.typedArray(r.textEdits,j.is)&&(r.tooltip===void 0||a.string(r.tooltip)||W.is(r.tooltip))&&(r.paddingLeft===void 0||a.boolean(r.paddingLeft))&&(r.paddingRight===void 0||a.boolean(r.paddingRight))}i.is=t})(Vt||(Vt={}));var $t;(function(i){function e(t){return{kind:"snippet",value:t}}i.createSnippet=e})($t||($t={}));var Rt;(function(i){function e(t,n,r,s){return{insertText:t,filterText:n,range:r,command:s}}i.create=e})(Rt||(Rt={}));var Wt;(function(i){function e(t){return{items:t}}i.create=e})(Wt||(Wt={}));var Ht;(function(i){i.Invoked=0,i.Automatic=1})(Ht||(Ht={}));var qt;(function(i){function e(t,n){return{range:t,text:n}}i.create=e})(qt||(qt={}));var Gt;(function(i){function e(t,n){return{triggerKind:t,selectedCompletionInfo:n}}i.create=e})(Gt||(Gt={}));var Kt;(function(i){function e(t){let n=t;return a.objectLiteral(n)&&de.is(n.uri)&&a.string(n.name)}i.is=e})(Kt||(Kt={}));var Xt;(function(i){function e(s,u,c,l){return new Be(s,u,c,l)}i.create=e;function t(s){let u=s;return!!(a.defined(u)&&a.string(u.uri)&&(a.undefined(u.languageId)||a.string(u.languageId))&&a.uinteger(u.lineCount)&&a.func(u.getText)&&a.func(u.positionAt)&&a.func(u.offsetAt))}i.is=t;function n(s,u){let c=s.getText(),l=r(u,(x,C)=>{let F=x.range.start.line-C.range.start.line;return F===0?x.range.start.character-C.range.start.character:F}),D=c.length;for(let x=l.length-1;x>=0;x--){let C=l[x],F=s.offsetAt(C.range.start),m=s.offsetAt(C.range.end);if(m<=D)c=c.substring(0,F)+C.newText+c.substring(m,c.length);else throw new Error("Overlapping edit");D=F}return c}i.applyEdits=n;function r(s,u){if(s.length<=1)return s;let c=s.length/2|0,l=s.slice(0,c),D=s.slice(c);r(l,u),r(D,u);let x=0,C=0,F=0;for(;x<l.length&&C<D.length;)u(l[x],D[C])<=0?s[F++]=l[x++]:s[F++]=D[C++];for(;x<l.length;)s[F++]=l[x++];for(;C<D.length;)s[F++]=D[C++];return s}})(Xt||(Xt={}));var Be=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let s=t.charAt(r);n=s==="\r"||s===`
5
- `,s==="\r"&&r+1<t.length&&t.charAt(r+1)===`
6
- `&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return k.create(0,e);for(;n<r;){let u=Math.floor((n+r)/2);t[u]>e?r=u:n=u+1}let s=n-1;return k.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},a;(function(i){let e=Object.prototype.toString;function t(m){return typeof m<"u"}i.defined=t;function n(m){return typeof m>"u"}i.undefined=n;function r(m){return m===!0||m===!1}i.boolean=r;function s(m){return e.call(m)==="[object String]"}i.string=s;function u(m){return e.call(m)==="[object Number]"}i.number=u;function c(m,T,he){return e.call(m)==="[object Number]"&&T<=m&&m<=he}i.numberRange=c;function l(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}i.integer=l;function D(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}i.uinteger=D;function x(m){return e.call(m)==="[object Function]"}i.func=x;function C(m){return m!==null&&typeof m=="object"}i.objectLiteral=C;function F(m,T){return Array.isArray(m)&&m.every(T)}i.typedArray=F})(a||(a={}));async function Gi(i,e){try{let t=await i,n=new Map,r=new Map,s=[],u=gi(e);return t.forEach(c=>{let l=[];c.items.forEach(D=>xi(l,r,n,u,D)),l.length&&s.push({...c,items:l})}),{categories:s,functionDefinitions:n,constantDefinitions:r}}catch(t){return console.error(t),{categories:[],functionDefinitions:new Map,constantDefinitions:new Map}}}function gi(i){let{profile:{apiVersion:e,bundles:t,hiddenApiItems:n=[]}={}}=i,r=Zt(e),s=Array.isArray(t)&&t.length>0?new Set(["core",...t]):void 0;return u=>Ei(r,u.sinceVersion)&&(!s||s.has(u.bundle))&&!n.includes(u.name)}function xi(i,e,t,n,r){if(Array.isArray(r)){r.forEach(s=>Jt(i,t,n,s));return}r.type==="constant"?Ci(i,e,n,r):Jt(i,t,n,r)}function Jt(i,e,t,n){if(!t(n))return;n.disableDocumentation||i.push(n);let{completion:{label:r}}=n,s=r.toLowerCase(),u=e.get(s);u||(u={type:"functionDefinition",key:s,overloads:[]},e.set(s,u)),u.overloads.push(n)}function Ci(i,e,t,n){if(!t(n))return;i.push(n);let{completion:{label:r}}=n,s=r.toLowerCase();e.set(s,n);let[u,c]=n.completion.label.split(".");if(!c)return;let l=u.toLowerCase(),D=e.get(l);D||(D={type:"namespace",key:l,members:[],completion:{label:u,detail:u,insertText:u,insertTextMode:w.adjustIndentation,insertTextFormat:b.PlainText,kind:B.Enum}},e.set(l,D));let x=structuredClone(n);x.name=c,x.completion.label=c,x.completion.insertText=c,x.completion.kind=B.Constant,D.members.push(x),D.completion.documentation=D.members.reduce((C,F)=>(C.value=`${C.value}${C.value?`
7
-
8
- `:""}**${F.completion.label}**: ${F.description}`,C),{kind:R.Markdown,value:""})}function Zt(i){if(!i||typeof i!="string")return null;let e=i.split(".").map(r=>Number.parseInt(r));if(e.some(Number.isNaN))return console.error("Invalid API version string",i),null;let[t,n]=e.slice(0,2);return{major:t,minor:n}}function Ei(i,e){if(!i)return!0;let t=Zt(e);return t?i.major>t.major?!1:i.minor===void 0||t.minor===void 0?!0:t.minor<=i.minor:!0}var H={False:"false",Null:"null",True:"true"},g={Break:"break",Continue:"continue",Else:"else",For:"for",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"},be={From:"from",Of:"of"},o={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockComment:"BlockComment",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ContinueStatement:"ContinueStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ExportNamedDeclaration:"ExportNamedDeclaration",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",LineComment:"LineComment",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement"},Le=["++","--"],ci=["-","+","!","~"],li=["=","/=","*=","%=","+=","-="],hi=["||","&&"],Fi=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],ne={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},d={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,Template:10},Ai=["Unknown","Boolean","<end>","Identifier","Keyword","Null","Numeric","Punctuator","String","RegularExpression","Template"],h={InvalidModuleUri:"InvalidModuleUri",ForInOfLoopInitializer:"ForInOfLoopInitializer",IdentifierExpected:"IdentifierExpected",InvalidEscapedReservedWord:"InvalidEscapedReservedWord",InvalidExpression:"InvalidExpression",InvalidFunctionIdentifier:"InvalidFunctionIdentifier",InvalidHexEscapeSequence:"InvalidHexEscapeSequence",InvalidLeftHandSideInAssignment:"InvalidLeftHandSideInAssignment",InvalidLeftHandSideInForIn:"InvalidLeftHandSideInForIn",InvalidTemplateHead:"InvalidTemplateHead",InvalidVariableAssignment:"InvalidVariableAssignment",KeyMustBeString:"KeyMustBeString",NoFunctionInsideBlock:"NoFunctionInsideBlock",NoFunctionInsideFunction:"NoFunctionInsideFunction",ModuleExportRootOnly:"ModuleExportRootOnly",ModuleImportRootOnly:"ModuleImportRootOnly",PunctuatorExpected:"PunctuatorExpected",TemplateOctalLiteral:"TemplateOctalLiteral",UnexpectedBoolean:"UnexpectedBoolean",UnexpectedEndOfScript:"UnexpectedEndOfScript",UnexpectedIdentifier:"UnexpectedIdentifier",UnexpectedKeyword:"UnexpectedKeyword",UnexpectedNull:"UnexpectedNull",UnexpectedNumber:"UnexpectedNumber",UnexpectedPunctuator:"UnexpectedPunctuator",UnexpectedString:"UnexpectedString",UnexpectedTemplate:"UnexpectedTemplate",UnexpectedToken:"UnexpectedToken"},di={[h.InvalidModuleUri]:"Module uri must be a text literal.",[h.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[h.IdentifierExpected]:"'${value}' is an invalid identifier.",[h.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[h.InvalidExpression]:"Invalid expression.",[h.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[h.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[h.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[h.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[h.InvalidTemplateHead]:"Invalid template structure.",[h.InvalidVariableAssignment]:"Invalid variable assignment.",[h.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[h.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[h.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[h.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[h.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[h.PunctuatorExpected]:"'${value}' expected.",[h.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[h.UnexpectedBoolean]:"Unexpected boolean literal.",[h.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[h.UnexpectedIdentifier]:"Unexpected identifier.",[h.UnexpectedKeyword]:"Unexpected keyword.",[h.UnexpectedNull]:"Unexpected null literal.",[h.UnexpectedNumber]:"Unexpected number.",[h.UnexpectedPunctuator]:"Unexpected punctuator.",[h.UnexpectedString]:"Unexpected text literal.",[h.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[h.UnexpectedToken]:"Unexpected token '${value}'."},V=class i extends Error{constructor({code:e,index:t,line:n,column:r,len:s=0,description:u,data:c}){super(u??e),this.declaredRootClass="esri.arcade.lib.diagnostic",this.name="ParsingError",this.code=e,this.index=t,this.line=n,this.column=r,this.len=s,this.data=c,this.description=u,this.range={start:{line:n,column:r-1},end:{line:n,column:r+s}},Error.captureStackTrace?.(this,i)}};function yi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.Program}function S(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.BlockStatement}function Bi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.BlockComment}function pi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.EmptyStatement}function bi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.ExpressionStatement}function Qt(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.FunctionDeclaration}function Se(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.IfStatement}function Te(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.VariableDeclaration}function re(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.ArrayExpression}function Pe(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.BinaryExpression}function Je(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.Identifier}function Di(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.Literal}function Ne(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.LogicalExpression}function Yt(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.ObjectExpression}function ei(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.MemberExpression}function wi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.UnaryExpression}function Ii(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.UpdateExpression}function fi(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.VariableDeclarator}function ki(i){return!!i&&typeof i=="object"&&"type"in i&&i.type===o.Property}function we(i,e){return e.loc.end.line===i.loc.start.line&&e.loc.end.column<=i.loc.start.column}function ti(i,e){return i.range[0]>=e.range[0]&&i.range[1]<=e.range[1]}var Me=class{constructor(){this.comments=[],this._nodeStack=[],this._newComments=[]}insertInnerComments(e){if(!S(e)||e.body.length!==0)return;let t=[];for(let n=this._newComments.length-1;n>=0;n--){let r=this._newComments[n];e.range[1]>=r.range[0]&&(t.unshift(r),this._newComments.splice(n,1))}t.length&&(e.innerComments=t)}attachTrailingComments(e){let t=this._nodeStack.at(-1);if(!t)return;if(S(e)&&ti(t,e))for(let r=this._newComments.length-1;r>=0;r--){let s=this._newComments[r];ti(s,e)&&(t.trailingComments=[...t.trailingComments??[],s],this._newComments.splice(r,1))}let n=[];if(this._newComments.length>0)for(let r=this._newComments.length-1;r>=0;r--){let s=this._newComments[r];we(s,t)?(t.trailingComments=[...t.trailingComments??[],s],this._newComments.splice(r,1)):we(s,e)&&(n.unshift(s),this._newComments.splice(r,1))}if(t.trailingComments){let r=t.trailingComments[0];we(r,e)&&(n=[...n,...t.trailingComments],delete t.trailingComments)}n.length>0&&(e.trailingComments=n)}attachLeadingComments(e){let t;for(;this._nodeStack.length>0;){let s=this._nodeStack[this._nodeStack.length-1];if(e.range[0]<=s.range[0]){t=s,this._nodeStack.pop();continue}break}let n=[],r=[];if(t!=null){if(!t.leadingComments)return;for(let s=t.leadingComments.length-1;s>=0;s--){let u=t.leadingComments[s];if(e.range[0]>=u.range[1]){n.unshift(u),t.leadingComments.splice(s,1);continue}fi(e)&&!Bi(u)&&(r.unshift(u),t.leadingComments.splice(s,1))}t.leadingComments.length===0&&delete t.leadingComments,n.length&&(e.leadingComments=n),r.length&&(e.trailingComments=[...r,...e.trailingComments??[]]);return}for(let s=this._newComments.length-1;s>=0;s--){let u=this._newComments[s];e.range[0]>=u.range[0]&&(n.unshift(u),this._newComments.splice(s,1))}n.length&&(e.leadingComments=n)}attachComments(e){if(yi(e)&&e.body.length>0){let t=this._nodeStack.at(-1);if(t){t.trailingComments=[...t.trailingComments??[],...this._newComments],this._newComments.length=0,this._nodeStack.pop();return}e.trailingComments=[...this._newComments],this._newComments.length=0;return}this.attachTrailingComments(e),this.attachLeadingComments(e),this.insertInnerComments(e),this._nodeStack.push(e)}collectComment(e){this.comments.push(e),this._newComments.push(e)}},vi=/\$\{(.*?)\}/gu;function Ue(i,e){let t=di[i];return e?t.replace(vi,(n,r)=>e[r]?.toString()??""):t}var _e=class{constructor(e=!1){this.tolerant=e,this.errors=[]}recordError(e){this.errors.push(e)}tolerate(e){if(this.tolerant)this.recordError(e);else throw e}throwError(e){throw e.description??=Ue(e.code,e.data),new V(e)}tolerateError(e){e.description??=Ue(e.code,e.data);let t=new V(e);if(this.tolerant)this.recordError(t);else throw t}};function ii(i,e){if(!i)throw new Error(`ASSERT: ${e}`)}var ni={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]/u,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]/u},f={fromCodePoint(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(i)},isLineTerminator(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&ni.NonAsciiIdentifierStart.test(f.fromCodePoint(i))},isIdentifierPart(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&ni.NonAsciiIdentifierPart.test(f.fromCodePoint(i))},isDecimalDigit(i){return i>=48&&i<=57},isHexDigit(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit(i){return i>=48&&i<=55}};function ri(i){return"0123456789abcdef".indexOf(i.toLowerCase())}function Ie(i){return"01234567".indexOf(i)}var P=[[],[],[]];Le.forEach(i=>P[i.length-1]?.push(i));ci.forEach(i=>P[i.length-1]?.push(i));hi.forEach(i=>P[i.length-1]?.push(i));li.forEach(i=>P[i.length-1]?.push(i));Fi.forEach(i=>P[i.length-1]?.push(i));var je=class{constructor(e,t){this.source=e,this.errorHandler=t,this._length=e.length,this.index=0,this.lineNumber=1,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=h.UnexpectedToken){this.errorHandler.throwError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1,data:{value:this.source.charAt(this.index)}})}tolerateUnexpectedToken(e=h.UnexpectedToken){this.errorHandler.tolerateError({code:e,index:this.index,line:this.lineNumber,column:this.index-this.lineStart+1})}skipSingleLineComment(e){let t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{line:0,column:0}};for(;!this.eof();){let u=this.source.charCodeAt(this.index);if(this.index+=1,f.isLineTerminator(u)){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};let c={multiLine:!1,start:n+e,end:this.index-1,range:[n,this.index-1],loc:r};return t.push(c),u===13&&this.source.charCodeAt(this.index)===10&&(this.index+=1),this.lineNumber+=1,this.lineStart=this.index,t}}r.end={line:this.lineNumber,column:this.index-this.lineStart};let s={multiLine:!1,start:n+e,end:this.index,range:[n,this.index],loc:r};return t.push(s),t}skipMultiLineComment(){let e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{line:0,column:0}};for(;!this.eof();){let s=this.source.charCodeAt(this.index);if(f.isLineTerminator(s))s===13&&this.source.charCodeAt(this.index+1)===10&&(this.index+=1),this.lineNumber+=1,this.index+=1,this.lineStart=this.index;else if(s===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2,n.end={line:this.lineNumber,column:this.index-this.lineStart};let u={multiLine:!0,start:t+2,end:this.index-2,range:[t,this.index],loc:n};return e.push(u),e}this.index+=1}else this.index+=1}n.end={line:this.lineNumber,column:this.index-this.lineStart};let r={multiLine:!0,start:t+2,end:this.index,range:[t,this.index],loc:n};return e.push(r),this.tolerateUnexpectedToken(),e}scanComments(){let e=[];for(;!this.eof();){let t=this.source.charCodeAt(this.index);if(f.isWhiteSpace(t))this.index+=1;else if(f.isLineTerminator(t))this.index+=1,t===13&&this.source.charCodeAt(this.index)===10&&(this.index+=1),this.lineNumber+=1,this.lineStart=this.index;else if(t===47)if(t=this.source.charCodeAt(this.index+1),t===47){this.index+=2;let n=this.skipSingleLineComment(2);e=[...e,...n]}else if(t===42){this.index+=2;let n=this.skipMultiLineComment();e=[...e,...n]}else break;else break}return e}isKeyword(e){switch(e=e.toLowerCase(),e.length){case 2:return e===g.If||e===g.In;case 3:return e===g.Var||e===g.For;case 4:return e===g.Else;case 5:return e===g.Break||e===g.While;case 6:return e===g.Return||e===g.Import||e===g.Export;case 8:return e===g.Function||e===g.Continue;default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){let n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=(t-55296)*1024+n-56320+65536)}return t}scanHexEscape(e){let t=e==="u"?4:2,n=0;for(let r=0;r<t;r++)if(!this.eof()&&f.isHexDigit(this.source.charCodeAt(this.index)))n=n*16+ri(this.source[this.index]??""),this.index+=1;else return null;return String.fromCharCode(n)}scanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;for(e==="}"&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index]??"",this.index+=1,!!f.isHexDigit(e.charCodeAt(0)));)t=t*16+ri(e);return(t>1114111||e!=="}")&&this.throwUnexpectedToken(),f.fromCodePoint(t)}getIdentifier(){let e=this.index;for(this.index+=1;!this.eof();){let t=this.source.charCodeAt(this.index);if(t===92)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(f.isIdentifierPart(t))this.index+=1;else break}return this.source.slice(e,this.index)}getComplexIdentifier(){let e=this.codePointAt(this.index),t=f.fromCodePoint(e);this.index+=t.length;let n;for(e===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),this.index+=1,this.source[this.index]==="{"?(this.index+=1,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(n===null||n==="\\"||!f.isIdentifierStart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),!!f.isIdentifierPart(e));)n=f.fromCodePoint(e),t+=n,this.index+=n.length,e===92&&(t=t.substring(0,t.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),this.index+=1,this.source[this.index]==="{"?(this.index+=1,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(n===null||n==="\\"||!f.isIdentifierPart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=n);return t}octalToDecimal(e){let t=e!=="0",n=Ie(e);return!this.eof()&&f.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=n*8+Ie(this.source[this.index]??""),this.index+=1,"0123".includes(e)&&!this.eof()&&f.isOctalDigit(this.source.charCodeAt(this.index))&&(n=n*8+Ie(this.source[this.index]??""),this.index+=1)),{code:n,octal:t}}scanIdentifier(){let e,t=this.index,n=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(n.length===1?e=d.Identifier:this.isKeyword(n)?e=d.Keyword:n.toLowerCase()===H.Null?e=d.NullLiteral:n.toLowerCase()===H.True||n.toLowerCase()===H.False?e=d.BooleanLiteral:e=d.Identifier,e!==d.Identifier&&t+n.length!==this.index){let r=this.index;this.index=t,this.tolerateUnexpectedToken(h.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}}scanPunctuator(){let e=this.index,t=this.source[this.index]??"";switch(t){case"(":case"{":t==="{"&&this.curlyStack.push("{"),this.index+=1;break;case".":this.index+=1;break;case"}":this.index+=1,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":this.index+=1;break;default:for(let n=P.length;n>0;n--)if(t=this.source.substring(this.index,this.index+n),P[n-1]?.includes(t)){this.index+=n;break}}return this.index===e&&this.throwUnexpectedToken(),{type:d.Punctuator,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let t="";for(;!this.eof()&&f.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index],this.index+=1;return t.length===0&&this.throwUnexpectedToken(),f.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:d.NumericLiteral,value:Number.parseInt(`0x${t}`,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanBinaryLiteral(e){let t="";for(;!this.eof();){let n=this.source[this.index];if(n!=="0"&&n!=="1")break;t+=this.source[this.index],this.index+=1}if(t.length===0&&this.throwUnexpectedToken(),!this.eof()){let n=this.source.charCodeAt(this.index);(f.isIdentifierStart(n)||f.isDecimalDigit(n))&&this.throwUnexpectedToken()}return{type:d.NumericLiteral,value:Number.parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanOctalLiteral(e,t){let n="",r=!1;for(f.isOctalDigit(e.charCodeAt(0))&&(r=!0,n=`0${this.source[this.index]}`),this.index+=1;!this.eof()&&f.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index],this.index+=1;return!r&&n.length===0&&this.throwUnexpectedToken(),(f.isIdentifierStart(this.source.charCodeAt(this.index))||f.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:d.NumericLiteral,value:Number.parseInt(n,8),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}}scanNumericLiteral(){let e=this.index,t=this.source[e]??"";ii(f.isDecimalDigit(t.charCodeAt(0))||t===".","Numeric literal must start with a decimal digit or a decimal point");let n="";if(t!=="."){if(n=this.source[this.index]??"",this.index+=1,t=this.source[this.index]??"",n==="0"){if(t==="x"||t==="X")return this.index+=1,this.scanHexLiteral(e);if(t==="b"||t==="B")return this.index+=1,this.scanBinaryLiteral(e);if(t==="o"||t==="O")return this.scanOctalLiteral(t,e)}for(;f.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index],this.index+=1;t=this.source[this.index]??""}if(t==="."){for(n+=this.source[this.index],this.index+=1;f.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index],this.index+=1;t=this.source[this.index]??""}if(t==="e"||t==="E")if(n+=this.source[this.index],this.index+=1,t=this.source[this.index]??"",(t==="+"||t==="-")&&(n+=this.source[this.index],this.index+=1),f.isDecimalDigit(this.source.charCodeAt(this.index)))for(;f.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index],this.index+=1;else this.throwUnexpectedToken();return f.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:d.NumericLiteral,value:Number.parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){let e=this.index,t=this.source[e];ii(t==="'"||t==='"',"String literal must starts with a quote"),this.index+=1;let n=!1,r="";for(;!this.eof();){let s=this.source[this.index]??"";if(this.index+=1,s===t){t="";break}if(s==="\\")if(s=this.source[this.index]??"",this.index+=1,!s||!f.isLineTerminator(s.charCodeAt(0)))switch(s){case"u":if(this.source[this.index]==="{")this.index+=1,r+=this.scanUnicodeCodePointEscape();else{let u=this.scanHexEscape(s);u===null&&this.throwUnexpectedToken(),r+=u}break;case"x":{let u=this.scanHexEscape(s);u===null&&this.throwUnexpectedToken(h.InvalidHexEscapeSequence),r+=u;break}case"n":r+=`
9
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=s,this.tolerateUnexpectedToken();break;default:if(s&&f.isOctalDigit(s.charCodeAt(0))){let u=this.octalToDecimal(s);n=u.octal||n,r+=String.fromCharCode(u.code)}else r+=s;break}else this.lineNumber+=1,s==="\r"&&this.source[this.index]===`
10
- `&&(this.index+=1),this.lineStart=this.index;else{if(f.isLineTerminator(s.charCodeAt(0)))break;r+=s}}return t!==""&&(this.index=e,this.throwUnexpectedToken()),{type:d.StringLiteral,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1,n=this.index,r=this.source[n]==="`",s=!1,u=2;for(this.index+=1;!this.eof();){let c=this.source[this.index]??"";if(this.index+=1,c==="`"){u=1,s=!0,t=!0;break}if(c==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),this.index+=1,t=!0;break}e+=c;continue}if(c==="\\"){if(c=this.source[this.index]??"",this.index+=1,f.isLineTerminator(c.charCodeAt(0)))this.lineNumber+=1,c==="\r"&&this.source[this.index]===`
11
- `&&(this.index+=1),this.lineStart=this.index;else switch(c){case"n":e+=`
12
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"u":if(this.source[this.index]==="{")this.index+=1,e+=this.scanUnicodeCodePointEscape();else{let l=this.index,D=this.scanHexEscape(c);D!==null?e+=D:(this.index=l,e+=c)}break;case"x":{let l=this.scanHexEscape(c);l===null&&this.throwUnexpectedToken(h.InvalidHexEscapeSequence),e+=l;break}case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:c==="0"?(f.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(h.TemplateOctalLiteral),e+="\0"):f.isOctalDigit(c.charCodeAt(0))?this.throwUnexpectedToken(h.TemplateOctalLiteral):e+=c;break}continue}if(f.isLineTerminator(c.charCodeAt(0))){this.lineNumber+=1,c==="\r"&&this.source[this.index]===`
13
- `&&(this.index+=1),this.lineStart=this.index,e+=`
14
- `;continue}e+=c}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:d.Template,value:this.source.slice(n+1,this.index-u),cooked:e,head:r,tail:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}}lex(){if(this.eof())return{type:d.EOF,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};let e=this.source.charCodeAt(this.index);return f.isIdentifierStart(e)?this.scanIdentifier():e===40||e===41||e===59?this.scanPunctuator():e===39||e===34?this.scanStringLiteral():e===46?f.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():f.isDecimalDigit(e)?this.scanNumericLiteral():e===96||e===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():e>=55296&&e<57343&&f.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}},I={None:0,Function:1,IfClause:2,ForLoop:4,ForOfLoop:8,WhileLoop:16},ke={AsObject:0,Automatic:1};function si(i,e=0){let t=i.start-i.lineStart,n=i.lineNumber;return t<0&&(t+=e,n-=1),{index:i.start,line:n,column:t}}function ui(i){return[{index:i.range[0],...i.loc.start},{index:i.range[1],...i.loc.end}]}function ai(i){return i in ne?ne[i]:0}var Oe=class{constructor(e,t={},n){this.delegate=n,this.hasLineTerminator=!1,this.options={tokens:typeof t.tokens=="boolean"&&t.tokens,comments:typeof t.comments=="boolean"&&t.comments,tolerant:typeof t.tolerant=="boolean"&&t.tolerant},this.options.comments&&(this.commentHandler=new Me),this.errorHandler=new _e(this.options.tolerant),this.scanner=new je(e,this.errorHandler),this.context={isAssignmentTarget:!1,blockContext:I.None,curlyParsingType:ke.AsObject},this.rawToken={type:d.EOF,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.endMarker={index:0,line:this.scanner.lineNumber,column:0},this.readNextRawToken(),this.endMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwIfInvalidType(e,t,{validTypes:n,invalidTypes:r}){n?.some(s=>e.type===s)||r?.some(s=>e.type===s)&&this.throwError(h.InvalidExpression,t)}throwError(e,t,n=this.endMarker){let{index:r,line:s,column:u}=t,c=n.index-r-1;this.errorHandler.throwError({code:e,index:r,line:s,column:u+1,len:c})}tolerateError(e,t){throw new Error("######################################### !!!")}unexpectedTokenError(e={}){let{rawToken:t}=e,{code:n,data:r}=e,s;if(t){if(!n)switch(t.type){case d.EOF:n=h.UnexpectedEndOfScript;break;case d.Identifier:n=h.UnexpectedIdentifier;break;case d.NumericLiteral:n=h.UnexpectedNumber;break;case d.StringLiteral:n=h.UnexpectedString;break;case d.Template:n=h.UnexpectedTemplate;break}s=t.value.toString()}else s="ILLEGAL";n??=h.UnexpectedToken,r??={value:s};let u=Ue(n,r);if(t){let D=t.start,x=t.lineNumber,C=t.start-t.lineStart+1;return new V({code:n,index:D,line:x,column:C,len:t.end-t.start-1,data:r,description:u})}let{index:c,line:l}=this.endMarker;return new V({code:n,index:c,line:l,column:this.endMarker.column+1,data:r,description:u})}throwUnexpectedToken(e={}){throw e.rawToken??=this.rawToken,this.unexpectedTokenError(e)}collectComments(e){let{commentHandler:t}=this;!t||!e.length||e.forEach(n=>{let r={type:n.multiLine?o.BlockComment:o.LineComment,value:this.getSourceValue(n),range:n.range,loc:n.loc};t.collectComment(r)})}peekAhead(e){let t=()=>(this.scanner.scanComments(),this.scanner.lex()),n=this.scanner.saveState(),r=e.call(this,t);return this.scanner.restoreState(n),r}getSourceValue(e){return this.scanner.source.slice(e.start,e.end)}convertToToken(e){return{type:Ai[e.type],value:this.getSourceValue(e),range:[e.start,e.end],loc:{start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}}}readNextRawToken(){this.endMarker.index=this.scanner.index,this.endMarker.line=this.scanner.lineNumber,this.endMarker.column=this.scanner.index-this.scanner.lineStart;let e=this.rawToken;this.collectComments(this.scanner.scanComments()),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),this.rawToken=this.scanner.lex(),this.hasLineTerminator=e.lineNumber!==this.rawToken.lineNumber,this.options.tokens&&this.rawToken.type!==d.EOF&&this.tokens.push(this.convertToToken(this.rawToken))}captureStartMarker(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}getItemLocation(e){return{range:[e.index,this.endMarker.index],loc:{start:{line:e.line,column:e.column},end:{line:this.endMarker.line,column:this.endMarker.column}}}}finalize(e){return(this.delegate??this.commentHandler)&&(this.commentHandler?.attachComments(e),this.delegate?.(e)),e}expectPunctuator(e){let t=this.rawToken;if(this.matchPunctuator(e)){this.readNextRawToken();return}this.throwUnexpectedToken({rawToken:t,code:h.PunctuatorExpected,data:{value:e}})}expectKeyword(e){if(this.rawToken.type===d.Keyword&&this.rawToken.value.toLowerCase()===e.toString()){this.readNextRawToken();return}this.throwUnexpectedToken({rawToken:this.rawToken})}expectContextualKeyword(e){if(this.rawToken.type===d.Identifier&&this.rawToken.value.toLowerCase()===e){this.readNextRawToken();return}this.throwUnexpectedToken({rawToken:this.rawToken})}matchKeyword(e){return this.rawToken.type===d.Keyword&&this.rawToken.value.toLowerCase()===e}matchContextualKeyword(e){return this.rawToken.type===d.Identifier&&this.rawToken.value===e}matchPunctuator(e){return this.rawToken.type===d.Punctuator&&this.rawToken.value===e}getMatchingPunctuator(e){if(typeof e=="string"&&(e=e.split("")),!(this.rawToken.type!==d.Punctuator||!e.length))return e.find(this.matchPunctuator.bind(this))}isolateCoverGrammar(e){let t=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;let n=e.call(this);return this.context.isAssignmentTarget=t,n}inheritCoverGrammar(e){let t=this.context.isAssignmentTarget;this.context.isAssignmentTarget=!0;let n=e.call(this);return this.context.isAssignmentTarget&&=t,n}withBlockContext(e,t){let n=this.context.blockContext;this.context.blockContext|=e;let r=this.context.curlyParsingType;this.context.curlyParsingType=ke.Automatic;let s=t.call(this);return this.context.blockContext=n,this.context.curlyParsingType=r,s}consumeSemicolon(){if(this.matchPunctuator(";")){this.readNextRawToken();return}if(!this.hasLineTerminator){if(this.rawToken.type===d.EOF||this.matchPunctuator("}")){this.endMarker.index=this.startMarker.index,this.endMarker.line=this.startMarker.line,this.endMarker.column=this.startMarker.column;return}this.throwUnexpectedToken({rawToken:this.rawToken})}}parsePrimaryExpression(){let e=this.captureStartMarker(),t=this.rawToken;switch(t.type){case d.Identifier:return this.readNextRawToken(),this.finalize({type:o.Identifier,name:t.value,...this.getItemLocation(e)});case d.NumericLiteral:case d.StringLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:o.Literal,value:t.value,raw:this.getSourceValue(t),isString:typeof t.value=="string",...this.getItemLocation(e)});case d.BooleanLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:o.Literal,value:t.value.toLowerCase()===H.True,raw:this.getSourceValue(t),isString:!1,...this.getItemLocation(e)});case d.NullLiteral:return this.context.isAssignmentTarget=!1,this.readNextRawToken(),this.finalize({type:o.Literal,value:null,raw:this.getSourceValue(t),isString:!1,...this.getItemLocation(e)});case d.Template:return this.parseTemplateLiteral();case d.Punctuator:switch(t.value){case"(":return this.inheritCoverGrammar(this.parseGroupExpression.bind(this));case"[":return this.inheritCoverGrammar(this.parseArrayInitializer.bind(this));case"{":return this.inheritCoverGrammar(this.parseObjectExpression.bind(this));default:return this.throwUnexpectedToken({rawToken:this.rawToken})}case d.Keyword:return this.context.isAssignmentTarget=!1,this.throwUnexpectedToken({rawToken:this.rawToken});default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseArrayInitializer(){let e=this.captureStartMarker();this.expectPunctuator("[");let t=[];for(;!this.matchPunctuator("]");){let n=this.captureStartMarker();this.matchPunctuator(",")?(this.readNextRawToken(),this.throwError(h.InvalidExpression,n)):(t.push(this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this))),this.matchPunctuator("]")||this.expectPunctuator(","))}return this.expectPunctuator("]"),this.finalize({type:o.ArrayExpression,elements:t,...this.getItemLocation(e)})}parseObjectPropertyKey(){let e=this.captureStartMarker(),t=this.rawToken;switch(t.type){case d.StringLiteral:return this.readNextRawToken(),this.finalize({type:o.Literal,value:t.value,raw:this.getSourceValue(t),isString:!0,...this.getItemLocation(e)});case d.Identifier:case d.BooleanLiteral:case d.NullLiteral:case d.Keyword:return this.readNextRawToken(),this.finalize({type:o.Identifier,name:t.value,...this.getItemLocation(e)});default:this.throwError(h.KeyMustBeString,e)}}parseObjectProperty(){let e=this.rawToken,t=this.captureStartMarker(),n=this.parseObjectPropertyKey(),r=!1,s=null;return this.matchPunctuator(":")?(this.readNextRawToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this))):e.type===d.Identifier?(r=!0,s=this.finalize({type:o.Identifier,name:e.value,...this.getItemLocation(t)})):this.throwUnexpectedToken({rawToken:this.rawToken}),this.finalize({type:o.Property,kind:"init",key:n,value:s,shorthand:r,...this.getItemLocation(t)})}parseObjectExpression(){let e=this.captureStartMarker();this.expectPunctuator("{");let t=[];for(;!this.matchPunctuator("}");)t.push(this.parseObjectProperty()),this.matchPunctuator("}")||this.expectPunctuator(",");return this.expectPunctuator("}"),this.finalize({type:o.ObjectExpression,properties:t,...this.getItemLocation(e)})}parseTemplateElement(e=!1){let t=this.rawToken;t.type!==d.Template&&this.throwUnexpectedToken({rawToken:t}),e&&!t.head&&this.throwUnexpectedToken({code:h.InvalidTemplateHead,rawToken:t});let n=this.captureStartMarker();this.readNextRawToken();let{value:r,cooked:s,tail:u}=t,c=this.finalize({type:o.TemplateElement,value:{raw:r,cooked:s},tail:u,...this.getItemLocation(n)});return c.loc.start.column+=1,c.loc.end.column-=u?1:2,c}parseTemplateLiteral(){let e=this.captureStartMarker(),t=[],n=[],r=this.parseTemplateElement(!0);for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize({type:o.TemplateLiteral,quasis:n,expressions:t,...this.getItemLocation(e)})}parseGroupExpression(){this.expectPunctuator("(");let e=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this));return this.expectPunctuator(")"),e}parseArguments(){this.expectPunctuator("(");let e=[];if(!this.matchPunctuator(")"))for(;;){let t=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this));if(e.push(t),this.matchPunctuator(")")||(this.expectPunctuator(","),this.matchPunctuator(")")))break}return this.expectPunctuator(")"),e}parseMemberName(){let e=this.rawToken,t=this.captureStartMarker();return this.readNextRawToken(),e.type!==d.NullLiteral&&e.type!==d.Identifier&&e.type!==d.Keyword&&e.type!==d.BooleanLiteral&&this.throwUnexpectedToken({rawToken:e}),this.finalize({type:o.Identifier,name:e.value,...this.getItemLocation(t)})}parseLeftHandSideExpression(){let e=this.captureStartMarker(),t=this.inheritCoverGrammar(this.parsePrimaryExpression.bind(this)),n=this.captureStartMarker(),r;for(;r=this.getMatchingPunctuator("([.");)switch(r){case"(":{this.context.isAssignmentTarget=!1,t.type!==o.Identifier&&t.type!==o.MemberExpression&&this.throwError(h.IdentifierExpected,e,n);let s=this.parseArguments();t=this.finalize({type:o.CallExpression,callee:t,arguments:s,...this.getItemLocation(e)});continue}case"[":{this.context.isAssignmentTarget=!0,this.expectPunctuator("[");let s=this.isolateCoverGrammar(()=>this.parseExpression());this.expectPunctuator("]"),t=this.finalize({type:o.MemberExpression,computed:!0,object:t,property:s,...this.getItemLocation(e)});continue}case".":{this.context.isAssignmentTarget=!0,this.expectPunctuator(".");let s=this.parseMemberName();t=this.finalize({type:o.MemberExpression,computed:!1,object:t,property:s,...this.getItemLocation(e)});continue}}return t}parseUpdateExpression(){let e=this.captureStartMarker(),t=this.getMatchingPunctuator(Le);if(t){this.readNextRawToken();let u=this.captureStartMarker(),c=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));return c.type!==o.Identifier&&c.type!==o.MemberExpression&&c.type!==o.CallExpression&&this.throwError(h.InvalidExpression,u),this.context.isAssignmentTarget||this.tolerateError(h.InvalidLeftHandSideInAssignment,e),this.context.isAssignmentTarget=!1,this.finalize({type:o.UpdateExpression,operator:t,argument:c,prefix:!0,...this.getItemLocation(e)})}let n=this.captureStartMarker(),r=this.inheritCoverGrammar(this.parseLeftHandSideExpression.bind(this)),s=this.captureStartMarker();return this.hasLineTerminator||(t=this.getMatchingPunctuator(Le),!t)?r:(r.type!==o.Identifier&&r.type!==o.MemberExpression&&this.throwError(h.InvalidExpression,n,s),this.context.isAssignmentTarget||this.tolerateError(h.InvalidLeftHandSideInAssignment,e),this.readNextRawToken(),this.context.isAssignmentTarget=!1,this.finalize({type:o.UpdateExpression,operator:t,argument:r,prefix:!1,...this.getItemLocation(e)}))}parseUnaryExpression(){let e=this.getMatchingPunctuator(ci);if(e){let t=this.captureStartMarker();this.readNextRawToken();let n=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));return this.context.isAssignmentTarget=!1,this.finalize({type:o.UnaryExpression,operator:e,argument:n,prefix:!0,...this.getItemLocation(t)})}return this.parseUpdateExpression()}parseBinaryExpression(){let e=this.rawToken,t=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this));if(this.rawToken.type!==d.Punctuator)return t;let n=this.rawToken.value,r=ai(n);if(r===0)return t;this.readNextRawToken(),this.context.isAssignmentTarget=!1;let s=[e,this.rawToken],u=t,c=this.inheritCoverGrammar(this.parseUnaryExpression.bind(this)),l=[u,n,c],D=[r];for(;this.rawToken.type===d.Punctuator&&(r=ai(this.rawToken.value))>0;){for(;l.length>2&&r<=D[D.length-1];){c=l.pop();let F=l.pop();D.pop(),u=l.pop(),s.pop();let m=s[s.length-1],T=si(m,m.lineStart);l.push(this.finalize(this.createBinaryOrLogicalExpression(T,F,u,c)))}l.push(this.rawToken.value),D.push(r),s.push(this.rawToken),this.readNextRawToken(),l.push(this.inheritCoverGrammar(this.parseUnaryExpression.bind(this)))}let x=l.length-1;t=l[x];let C=s.pop();for(;x>1;){let F=s.pop();if(!F)break;let m=C?.lineStart,T=si(F,m),he=l[x-1];t=this.finalize(this.createBinaryOrLogicalExpression(T,he,l[x-2],t)),x-=2,C=F}return t}createBinaryOrLogicalExpression(e,t,n,r){let s=hi.includes(t)?o.LogicalExpression:o.BinaryExpression;return s===o.BinaryExpression?{type:s,operator:t,left:n,right:r,...this.getItemLocation(e)}:((n.type===o.AssignmentExpression||n.type===o.UpdateExpression)&&this.throwError(h.InvalidExpression,...ui(n)),(r.type===o.AssignmentExpression||r.type===o.UpdateExpression)&&this.throwError(h.InvalidExpression,...ui(n)),{type:s,operator:t,left:n,right:r,...this.getItemLocation(e)})}parseAssignmentExpression(){let e=this.captureStartMarker(),t=this.inheritCoverGrammar(this.parseBinaryExpression.bind(this)),n=this.captureStartMarker(),r=this.getMatchingPunctuator(li);if(!r)return t;t.type!==o.Identifier&&t.type!==o.MemberExpression&&this.throwError(h.InvalidExpression,e,n),this.context.isAssignmentTarget||this.tolerateError(h.InvalidLeftHandSideInAssignment,e),this.matchPunctuator("=")||(this.context.isAssignmentTarget=!1),this.readNextRawToken();let s=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this));return this.finalize({type:o.AssignmentExpression,left:t,operator:r,right:s,...this.getItemLocation(e)})}parseExpression(){return this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this))}parseStatements(e){let t=[];for(;this.rawToken.type!==d.EOF&&!this.matchPunctuator(e);){let n=this.parseStatementListItem();pi(n)||t.push(n)}return t}parseStatementListItem(){return this.context.isAssignmentTarget=!0,this.matchKeyword(g.Function)?this.parseFunctionDeclaration():this.matchKeyword(g.Export)?this.parseExportDeclaration():this.matchKeyword(g.Import)?this.parseImportDeclaration():this.parseStatement()}parseBlock(){let e=this.captureStartMarker();this.expectPunctuator("{");let t=this.parseStatements("}");return this.expectPunctuator("}"),this.finalize({type:o.BlockStatement,body:t,...this.getItemLocation(e)})}parseObjectStatement(){let e=this.captureStartMarker(),t=this.parseObjectExpression();return this.finalize({type:o.ExpressionStatement,expression:t,...this.getItemLocation(e)})}parseBlockOrObjectStatement(){return this.context.curlyParsingType===ke.AsObject?this.parseObjectStatement():this.peekAhead(e=>{let t=e();return!(t.type!==d.Identifier&&t.type!==d.StringLiteral||(t=e(),t.type!==d.Punctuator||t.value!==":"))})?this.parseObjectStatement():this.parseBlock()}parseIdentifier(){let e=this.rawToken;if(e.type!==d.Identifier)return null;let t=this.captureStartMarker();return this.readNextRawToken(),this.finalize({type:o.Identifier,name:e.value,...this.getItemLocation(t)})}parseVariableDeclarator(){let e=this.captureStartMarker(),t=this.parseIdentifier();t||this.throwUnexpectedToken({code:h.IdentifierExpected});let n=null;if(this.matchPunctuator("=")){this.readNextRawToken();let r=this.rawToken;try{n=this.isolateCoverGrammar(this.parseAssignmentExpression.bind(this))}catch{this.throwUnexpectedToken({rawToken:r,code:h.InvalidVariableAssignment})}}return this.finalize({type:o.VariableDeclarator,id:t,init:n,...this.getItemLocation(e)})}parseVariableDeclarators(){let e=[this.parseVariableDeclarator()];for(;this.matchPunctuator(",");)this.readNextRawToken(),e.push(this.parseVariableDeclarator());return e}parseVariableDeclaration(){let e=this.captureStartMarker();this.expectKeyword(g.Var);let t=this.parseVariableDeclarators();return this.consumeSemicolon(),this.finalize({type:o.VariableDeclaration,declarations:t,kind:"var",...this.getItemLocation(e)})}parseEmptyStatement(){let e=this.captureStartMarker();return this.expectPunctuator(";"),this.finalize({type:o.EmptyStatement,...this.getItemLocation(e)})}parseExpressionStatement(){let e=this.captureStartMarker(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize({type:o.ExpressionStatement,expression:t,...this.getItemLocation(e)})}parseIfClause(){return this.withBlockContext(I.IfClause,this.parseStatement.bind(this))}parseIfStatement(){let e=this.captureStartMarker();this.expectKeyword(g.If),this.expectPunctuator("(");let t=this.captureStartMarker(),n=this.parseExpression(),r=this.captureStartMarker();this.expectPunctuator(")"),(n.type===o.AssignmentExpression||n.type===o.UpdateExpression)&&this.throwError(h.InvalidExpression,t,r);let s=this.parseIfClause(),u=null;return this.matchKeyword(g.Else)&&(this.readNextRawToken(),u=this.parseIfClause()),this.finalize({type:o.IfStatement,test:n,consequent:s,alternate:u,...this.getItemLocation(e)})}parseWhileStatement(){let e=this.captureStartMarker();this.expectKeyword(g.While),this.expectPunctuator("(");let t=this.captureStartMarker(),n=this.parseExpression(),r=this.captureStartMarker();this.expectPunctuator(")"),(n.type===o.AssignmentExpression||n.type===o.UpdateExpression)&&this.throwError(h.InvalidExpression,t,r);let s=this.withBlockContext(I.WhileLoop,this.parseStatement.bind(this));return this.finalize({type:o.WhileStatement,test:n,body:s,...this.getItemLocation(e)})}parseForStatement(){let e=o.ForStatement,t=null,n=null,r=null,s=null,u=null,c=this.captureStartMarker();if(this.expectKeyword(g.For),this.expectPunctuator("("),this.matchKeyword(g.Var)){let D=this.captureStartMarker();this.readNextRawToken();let x=this.parseVariableDeclarators();t=this.finalize({type:o.VariableDeclaration,declarations:x,kind:"var",...this.getItemLocation(D)});let C=this.matchKeyword(g.In),F=this.matchContextualKeyword(be.Of);x.length===1&&(C||F)&&(x[0].init&&this.throwError(h.ForInOfLoopInitializer,D),e=C?o.ForInStatement:o.ForOfStatement,s=t)}else if(!this.matchPunctuator(";")){let D=this.context.isAssignmentTarget,x=this.captureStartMarker();t=this.inheritCoverGrammar(this.parseAssignmentExpression.bind(this));let C=this.matchKeyword(g.In),F=this.matchContextualKeyword(be.Of);C||F?(this.context.isAssignmentTarget||this.tolerateError(h.InvalidLeftHandSideInForIn,x),t.type!==o.Identifier&&this.throwError(h.InvalidLeftHandSideInForIn,x),e=C?o.ForInStatement:o.ForOfStatement,s=t):this.context.isAssignmentTarget=D}e===o.ForStatement?(this.expectPunctuator(";"),n=this.matchPunctuator(";")?null:this.isolateCoverGrammar(this.parseExpression.bind(this)),this.expectPunctuator(";"),r=this.matchPunctuator(")")?null:this.isolateCoverGrammar(this.parseExpression.bind(this))):(this.readNextRawToken(),u=this.parseExpression()),this.expectPunctuator(")");let l=this.withBlockContext(e===o.ForOfStatement?I.ForOfLoop:I.ForLoop,()=>this.isolateCoverGrammar(this.parseStatement.bind(this)));return e===o.ForInStatement||e===o.ForOfStatement?this.finalize({type:e,left:s,right:u,body:l,...this.getItemLocation(c)}):this.finalize({type:e,init:t,test:n,update:r,body:l,...this.getItemLocation(c)})}parseContinueStatement(){let e=this.captureStartMarker();return this.expectKeyword(g.Continue),this.consumeSemicolon(),this.finalize({type:o.ContinueStatement,...this.getItemLocation(e)})}parseBreakStatement(){let e=this.captureStartMarker();return this.expectKeyword(g.Break),this.consumeSemicolon(),this.finalize({type:o.BreakStatement,...this.getItemLocation(e)})}parseReturnStatement(){let e=this.captureStartMarker();this.expectKeyword(g.Return);let t=!this.matchPunctuator(";")&&!this.matchPunctuator("}")&&!this.hasLineTerminator&&this.rawToken.type!==d.EOF||this.rawToken.type===d.StringLiteral||this.rawToken.type===d.Template?this.parseExpression():null;return this.consumeSemicolon(),this.finalize({type:o.ReturnStatement,argument:t,...this.getItemLocation(e)})}parseStatement(){switch(this.rawToken.type){case d.BooleanLiteral:case d.NullLiteral:case d.NumericLiteral:case d.StringLiteral:case d.Template:case d.Identifier:return this.parseExpressionStatement();case d.Punctuator:return this.rawToken.value==="{"?this.parseBlockOrObjectStatement():this.rawToken.value==="("?this.parseExpressionStatement():this.rawToken.value===";"?this.parseEmptyStatement():this.parseExpressionStatement();case d.Keyword:switch(this.rawToken.value.toLowerCase()){case g.Break:return this.parseBreakStatement();case g.Continue:return this.parseContinueStatement();case g.For:return this.parseForStatement();case g.Function:return this.parseFunctionDeclaration();case g.If:return this.parseIfStatement();case g.Return:return this.parseReturnStatement();case g.Var:return this.parseVariableDeclaration();case g.While:return this.parseWhileStatement();default:return this.parseExpressionStatement()}default:return this.throwUnexpectedToken({rawToken:this.rawToken})}}parseFormalParameters(){let e=[];if(this.expectPunctuator("("),!this.matchPunctuator(")"))for(;this.rawToken.type!==d.EOF;){let t=this.parseIdentifier();if(t||this.throwUnexpectedToken({rawToken:this.rawToken,code:h.IdentifierExpected}),e.push(t),this.matchPunctuator(")")||(this.expectPunctuator(","),this.matchPunctuator(")")))break}return this.expectPunctuator(")"),e}parseFunctionDeclaration(){(this.context.blockContext&I.Function)===I.Function&&this.throwUnexpectedToken({code:h.NoFunctionInsideFunction}),((this.context.blockContext&I.WhileLoop)===I.WhileLoop||(this.context.blockContext&I.ForOfLoop)===I.ForOfLoop||(this.context.blockContext&I.IfClause)===I.IfClause)&&this.throwUnexpectedToken({code:h.NoFunctionInsideBlock});let e=this.captureStartMarker();this.expectKeyword(g.Function);let t=this.parseIdentifier();t||this.throwUnexpectedToken({code:h.InvalidFunctionIdentifier});let n=this.parseFormalParameters(),r=this.context.blockContext;this.context.blockContext|=I.Function;let s=this.parseBlock();return this.context.blockContext=r,this.finalize({type:o.FunctionDeclaration,id:t,params:n,body:s,...this.getItemLocation(e)})}parseScript(){let e=this.captureStartMarker(),t=this.parseStatements(),n=this.finalize({type:o.Program,body:t,...this.getItemLocation(e)});return this.options.tokens&&(n.tokens=this.tokens),this.options.tolerant&&(n.errors=this.errorHandler.errors),n}parseExportDeclaration(){this.context.blockContext!==I.None&&this.throwUnexpectedToken({code:h.ModuleExportRootOnly});let e=null,t=this.captureStartMarker();return this.expectKeyword(g.Export),this.matchKeyword(g.Var)?e=this.parseVariableDeclaration():this.matchKeyword("function")?e=this.parseFunctionDeclaration():this.throwUnexpectedToken({code:h.InvalidExpression}),this.finalize({type:o.ExportNamedDeclaration,declaration:e,specifiers:[],source:null,...this.getItemLocation(t)})}parseModuleSpecifier(){let e=this.captureStartMarker(),t=this.rawToken;if(t.type===d.StringLiteral)return this.readNextRawToken(),this.finalize({type:o.Literal,value:t.value,raw:this.getSourceValue(t),isString:!0,...this.getItemLocation(e)});this.throwError(h.InvalidModuleUri,e)}parseDefaultSpecifier(){let e=this.captureStartMarker(),t=this.parseIdentifier();return t||this.throwUnexpectedToken({code:h.IdentifierExpected}),this.finalize({type:o.ImportDefaultSpecifier,local:t,...this.getItemLocation(e)})}parseImportDeclaration(){this.context.blockContext!==I.None&&this.throwUnexpectedToken({code:h.ModuleImportRootOnly});let e=this.captureStartMarker();this.expectKeyword(g.Import);let t=this.parseDefaultSpecifier();this.expectContextualKeyword(be.From);let n=this.parseModuleSpecifier();return this.finalize({type:o.ImportDeclaration,specifiers:[t],source:n,...this.getItemLocation(e)})}};function Li(i,e,t){return new Oe(i,e,t).parseScript()}var y={AlreadyDefined:"AlreadyDefined",ApiConflict:"ApiConflict",AssignedNeverUsed:"AssignedNeverUsed",DefinedNeverAssigned:"DefinedNeverAssigned",DefinedNeverUsed:"DefinedNeverUsed",EmptyBlockStatement:"EmptyBlockStatement",ExecutionError:"ExecutionError",InvalidApiFunctionUsage:"InvalidApiFunctionUsage",InvalidConstantIdentifier:"InvalidConstantIdentifier",InvalidPropertyIdentifier:"InvalidPropertyIdentifier",NoArgumentExpected:"NoArgumentExpected",NotADictionary:"NotADictionary",NotDefined:"NotDefined",NotEnoughArguments:"NotEnoughArguments",ProfileVariablesAreImmutable:"ProfileVariablesAreImmutable",ProfileVariablesConflict:"ProfileVariablesConflict",ReservedKeyword:"ReservedKeyword",TooManyArguments:"TooManyArguments",UnexpectedEmptyFunction:"UnexpectedEmptyFunction",UnexpectedPropertyIdentifier:"UnexpectedPropertyIdentifier",UnknownPropertyIdentifier:"UnknownPropertyIdentifier"},tn={[y.AlreadyDefined]:"'${identifier}' is already defined.",[y.ApiConflict]:"'${identifier}' is already defined as an Arcade constant or function.",[y.AssignedNeverUsed]:"'${identifier}' is assigned but never used.",[y.DefinedNeverAssigned]:"'${identifier}' is defined but never assigned.",[y.DefinedNeverUsed]:"'${identifier}' is defined but never used.",[y.EmptyBlockStatement]:"Empty block statement.",[y.ExecutionError]:"Execution Error: '${stack}'",[y.InvalidApiFunctionUsage]:"Arcade function '${identifier}' not used in a call expression.",[y.InvalidConstantIdentifier]:"Invalid constant identifier, expecting ${list}.",[y.InvalidPropertyIdentifier]:"Invalid property identifier, expecting ${list}.",[y.NoArgumentExpected]:"Expecting no argument.",[y.NotADictionary]:"'${identifier}' doesn't have properties.",[y.NotDefined]:"'${identifier}' is not defined.",[y.NotEnoughArguments]:"Expecting at least ${min} argument(s).",[y.ProfileVariablesAreImmutable]:"Profile variables cannot be modified.",[y.ProfileVariablesConflict]:"'${identifier}' is already defined as a profile variable.",[y.ReservedKeyword]:"'${identifier}' is a reserved keyword.",[y.TooManyArguments]:"Too many arguments, expecting ${max}.",[y.UnexpectedEmptyFunction]:"Unexpected empty function '${identifier}'.",[y.UnexpectedPropertyIdentifier]:"Unexpected property identifier.",[y.UnknownPropertyIdentifier]:"Unknown property identifier '${identifier}'.",...di};function se(i,e){return i.line-e.line||i.column-e.column}function Si(i,e){let t={start:i.loc.start,end:i.loc.end},n=r=>Ti(t,r.loc);return se(t.start,t.end)<0&&(t.start={...t.start},e.skipSpaces(t.start),se(t.start,t.end)<0&&(t.end={...t.end},e.skipSpaces(t.end,!0))),i.leadingComments?.forEach(n),i.trailingComments?.forEach(n),t}function Ti(i,e){se(e.start,i.start)<0&&(i.start=e.start),se(i.end,e.end)<0&&(i.end=e.end)}var Pi=/\S/u;function te(i=""){return!Pi.test(i)}var ve={indentWidth:2,wrapColumn:80,quote:null};function Ze(i){return{indentWidth:i?.indentWidth??ve.indentWidth,wrapColumn:i?.wrapColumn??ve.wrapColumn,quote:i?.quote??ve.quote}}var Ni=/^\s*/u,Mi=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/u,ze=class i{constructor(e){this.lineRecords=e,this.length=e.length}static fromString(e,t){if(typeof e!="string")return e;let n=t?.indentWidth;return new i(e.split(Mi).map(r=>{let s=Ni.exec(r)?.[0]??"";return{line:r,indentation:Ui(s,n),locked:!1,sliceStart:s.length,sliceEnd:r.length}}))}toString(){return this.sliceString(this.firstPos(),this.lastPos())}charAt(e){let{line:t,column:n}=e,r=this.lineRecords[t-1];if(typeof r>"u"||n<0)return"";let s=this.getIndentationAt(t);if(n<s)return" ";let u=n+r.sliceStart-s;return u===r.sliceEnd&&t<this.length?`
15
- `:u>=r.sliceEnd?"":r.line.charAt(u)}getIndentationAt(e){return Math.max(this.lineRecords[e-1].indentation,0)}getLineLength(e){let t=this.lineRecords[e-1];return this.getIndentationAt(e)+t.sliceEnd-t.sliceStart}getStatementLineSeparators(e){let t=this.slice(e,this.skipSpaces({...e})??this.lastPos());return t.length===1||!te(t.lineRecords[1].line)?[`
16
- `]:[`
17
- `,`
18
- `]}getLeadingCommentSeparators(e){let t=this.slice(e,this.skipSpaces({...e})??this.lastPos());return t.length===1?[" "]:te(t.lineRecords[1].line)?[`
19
- `,`
20
- `]:[`
21
- `]}nextPos(e,t=!1){let n=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(n)?(e.column+=1,t?!!this.skipSpaces(e):!0):n<this.length?(e.line+=1,e.column=0,t?!!this.skipSpaces(e):!0):!1}prevPos(e,t=!1){let n=e.line,r=e.column;if(r<1){if(n-=1,n<1)return!1;r=this.getLineLength(n)}else r=Math.min(r-1,this.getLineLength(n));return e.line=n,e.column=r,t?!!this.skipSpaces(e,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(e,t=!1){if(t){for(;this.prevPos(e);)if(!te(this.charAt(e))&&this.nextPos(e))return e;return null}else{for(;te(this.charAt(e));)if(!this.nextPos(e))return null;return e}}slice(e,t){if(!t&&!e)return this;if(t??=this.lastPos(),!e)throw new Error("cannot slice with end but not start");let n=this.lineRecords.slice(e.line-1,t.line);return e.line===t.line?n[0]=z(n[0],e.column,t.column):(n[0]=z(n[0],e.column),n.push(z(n.pop()??n[0],0,t.column))),new i(n)}sliceString(e=this.firstPos(),t=this.lastPos()){let n=[];for(let r=e.line;r<=t.line;r++){let s=this.lineRecords[r-1];r===e.line?r===t.line?s=z(s,e.column,t.column):s=z(s,e.column):r===t.line&&(s=z(s,0,t.column));let u="",c=Math.max(s.indentation,0);c>0&&(u+=new Array(c+1).join(" ")),u+=s.line.slice(s.sliceStart,s.sliceEnd),n.push(u)}return n.join(`
22
- `)}};function Ui(i,e=2){let t=0,n=i.length;for(let r=0;r<n;r++)switch(i.charCodeAt(r)){case 9:{let s=Math.ceil(t/e)*e;s===t?t+=e:t=s;break}case 11:case 12:case 13:case 65279:break;case 32:default:t+=1;break}return t}function z(i,e,t){let n=i.sliceStart,r=i.sliceEnd,s=Math.max(i.indentation,0),u=s+r-n;return t??=u,e=Math.max(e,0),t=Math.min(t,u),t=Math.max(t,e),t<s?(s=t,r=n):r-=u-t,e<s?s-=e:(e-=s,s=0,n+=e),i.indentation===s&&i.sliceStart===n&&i.sliceEnd===r?i:{line:i.line,indentation:s,sliceStart:n,sliceEnd:r}}function oi(i,e,t){return!i&&!t?"":i?t?`${i}${e}${t}`:i:t}var _i=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/u,p=class i{constructor(e=[]){this.lines=e}static fromString(e){return new i(e.split(_i))}static appendLines(e=[]){let t=new i;return e.forEach(n=>{n!=null&&(typeof n=="string"?t.lines.push(n):t.lines.push(...n.lines))}),t}static joinLines(e=[],t=""){let n=new i;return e.forEach(r=>{if(r==null)return;let s=n.lines.pop()??"";typeof r=="string"?n.lines.push(oi(s,t,r)):(n.lines.push(oi(s,t,r.lines.slice(0)[0])),n.lines.push(...r.lines.slice(1)))}),n}static aggregateLines(e,t,n,r,s){if(n.isEmpty)return e;if(!t||e.isEmpty)return n.indentFirstLine(s);let u=r.start.line-t.end.line;if(u===0)return i.joinLines([e," ",n]);let c=u===1?void 0:"";return i.appendLines([e,c,n.indentFirstLine(s)])}get isEmpty(){return this.lines.length===0||this.lines.length===1&&this.lines[0].length===0}get maxLineLength(){return this.lines.reduce((e,t)=>Math.max(e,t.length),0)}get firstLineLength(){return(this.lines[0]??"").length}get lastLineLength(){return(this.lines[this.lines.length-1]??"").length}surroundWith(e="",t=""){return!e&&!t?this:this.isEmpty?new i([e+t]):this.lines.length===1?new i([e+this.lines[0]+t]):i.joinLines([e,this,t])}indentFirstLine(e=""){return this.isEmpty?this:(this.lines[0]=e+this.lines[0],this)}suffixWith(e){return this.surroundWith("",e)}toString(e=`
23
- `){return this.lines.join(e)}};function Qe(i,e){return i*(e.indentWidth??2)}function N(i=0,e){let{indentWidth:t=2}=Ze(e);return new Array(i*t+1).join(" ")}function ie(i){return i.replace(/['"]/gu,e=>e==='"'?"'":'"')}function ji(i,e){switch(i.type){case o.UnaryExpression:return ei(e)&&e.object===i;case o.BinaryExpression:case o.LogicalExpression:switch(e.type){case o.UnaryExpression:return!0;case o.MemberExpression:return e.object===i;case o.BinaryExpression:case o.LogicalExpression:return ne[e.operator]>ne[i.operator];default:return!1}case o.Literal:return ei(e)&&typeof i.value=="number"&&e.object===i;case o.AssignmentExpression:switch(e.type){case o.UnaryExpression:case o.BinaryExpression:case o.LogicalExpression:case o.ReturnStatement:return!0;case o.MemberExpression:return e.object===i;default:return!1}default:return!1}}function E(i,e,t){switch(i?.type){case o.BinaryExpression:case o.LogicalExpression:return Oi(i,e,t);case o.AssignmentExpression:return new K(i,e,t);case o.MemberExpression:return new oe(i,e,t);case o.Identifier:return new q(i,e,t);case o.CallExpression:return new Ve(i,e,t);case o.ObjectExpression:return M(i,e,t);case o.ArrayExpression:return M(i,e,t);case o.Literal:return new q(i,e,t);case o.UpdateExpression:case o.UnaryExpression:return new ae(i,e,t);case o.TemplateLiteral:return new Re(i,e,t);case o.VariableDeclaration:return new G(i,e,t);default:throw new Error(`unknown type: ${JSON.stringify(i)}`)}}function M(i,e,t){let n=new $(i,e,t);switch(i.type){case o.ArrayExpression:return n.setupCollection(i.elements.map(r=>E(r,i,t)),"SquareBrackets"),n;case o.ObjectExpression:return n.setupCollection(i.properties.map(r=>new $e(r,i,t)),"CurlyBrackets"),n;case o.VariableDeclaration:return n.prefix="var ",n.setupCollection(i.declarations.map(r=>mi(r,i,t)),"None"),n;case o.FunctionDeclaration:return n.prefix=`function ${i.id.name}`,n.setupCollection(i.params.map(r=>E(r,i,t)),"Parentheses"),n;case o.ForStatement:return n.prefix="for ",n.setupCollection([E(i.init,i,t),E(i.test,i,t),E(i.update,i,t)],"Parentheses",";"),n;case o.ForInStatement:case o.ForOfStatement:return n.prefix="for ",n.setupCollection([new K(i,e,t)],"Parentheses",""),n;case o.IfStatement:return n.prefix="if ",n.setupCollection([E(i.test,i,t)],"Parentheses",""),n;case o.WhileStatement:return n.prefix="while ",n.setupCollection([E(i.test,i,t)],"Parentheses",""),n;default:return n}}function mi(i,e,t){return i.init?new K(i,e,t):new q(i.id,e,t)}function Oi(i,e,t){let n=[...ue(i.left,i.operator),...ue(i.right,i.operator)].map(s=>E(s,i,t)),r=new $(i,e,t);return r.setupCollection(n,"None",` ${i.operator}`),r}function ue(i,e){return i.type!==o.BinaryExpression&&i.type!==o.LogicalExpression?[i]:i.operator!==e?[i]:[...ue(i.left,e),...ue(i.right,e)]}var v=class{constructor(e,t,n){this.node=e,this.parent=t,this.options=n,this.prefix="",this.suffix="",this.groupingParentheses=!1,this.groupingParentheses=ji(e,t)}get openingParenthesis(){return this.groupingParentheses?"(":""}get closingParenthesis(){return this.groupingParentheses?")":""}get leadingString(){return[this.prefix,this.openingParenthesis].join("")}get trailingString(){return[this.closingParenthesis,this.suffix].join("")}finalize(e){return typeof e=="string"&&(e=p.fromString(e)),e.surroundWith(this.leadingString,this.trailingString)}},$=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="CollectionPrinter",this.bracketsType="None",this.separator=",",this.printers=[]}setupCollection(e=[],t="None",n){return this.bracketsType=t,this.separator=n??this.separator,this.printers=e,this}getOpeningBracket(e=!1,t="singleLine"){if(this.bracketsType==="None")return"";if(this.bracketsType==="CurlyBrackets")return`{${e||t==="multiline"?"":" "}`;switch(this.bracketsType){case"Parentheses":return"(";case"SquareBrackets":return"[";default:return""}}getClosingBracket(e=!1,t="singleLine"){if(this.bracketsType==="None")return"";if(this.bracketsType==="CurlyBrackets")return`${e||t==="multiline"?"":" "}}`;switch(this.bracketsType){case"Parentheses":return")";case"SquareBrackets":return"]";default:return""}}getLinesLevel(e=0){return this.bracketsType!=="None"||bi(this.parent)||fi(this.parent)||(Ne(this.node)||Pe(this.node))&&(Ne(this.parent)||Pe(this.parent))?e+1:e}finalize(e,t="singleLine",n=0){if(this.bracketsType==="None")return super.finalize(e);let r=this.getOpeningBracket(e.isEmpty,t),s=this.getClosingBracket(e.isEmpty,t);if(t==="singleLine")return super.finalize(e.surroundWith(r,s));let u=N(n,this.options);return super.finalize(p.appendLines([r,e,u+s]))}singleLineFormat(e=0){let t=this.printers.length-1;return p.joinLines(this.printers.map((n,r)=>n.format("singleLine",e).suffixWith(r<t?this.separator:""))," ")}optimizedPrinterFormat(e,t,n=0){let r=this.getLinesLevel(n),s=N(r,this.options),u=this.bracketsType==="None"&&t===0?"":s,c=t<this.printers.length-1?this.separator:"",l=e.format("singleLine",r).suffixWith(c);return l.maxLineLength+s.length<=this.options.wrapColumn?l.indentFirstLine(u):e.format("multiline",r).suffixWith(c).indentFirstLine(u)}multilineFormat(e=0){return p.appendLines(this.printers.map((t,n)=>this.optimizedPrinterFormat(t,n,e)))}format(e="singleLine",t=0){if(this.printers.length===0){let r=this.getOpeningBracket(!0,e),s=this.getClosingBracket(!0,e);return super.finalize(p.fromString(r+s))}if(e==="singleLine"){let r=this.singleLineFormat(t);return this.finalize(r,e,t)}let n=this.multilineFormat(t);return this.finalize(n,e,t)}},zi=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/u,q=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="StringPrinter"}format(){if(Je(this.node))return this.finalize(this.node.name);if(typeof this.node.value!="string")return this.finalize(this.node.raw);if(ki(this.parent)&&this.parent.key===this.node&&Di(this.node)&&typeof this.node.value=="string"&&zi.test(this.node.value))return this.finalize(this.node.value);switch(this.options.quote){case"auto":{let e=JSON.stringify(this.node.value),t=ie(JSON.stringify(ie(this.node.value)));return this.finalize(e.length>t.length?t:e)}case"single":return this.finalize(ie(JSON.stringify(ie(this.node.value))));default:return this.finalize(JSON.stringify(this.node.value))}}},ae=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="SingleExpressionPrinter";let r=wi(e),s=Ii(e);if(r||s){this.prefix=r?e.operator:"",this.suffix=s&&!e.prefix?e.operator:"",this.printer=E(e.argument,e,this.options);return}this.printer=E(e,t,this.options)}format(e="singleLine",t=0){return this.finalize(this.printer.format(e,t))}},G=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="VariableDeclaratorsPrinter",e.declarations.length===1?(this.printer=mi(e.declarations[0],e,this.options),this.printer.prefix="var "):this.printer=M(e,t,this.options)}format(e="singleLine",t=0){return this.finalize(this.printer.format(e,t))}},Ve=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="CallExpressionPrinter",this.argumentsPrinter=new $(e,t,n),this.argumentsPrinter.setupCollection(e.arguments.map(r=>E(r,e,n)),"Parentheses"),Je(e.callee)?this.argumentsPrinter.prefix=e.callee.name:this.memberExpressionPrinter=new oe(e.callee,t,n)}format(e="singleLine",t=0){if(!this.memberExpressionPrinter)return this.finalize(this.argumentsPrinter.format(e,t));let n=this.memberExpressionPrinter.format("singleLine",t),r=this.argumentsPrinter.format("singleLine",t);if(e==="singleLine")return this.finalize(p.joinLines([n,r]));let s=Qe(t,this.options)+this.leadingString.length+n.firstLineLength;return s+1<this.options.wrapColumn?(r=this.argumentsPrinter.format("multiline",t),this.finalize(p.joinLines([n,r]))):(n=this.memberExpressionPrinter.format("multiline",t),s=n.lastLineLength,s+r.maxLineLength>this.options.wrapColumn&&(r=this.argumentsPrinter.format("multiline",t+1)),this.finalize(p.joinLines([n,r])))}},oe=class extends v{constructor(e,t,n){if(super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="MemberExpressionPrinter",this.objectPrinter=E(e.object,e,this.options),e.computed){let r=new $(e.property,e,this.options);r.setupCollection([E(e.property,e,this.options)],"SquareBrackets"),this.propertyPrinter=r}else{let r=new ae(e.property,e,this.options);r.prefix=".",this.propertyPrinter=r}}format(e="singleLine",t=0){let n=this.objectPrinter.format("singleLine",t),r=this.propertyPrinter.format("singleLine",t);if(e==="singleLine")return this.finalize(p.joinLines([n,r]));let s=Qe(t,this.options)+this.leadingString.length+n.firstLineLength;s>this.options.wrapColumn&&(n=this.objectPrinter.format("multiline",t),s=n.lastLineLength);let u=r.firstLineLength+this.trailingString.length;if(s+u<this.options.wrapColumn)return this.finalize(p.joinLines([n,r]));if(this.node.computed)return this.finalize(p.joinLines([n,this.propertyPrinter.format("multiline",t)]));let c=t+1,l=N(c,this.options);return r=this.propertyPrinter.format("singleLine",t),u=l.length+r.lastLineLength+this.trailingString.length,u>this.options.wrapColumn&&(r=this.propertyPrinter.format("multiline",c)),this.finalize(p.appendLines([n,r.indentFirstLine(l)]))}},$e=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="PropertyPrinter",this.key=E(e.key,e,this.options),e.shorthand||(this.key.suffix=":",this.value=E(e.value,e,this.options))}format(e="singleLine",t=0){if(this.node.shorthand||!this.value)return this.finalize(this.key.format(e,t));let n=this.key.format("singleLine",t);if(e==="singleLine"){let u=this.value.format("singleLine",t);return this.finalize(p.joinLines([n,u]," "))}if(re(this.node.value)||re(this.node.value)){let u=this.value.format("multiline",t);return this.finalize(p.joinLines([n,u]," "))}let r=N(t+1,this.options),s=this.value.format("singleLine",t+1).indentFirstLine(r);return s.maxLineLength+this.trailingString.length+1<=this.options.wrapColumn?this.finalize(p.appendLines([n,s])):(s=this.value.format("multiline",t+1).indentFirstLine(r),this.finalize(p.appendLines([n,s])))}},K=class extends v{constructor(e,t,n){switch(super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="OperationPrinter",this.operator="",this.noNewLineWrapping=!1,e.type){case o.AssignmentExpression:this.leftPrinter=E(e.left,e,this.options),this.operator=` ${e.operator}`,this.rightPrinter=E(e.right,e,this.options),this.noNewLineWrapping=(Je(e.left)||Di(e.left))&&(re(e.right)||Yt(e.right));return;case o.VariableDeclarator:this.leftPrinter=E(e.id,e,this.options),e.init&&(this.operator=" =",this.rightPrinter=E(e.init,e,this.options)),this.noNewLineWrapping=re(e.init)||Yt(e.init);return;case o.ForInStatement:case o.ForOfStatement:this.leftPrinter=E(e.left,e,this.options),this.operator=e.type==="ForInStatement"?" in":" of",this.rightPrinter=E(e.right,e,this.options);return;case o.BinaryExpression:case o.LogicalExpression:this.leftPrinter=E(e.left,e,this.options),this.operator=` ${e.operator}`,this.rightPrinter=E(e.right,e,this.options);return}}format(e="singleLine",t=0){if(!this.rightPrinter)return this.finalize(this.leftPrinter.format(e,t));let n=this.leftPrinter.format("singleLine",t).suffixWith(this.operator),r=this.rightPrinter.format("singleLine",t);if(e==="singleLine")return this.finalize(p.joinLines([n,r]," "));let s=Qe(t,this.options)+this.leadingString.length+n.maxLineLength+1;s>this.options.wrapColumn&&(n=this.leftPrinter.format("multiline",t).suffixWith(this.operator),s=n.lastLineLength+1);let u=r.firstLineLength+this.trailingString.length+1;if(s+u<this.options.wrapColumn)return this.finalize(p.joinLines([n,r]," "));let c=this.rightPrinter.format("multiline",t);return c.firstLineLength+this.trailingString.length+1+s<this.options.wrapColumn||this.noNewLineWrapping?this.finalize(p.joinLines([n,c]," ")):(u>this.options.wrapColumn&&(r=this.rightPrinter.format("multiline",t+1)),r=r.indentFirstLine(N(t+1)),this.finalize(p.appendLines([n,r])))}},Re=class extends v{constructor(e,t,n){super(e,t,n),this.node=e,this.parent=t,this.options=n,this.type="TemplateLiteralPrinter",this.parts=[];let r=e.expressions.map(s=>E(s,e,this.options));this.parts.push("`"),e.quasis.forEach((s,u)=>{this.parts.push(s.value.raw),u<r.length&&(this.parts.push("${"),this.parts.push(r[u]),this.parts.push("}"))}),this.parts.push("`")}format(e="singleLine",t=0){return this.finalize(p.joinLines(this.parts.map(n=>typeof n=="string"?n:n.format(e,t))))}};function Vi(i){let e={...i.leadingComments?.slice(0,1)[0]?.loc.start??i.loc.start},t={...i.trailingComments?.slice(-1)[0]?.loc.end??i.loc.end};return{start:e,end:t}}function $i(i){return i.trailingComments?.slice(-1)[0]?.type===o.LineComment}var L=class{constructor(e,t,n){this.node=e,this.parent=t,this.options=n,this.indentStatementFirstLine=!0,this.externalOffset=0,this.options=Ze(this.options)}createStatementPrinter(e){switch(e.type){case o.Program:return new U(e,this.node,this.options);case o.ImportDeclaration:return new Xe(e,this.node,this.options);case o.ExpressionStatement:return new Ge(e,this.node,this.options);case o.FunctionDeclaration:return new le(e,this.node,this.options);case o.ExportNamedDeclaration:return Te(e)?new ce(e,this.node,this.options):new le(e,this.node,this.options);case o.BlockStatement:return new U(e,this.node,this.options);case o.ReturnStatement:return new Ke(e,this.node,this.options);case o.VariableDeclaration:return new ce(e,this.node,this.options);case o.IfStatement:return new He(e,this.node,this.options);case o.ForStatement:case o.ForInStatement:case o.ForOfStatement:case o.WhileStatement:return new qe(e,this.node,this.options);case o.EmptyStatement:case o.BreakStatement:case o.ContinueStatement:return new We(e,this.node,this.options);default:throw new Error(`unknown type: ${JSON.stringify(e)}`)}}getFormattedBody(e,t=0){if(this.cachedBody&&this.cachedBody.level===t)return this.cachedBody.body;let n=e.format(t);return this.cachedBody={body:n,level:t},n}getStatementIndentation(e=0){return this.indentStatementFirstLine?N(e,this.options):""}getStatementIndentationLength(e=0){return this.indentStatementFirstLine?e*this.options.indentWidth:0}getIndentation(e=0){return N(e,this.options)}addComments(e,t=0){let n=this.getStatementIndentation(t);if(!this.node.leadingComments?.length&&!this.node.trailingComments?.length)return e.indentFirstLine(n);let r=(this.node.leadingComments??[]).reduce((u,c)=>{let l=this.formatComment(c);return{formattedLines:p.aggregateLines(u.formattedLines,u.location,l,c.loc,n),location:c.loc}},{formattedLines:new p}),s=p.aggregateLines(r.formattedLines,r.location,e,this.node.loc,n);return(this.node.trailingComments?.reduce((u,c)=>{let l=this.formatComment(c);return{formattedLines:p.aggregateLines(u.formattedLines,u.location,l,c.loc,n),location:c.loc}},{formattedLines:s,location:this.node.loc})??{formattedLines:s}).formattedLines}formatInnerComments(e=0){if(!S(this.node)||!Array.isArray(this.node.innerComments)||!this.node.innerComments.length)return new p;let t=this.getIndentation(e);return this.node.innerComments.reduce((n,r)=>{let s=this.formatComment(r);return{formattedLines:p.aggregateLines(n.formattedLines,n.location,s,r.loc,t),location:r.loc}},{formattedLines:new p}).formattedLines}formatComment(e){switch(e.type){case o.BlockComment:return p.fromString(e.value).surroundWith("/*","*/");default:return p.fromString(e.value.trimEnd()).surroundWith("//")}}canFitSingleLine(e,t=0,n=0){return this.externalOffset+n+this.getStatementIndentationLength(t)+e.lastLineLength<=this.options.wrapColumn}},U=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.printers=[],this.printers=e.body.map(r=>this.createStatementPrinter(r))}format(e=0){if(this.printers.length===0)return this.formatEmptyBlock(e);let t=[],n=S(this.node);n&&t.push("{");let r=n?e+1:e,s;return this.printers.forEach(u=>{if(pi(u.node))return;let c=Vi(u.node);s&&c.start.line-s.end.line>1&&t.push(""),s=c,t.push(u.format(r))}),n&&t.push(`${this.getIndentation(e)}}`),this.addComments(p.appendLines(t),e)}formatEmptyBlock(e=0){if(!S(this.node))return this.addComments(p.fromString(""),e);let t=this.formatInnerComments(e+1),n="{",r=`${this.getIndentation(e)}}`;return t.isEmpty?Se(this.parent)?this.addComments(p.appendLines([n,r]),e):this.addComments(p.fromString("{}"),e):this.addComments(p.appendLines([n,t,r]),e)}},We=class extends L{constructor(e,t,n){switch(super(e,t,n),this.node=e,this.keyword="",this.node.type){case o.ContinueStatement:this.keyword="continue;";break;case o.BreakStatement:this.keyword="break;";break;default:this.keyword=";"}}format(e=0){return this.addComments(p.fromString(this.keyword),e)}},ce=class extends L{constructor(e,t,n){if(super(e,t,n),this.node=e,Te(e))this.printer=new G(e,t,n);else if(Te(e.declaration))this.printer=new G(e.declaration,t,n),this.printer.prefix="export ";else throw new Error(`invalid type: ${JSON.stringify(e)}`)}format(e=0,t="optimized"){if(t==="singleLine"||t==="optimized"){let n=this.printer.format("singleLine",e).suffixWith(";");if(t==="singleLine"||this.canFitSingleLine(n,e))return this.addComments(n,e)}return this.addComments(this.printer.format("multiline",e).suffixWith(";"),e)}},le=class extends L{constructor(e,t,n){if(super(e,t,n),this.node=e,Qt(e))this.header=M(e,t,n),this.body=new U(e.body,e,n);else if(Qt(e.declaration))this.header=M(e.declaration,t,n),this.header.prefix="export ",this.body=new U(e.declaration.body,e,n);else throw new Error(`invalid type: ${JSON.stringify(e)}`)}format(e=0,t="optimized"){this.body.indentStatementFirstLine=!1;let n=this.getFormattedBody(this.body,e);if(t==="singleLine"||t==="optimized"){let s=this.header.format("singleLine",e);if(t==="singleLine"||this.canFitSingleLine(s,e,n.firstLineLength+1))return this.addComments(p.joinLines([s,n]," "),e)}let r=this.header.format("multiline",e);return this.addComments(p.joinLines([r,n]," "),e)}},He=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.header=M(e,t,n),this.consequent=this.createStatementPrinter(e.consequent),this.consequent.indentStatementFirstLine=!1,e.alternate&&(this.alternate=this.createStatementPrinter(e.alternate),this.alternate.indentStatementFirstLine=!1)}format(e=0,t="optimized"){let n=!1,r;if(t==="singleLine"||t==="optimized"){let l=this.header.format("singleLine",e),D=S(this.node.consequent)?2:0;(t==="singleLine"||this.canFitSingleLine(l,e,D))&&(r=l)}r||(n=!0,r=this.header.format("multiline",e));let s;if(S(this.node.consequent)){let l=this.consequent.format(e,"optimized");s=p.joinLines([r," ",l])}else if(n||Se(this.node.consequent)){this.consequent.indentStatementFirstLine=!0;let l=this.consequent.format(e+1,"singleLine");this.canFitSingleLine(l,e+1)||(l=this.consequent.format(e+1,"multiline")),s=p.appendLines([r,l])}else{this.consequent.indentStatementFirstLine=!1;let l=this.consequent.format(e,"singleLine");this.canFitSingleLine(l,0,r.lastLineLength+1)?s=p.joinLines([r," ",l]):(this.consequent.indentStatementFirstLine=!0,l=this.consequent.format(e+1,"optimized"),s=p.appendLines([r,l]))}if(!this.alternate)return this.addComments(s,e);let u=$i(this.node.consequent)||!S(this.node.consequent),c;if(this.alternate.externalOffset=0,S(this.node.alternate)||Se(this.node.alternate))this.alternate.indentStatementFirstLine=!1,this.alternate.externalOffset=u?5:s.lastLineLength+6,c=this.alternate.format(e,"optimized"),c=p.joinLines(["else ",c]);else{let l=u?4:s.lastLineLength+4;this.alternate.indentStatementFirstLine=!1,c=this.alternate.format(e,"singleLine"),this.canFitSingleLine(c,e,l+1)?c=p.joinLines(["else ",c]):(this.alternate.indentStatementFirstLine=!0,c=this.alternate.format(e+1,"optimized"),c=p.appendLines(["else",c]))}return u?s=p.appendLines([s,c.indentFirstLine(this.getIndentation(e))]):s=p.joinLines([s,c]," "),this.addComments(s,e)}},qe=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.header=M(e,t,n),this.body=this.createStatementPrinter(e.body)}format(e=0,t="optimized"){this.body.indentStatementFirstLine=!1;let n=this.getFormattedBody(this.body,e);if(t==="singleLine"||t==="optimized"){let s=this.header.format("singleLine",e);if(t==="singleLine"||this.canFitSingleLine(s,e,n.firstLineLength+1))return this.addComments(p.joinLines([s,n]," "),e)}let r=this.header.format("multiline",e);return this.addComments(p.joinLines([r,n]," "),e)}},Ge=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.expression=E(e.expression,e,n)}format(e=0,t="optimized"){if(t==="singleLine"||t==="optimized"){let n=this.expression.format("singleLine",e).suffixWith(";");if(t==="singleLine"||this.canFitSingleLine(n,e))return this.addComments(n,e)}return this.addComments(this.expression.format("multiline",e).suffixWith(";"),e)}},Ke=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.argument=E(e.argument,e,n)}format(e=0,t="optimized"){if(t==="singleLine"||t==="optimized"){let u=this.argument.format("singleLine",e).surroundWith("return ",";");if(t==="singleLine"||this.canFitSingleLine(u,e))return this.addComments(u,e)}if(!Ne(this.node.argument)&&!Pe(this.node.argument)){let u=this.argument.format("multiline",e).surroundWith("return ",";");return this.addComments(u,e)}let n=this.getIndentation(e+1),r=this.argument.format("multiline",e+1).indentFirstLine(n),s=this.getIndentation(e);return this.addComments(p.appendLines(["return (",r,`${s});`]),e)}},Xe=class extends L{constructor(e,t,n){super(e,t,n),this.node=e,this.libraryNamePrinter=E(e.specifiers[0].local,e,n),this.librarySourcePrinter=E(e.source,e,n)}format(e=0){return this.addComments(p.joinLines(["import"," ",this.libraryNamePrinter.format("singleLine",e)," from ",this.librarySourcePrinter.format("singleLine")]).suffixWith(";"),e)}};function nn(i,e){if(!i)return"";let t=Ze(e),n=ze.fromString(i,t),r=n.toString(),s=Li(r,{tolerant:!0,comments:!0}),u=Si(s,n);return s.loc.start=u.start,s.loc.end=u.end,new U(s,null,t).format().toString()}var Ri=Object.values(g),Wi=Object.values(H);var rn=Wi.map(i=>({label:i,kind:B.Constant})),sn=Ri.map(i=>({label:i,kind:B.Keyword})),un=[{label:"exportfunction",kind:B.Snippet,detail:"Export Function Statement",insertText:`export function \${1:functionName} ($2) {
24
- $0
25
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"exportvar",kind:B.Snippet,detail:"Export Variable Statement",insertText:"export var ${0:variableName}\n",insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"for",kind:B.Snippet,detail:"For Loop Statement",insertText:"for (var ${1:i} = 0; ${1:i} < ${2:array.length}; ${1:i}++) {\n $0\n}",insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"forin",kind:B.Snippet,detail:"For-In Loop Statement",insertText:"for (var ${1:i} in ${2:arrayOrObject}) {\n $0\n}",insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"forof",kind:B.Snippet,detail:"For-Of Loop Statement",insertText:"for (var ${1:i} of ${2:arrayOrObject}) {\n $0\n}",insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"function",kind:B.Snippet,detail:"Function Statement",insertText:`function \${1:functionName} ($2) {
26
- $0
27
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"if",kind:B.Snippet,detail:"If Statement",insertText:`if (\${1:1==1}) {
28
- $0
29
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"ifelse",kind:B.Snippet,detail:"If-Else Statement",insertText:`if (\${1:1==1}) {
30
- $0
31
- } else {
32
-
33
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"else",kind:B.Snippet,detail:"Else Statement",insertText:`else {
34
- $0
35
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"import",kind:B.Snippet,detail:"Import Statement",insertText:'import ${1:namespace} from "${0:uri}"',insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet},{label:"while",kind:B.Snippet,detail:"While Loop Statement",insertText:`while (\${1:false}) {
36
- $0
37
- }`,insertTextMode:w.adjustIndentation,insertTextFormat:b.Snippet}];export{Z as a,B as b,b as c,w as d,Gi as e,nn as f,Ri as g};