emailengine-app 2.84.0 → 2.84.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.dockerignore +6 -0
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +35 -0
  4. package/Dockerfile +2 -2
  5. package/bin/emailengine.js +15 -0
  6. package/data/google-crawlers.json +1 -1
  7. package/docker-compose.yml +1 -1
  8. package/lib/account/own-account-key.js +42 -0
  9. package/lib/account-assignment.js +1 -33
  10. package/lib/account.js +32 -19
  11. package/lib/add-trackers.js +11 -4
  12. package/lib/api-routes/account-routes.js +67 -14
  13. package/lib/api-routes/gateway-routes.js +9 -3
  14. package/lib/api-routes/message-routes.js +7 -1
  15. package/lib/api-routes/mint-bounds.js +11 -0
  16. package/lib/api-routes/route-helpers.js +125 -3
  17. package/lib/api-routes/submit-routes.js +4 -2
  18. package/lib/auth-token.js +23 -10
  19. package/lib/bounce-detect.js +17 -5
  20. package/lib/consts.js +34 -0
  21. package/lib/create-imap-client.js +41 -2
  22. package/lib/email-client/base-client.js +20 -10
  23. package/lib/email-client/gmail-client.js +21 -7
  24. package/lib/email-client/imap/mailbox.js +10 -4
  25. package/lib/email-client/imap/response-metrics.js +75 -0
  26. package/lib/email-client/imap-client.js +5 -2
  27. package/lib/email-client/message-builder.js +7 -2
  28. package/lib/email-client/outlook/graph-api.js +17 -2
  29. package/lib/email-client/outlook-client.js +6 -3
  30. package/lib/email-client/smtp-pool-manager.js +6 -0
  31. package/lib/encrypt.js +9 -0
  32. package/lib/export.js +3 -1
  33. package/lib/get-raw-email.js +4 -2
  34. package/lib/imap-proxy-auth.js +14 -1
  35. package/lib/imapproxy/imap-core/lib/commands/authenticate-plain.js +1 -0
  36. package/lib/imapproxy/imap-core/lib/commands/login.js +1 -0
  37. package/lib/imapproxy/imap-core/lib/imap-command.js +86 -43
  38. package/lib/imapproxy/imap-core/lib/imap-stream.js +58 -13
  39. package/lib/imapproxy/imap-core/lib/indexer/indexer.js +3 -1
  40. package/lib/mcp/listen.js +10 -1
  41. package/lib/oauth/external-account-config.js +3 -1
  42. package/lib/oauth/gmail.js +21 -48
  43. package/lib/oauth/mail-ru.js +5 -38
  44. package/lib/oauth/outlook.js +26 -44
  45. package/lib/pbkdf2-phc.js +18 -1
  46. package/lib/privileged-settings.js +6 -3
  47. package/lib/redis-scan-delete.js +15 -1
  48. package/lib/schemas.js +78 -32
  49. package/lib/settings.js +13 -1
  50. package/lib/smtp-auth.js +23 -0
  51. package/lib/tools.js +245 -56
  52. package/lib/ui-routes/account-routes.js +16 -37
  53. package/lib/ui-routes/admin-config-routes.js +10 -38
  54. package/lib/ui-routes/admin-entities-routes.js +22 -24
  55. package/lib/ui-routes/auth-routes.js +47 -24
  56. package/lib/ui-routes/connection-security-form.js +74 -0
  57. package/lib/ui-routes/form-lists.js +46 -0
  58. package/lib/ui-routes/mcp-consent-routes.js +5 -1
  59. package/lib/ui-routes/oauth-config-routes.js +9 -18
  60. package/lib/ui-routes/sign-in-helpers.js +59 -0
  61. package/lib/ui-routes/unsubscribe-routes.js +6 -3
  62. package/lib/utils/map-concurrent.js +36 -0
  63. package/lib/utils/network.js +28 -0
  64. package/lib/utils/provider-id.js +27 -0
  65. package/lib/utils/require-tls.js +33 -0
  66. package/lib/web-safe-html.js +5 -6
  67. package/lib/webhook-penalty.js +75 -0
  68. package/lib/webhook-routing.js +22 -2
  69. package/package.json +21 -21
  70. package/sbom.json +1 -1
  71. package/server.js +74 -38
  72. package/static/js/ace/ace.js +1 -1
  73. package/static/js/ace/mode-handlebars.js +1 -1
  74. package/static/js/ace/mode-html.js +1 -1
  75. package/static/js/ace/mode-javascript.js +1 -1
  76. package/static/js/ace/mode-markdown.js +1 -1
  77. package/static/js/ace/worker-html.js +1 -1
  78. package/static/js/ace/worker-javascript.js +1 -1
  79. package/static/js/ace/worker-json.js +1 -1
  80. package/static/js/ee-client.js +5 -0
  81. package/static/licenses.html +23 -23
  82. package/translations/messages.pot +66 -66
  83. package/views/account/security.hbs +10 -0
  84. package/views/accounts/account.hbs +11 -11
  85. package/views/accounts/edit.hbs +6 -2
  86. package/views/partials/gateway_form.hbs +3 -1
  87. package/workers/api.js +43 -3
  88. package/workers/webhooks.js +39 -3
  89. package/config/test.toml +0 -46
  90. package/install.sh +0 -428
  91. package/setup-production.sh +0 -215
  92. package/systemd/emailengine.service +0 -97
  93. package/systemd/nginx-proxy.conf +0 -77
@@ -1 +1 @@
1
- "no use strict";!function(e){function t(e,t){var n=e,r="";while(n){var i=t[n];if(typeof i=="string")return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";var s=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}if(typeof e.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i&&i.data,file:t,line:n,col:r,stack:i&&i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);var s=e.require.modules[i];if(s)return s.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)return console.log("unable to load "+i);var o=t(i,e.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeof r!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.slice(0,r.length).map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(t){for(var n in t)this.require.tlns[n]=t[n]},e.initSender=function(){var n=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};return function(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),new i};var n=e.main=null,r=e.sender=null;e.onmessage=function(t){var i=t.data;if(i.event&&r)r._signal(i.event,i.data);else if(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),r=e.sender=e.initSender();var s=this.require(i.module)[i.classname];n=e.main=new s(r)}}}(this),define("ace/lib/oop",[],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/apply_delta",[],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/lib/event_emitter",[],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;this.on(e,function r(){n.off(e,r),t.apply(null,arguments)});if(!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=undefined),this._eventRegistry&&(this._eventRegistry[e]=undefined),this._defaultHandlers&&(this._defaultHandlers[e]=undefined)},t.EventEmitter=r}),define("ace/range",[],function(e,t,n){"use strict";var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return this.end.column==0?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),define("ace/anchor",[],function(e,t,n){"use strict";function o(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function u(e,t,n){var r=e.action=="insert",i=(r?1:-1)*(e.end.row-e.start.row),s=(r?1:-1)*(e.end.column-e.start.column),u=e.start,a=r?u:e.end;return o(t,u,n)?{row:t.row,column:t.column}:o(a,t,!n)?{row:t.row+i,column:t.column+(t.row==a.row?s:0)}:{row:u.row,column:u.column}}var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof t!="number"?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var t=u(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)},e.prototype.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();s.prototype.$insertRight=!1,r.implement(s.prototype,i),t.Anchor=s}),define("ace/document",[],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(){function e(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new u(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row<t&&e.end.row<t||e.action=="insert"&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length-t+1,i=e.start.row,s=e.start.column;for(var o=0,u=0;o<r;o=u){u+=t-1;var a=n.slice(o,u);a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}e.lines=n.slice(o),e.start.row=i+o,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:e+n[s-1].length+r}},e.prototype.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",r.implement(a.prototype,s),t.Document=a}),define("ace/lib/deep_copy",[],function(e,t,n){t.deepCopy=function r(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=r(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=r(e[n]);return t}}),define("ace/lib/lang",[],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),define("ace/worker/mirror",[],function(e,t,n){"use strict";var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){var r=e.data;if(r[0].start)t.applyDeltas(r);else for(var i=0;i<r.length;i+=2){var o,u;Array.isArray(r[i+1])?o={action:"insert",start:r[i],lines:r[i+1]}:o={action:"remove",start:r[i],end:r[i+1]};if((o.action=="insert"?o.start:o.end).row>=t.$lines.length)throw u=new Error("Invalid delta"),u.data={path:s.$path,linesLength:t.$lines.length,start:o.start,end:o.end},u;t.applyDelta(o,!0)}if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),define("ace/mode/json/json_parse",[],function(e,t,n){"use strict";var r,i,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},o,u=function(e){throw{name:"SyntaxError",message:e,at:r,text:o}},a=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(r),r+=1,i},f=function(){var e,t="";i==="-"&&(t="-",a("-"));while(i>="0"&&i<="9")t+=i,a();if(i==="."){t+=".";while(a()&&i>="0"&&i<="9")t+=i}if(i==="e"||i==="E"){t+=i,a();if(i==="-"||i==="+")t+=i,a();while(i>="0"&&i<="9")t+=i,a()}e=+t;if(!isNaN(e))return e;u("Bad number")},l=function(){var e,t,n="",r;if(i==='"')while(a()){if(i==='"')return a(),n;if(i==="\\"){a();if(i==="u"){r=0;for(t=0;t<4;t+=1){e=parseInt(a(),16);if(!isFinite(e))break;r=r*16+e}n+=String.fromCharCode(r)}else{if(typeof s[i]!="string")break;n+=s[i]}}else{if(i=="\n"||i=="\r")break;n+=i}}u("Bad string")},c=function(){while(i&&i<=" ")a()},h=function(){switch(i){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}u("Unexpected '"+i+"'")},p,d=function(){var e=[];if(i==="["){a("["),c();if(i==="]")return a("]"),e;while(i){e.push(p()),c();if(i==="]")return a("]"),e;a(","),c()}}u("Bad array")},v=function(){var e,t={};if(i==="{"){a("{"),c();if(i==="}")return a("}"),t;while(i){e=l(),c(),a(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=p(),c();if(i==="}")return a("}"),t;a(","),c()}}u("Bad object")};return p=function(){c();switch(i){case"{":return v();case"[":return d();case'"':return l();case"-":return f();default:return i>="0"&&i<="9"?f():h()}},function(e,t){var n;return o=e,r=0,i=" ",n=p(),c(),i&&u("Syntax error"),typeof t=="function"?function s(e,n){var r,i,o=e[n];if(o&&typeof o=="object")for(r in o)Object.hasOwnProperty.call(o,r)&&(i=s(o,r),i!==undefined?o[r]=i:delete o[r]);return t.call(e,n,o)}({"":n},""):n}}),define("ace/mode/json_worker",[],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./json/json_parse"),o=t.JsonWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue(),t=[];try{e&&s(e)}catch(n){var r=this.doc.indexToPosition(n.at-1);t.push({row:r.row,column:r.column,text:n.message,type:"error"})}this.sender.emit("annotate",t)}}.call(o.prototype)})
1
+ !function(e){if(!(void 0!==e.window&&e.document||e.require&&e.define)){e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i&&i.data,file:t,line:n,col:r,stack:i&&i.stack}})},e.normalizeModule=function(t,n){if(-1!==n.indexOf("!")){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if("."==n.charAt(0)){var i=t.split("/").slice(0,-1).join("/");for(n=(i?i+"/":"")+n;-1!==n.indexOf(".")&&s!=n;){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){if(n||(n=t,t=null),!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;if(!e.require.tlns)return console.log("unable to load "+n);var i=function(e,t){var n=e,r="";for(;n;){var i=t[n];if("string"==typeof i)return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(!1===i)return"";var s=n.lastIndexOf("/");if(-1===s)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}(n,e.require.tlns);return".js"!=i.slice(-3)&&(i+=".js"),e.require.id=n,e.require.modules[n]={},importScripts(i),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){if(2==arguments.length?(r=n,"string"!=typeof t&&(n=t,t=e.require.id)):1==arguments.length&&(r=t,n=[],t=e.require.id),"function"==typeof r){n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.slice(0,r.length).map((function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}})));return t&&(e.exports=t),e}}}else e.require.modules[t]={exports:r,initialized:!0}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(e){for(var t in e)this.require.tlns[t]=e[t]},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.event&&n)n._signal(i.event,i.data);else if(i.command)if(t[i.command])t[i.command].apply(t,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),n=e.sender=e.initSender();var s=this.require(i.module)[i.classname];t=e.main=new s(n)}}}}(this),define("ace/lib/oop",[],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),define("ace/lib/event_emitter",[],(function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,(function r(){n.off(e,r),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r})),define("ace/mode/json_worker",[],(function(e,t,n){"use strict";var r=(()=>{var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,o=Math.pow,a=(e,t)=>function(){return t||(0,e[r(e)[0]])((t={exports:{}}).exports,t),t.exports},c=(e,i,o,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let c of r(i))s.call(e,c)||c===o||t(e,c,{get:()=>i[c],enumerable:!(a=n(i,c))||a.enumerable});return e},l=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,"symbol"!=typeof n?n+"":n,r),u=a({"../../node_modules/ace-code/src/lib/deep_copy.js"(e){e.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;n={};for(let r in t)n[r]=e(t[r]);return n}}}),f=a({"../../node_modules/ace-code/src/lib/lang.js"(e){e.last=function(e){return e[e.length-1]},e.stringReverse=function(e){return e.split("").reverse().join("")},e.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var t=/^\s\s*/,n=/\s\s*$/;e.stringTrimLeft=function(e){return e.replace(t,"")},e.stringTrimRight=function(e){return e.replace(n,"")},e.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},e.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},e.deepCopy=u().deepCopy,e.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},e.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},e.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},e.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},e.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},e.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},e.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},e.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},e.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}}),h=a({"../../node_modules/ace-code/src/lib/oop.js"(e){e.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},e.implement=function(t,n){e.mixin(t,n)}}}),d=a({"../../node_modules/ace-code/src/apply_delta.js"(e){e.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var o=[r,1].concat(t.lines);e.splice.apply(e,o),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,c=t.end.row;r===c?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,c-r+1,s.substring(0,i)+e[c].substring(a))}}}}),m=a({"../../node_modules/ace-code/src/lib/event_emitter.js"(e){var t={},n=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};t._emit=t._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],s=this._defaultHandlers[e];if(i.length||s){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=n),t.preventDefault||(t.preventDefault=r),i=i.slice();for(var o=0;o<i.length&&(i[o](t,this),!t.propagationStopped);o++);return s&&!t.defaultPrevented?s(t,this):void 0}},t._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},t.once=function(e,t){var n=this;if(this.on(e,(function r(){n.off(e,r),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},t.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);-1!=s&&i.splice(s,1)}n[e]=t},t.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},t.on=t.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},t.off=t.removeListener=t.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},t.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},e.EventEmitter=t}}),p=a({"../../node_modules/ace-code/src/range.js"(e){var t=class e{constructor(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}isEqual(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column}toString(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"}contains(e,t){return 0==this.compare(e,t)}compareRange(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0}comparePoint(e){return this.compare(e.row,e.column)}containsRange(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)}intersects(e){var t=this.compareRange(e);return-1==t||0==t||1==t}isEnd(e,t){return this.end.row==e&&this.end.column==t}isStart(e,t){return this.start.row==e&&this.start.column==t}setStart(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)}setEnd(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)}inside(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))}insideStart(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)}insideEnd(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)}compare(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0}compareStart(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)}compareEnd(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)}compareInside(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)}clipRows(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)}extend(t,n){var r=this.compare(t,n);if(0==r)return this;if(-1==r)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)}isEmpty(){return this.start.row===this.end.row&&this.start.column===this.end.column}isMultiLine(){return this.start.row!==this.end.row}clone(){return e.fromPoints(this.start,this.end)}collapseRows(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)}toScreenRange(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)}moveBy(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}};t.fromPoints=function(e,n){return new t(e.row,e.column,n.row,n.column)},t.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},e.Range=t}}),g={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(g,{JsonWorker:()=>Nr});var v,y,b,w=(v=f(),b=null!=v?e(i(v)):{},c(!y&&v&&v.__esModule?b:t(b,"default",{value:v,enumerable:!0}),v)),x=h(),A=d().applyDelta,$=m().EventEmitter,k=p().Range,S=class{constructor(e){this.$autoNewLine="",this.$newLineMode="auto",this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}setValue(e){var t=this.getLength()-1;this.remove(new k(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")}getValue(){return this.getAllLines().join(this.getNewLineCharacter())}$detectNewLine(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")}getNewLineCharacter(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}}setNewLineMode(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))}getNewLineMode(){return this.$newLineMode}isNewLine(e){return"\r\n"==e||"\r"==e||"\n"==e}getLine(e){return this.$lines[e]||""}getLines(e,t){return this.$lines.slice(e,t+1)}getAllLines(){return this.getLines(0,this.getLength())}getLength(){return this.$lines.length}getTextRange(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())}getLinesForRange(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t}insert(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))}insertInLine(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)}clippedPos(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return null==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}}clonePos(e){return{row:e.row,column:e.column}}pos(e,t){return{row:e,column:t}}$clipPosition(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e}insertFullLines(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)}insertMergedLines(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)}remove(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)}removeInLine(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)}removeFullLines(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,o=r?t+1:t,a=r?0:this.getLine(o).length,c=new k(i,s,o,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),l}removeNewLine(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})}replace(e,t){return e instanceof k||(e=k.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)}applyDeltas(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])}revertDeltas(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])}applyDelta(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!k.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(A(this.$lines,e,t),this._signal("change",e)))}$safeApplyDelta(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)}$splitAndapplyLargeDelta(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,s=e.start.column,o=0,a=0;o<r;o=a){a+=t-1;var c=n.slice(o,a);c.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+a,s=0),action:e.action,lines:c},!0)}e.lines=n.slice(o),e.start.row=i+o,e.start.column=s,this.applyDelta(e,!0)}revertDelta(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})}indexToPosition(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:s-1,column:e+n[s-1].length+r}}positionToIndex(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}$split(e){return e.split(/\r\n|\r|\n/)}};x.implement(S.prototype,$);var O,I,C,E,P,T,M,_,L,j,R,N,U,V,D,q,F,B,H,z,W,K,J,Z,X,G,Q,Y,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,fe,he,de,me,pe,ge,ve,ye,be,we,xe,Ae,$e,ke,Se,Oe,Ie,Ce,Ee,Pe,Te,Me,_e,Le,je,Re,Ne,Ue,Ve,De,qe,Fe,Be,He,ze,We,Ke,Je,Ze,Xe,Ge,Qe,Ye,et,tt,nt,rt,it,st,ot,at,ct,lt,ut,ft,ht,dt,mt,pt,gt,vt,yt,bt,wt,xt,At,$t,kt,St,Ot,It,Ct,Et,Pt,Tt,Mt,_t,Lt,jt,Rt,Nt,Ut,Vt,Dt,qt,Ft,Bt,Ht,zt,Wt,Kt,Jt,Zt,Xt,Gt=class{constructor(e){this.$timeout=500,this.sender=e;var t=this.doc=new S(""),n=this.deferredUpdate=w.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",(function(e){var i=e.data;if(i[0].start)t.applyDeltas(i);else for(var s=0;s<i.length;s+=2){var o,a;if(("insert"==(o=Array.isArray(i[s+1])?{action:"insert",start:i[s],lines:i[s+1]}:{action:"remove",start:i[s],end:i[s+1]}).action?o.start:o.end).row>=t.$lines.length)throw(a=new Error("Invalid delta")).data={path:r.$path,linesLength:t.$lines.length,start:o.start,end:o.end},a;t.applyDelta(o,!0)}if(r.$timeout)return n.schedule(r.$timeout);r.onUpdate()}))}setTimeout(e){this.$timeout=e}setValue(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)}getValue(e){this.sender.callback(this.doc.getValue(),e)}isPending(){return this.deferredUpdate.isPending()}};(O||(O={})).is=function(e){return"string"==typeof e},(I||(I={})).is=function(e){return"string"==typeof e},(E=C||(C={})).MIN_VALUE=-2147483648,E.MAX_VALUE=2147483647,E.is=function(e){return"number"==typeof e&&E.MIN_VALUE<=e&&e<=E.MAX_VALUE},(T=P||(P={})).MIN_VALUE=0,T.MAX_VALUE=2147483647,T.is=function(e){return"number"==typeof e&&T.MIN_VALUE<=e&&e<=T.MAX_VALUE},(_=M||(M={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=P.MAX_VALUE),t===Number.MAX_VALUE&&(t=P.MAX_VALUE),{line:e,character:t}},_.is=function(e){let t=e;return Qt.objectLiteral(t)&&Qt.uinteger(t.line)&&Qt.uinteger(t.character)},(j=L||(L={})).create=function(e,t,n,r){if(Qt.uinteger(e)&&Qt.uinteger(t)&&Qt.uinteger(n)&&Qt.uinteger(r))return{start:M.create(e,t),end:M.create(n,r)};if(M.is(e)&&M.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},j.is=function(e){let t=e;return Qt.objectLiteral(t)&&M.is(t.start)&&M.is(t.end)},(N=R||(R={})).create=function(e,t){return{uri:e,range:t}},N.is=function(e){let t=e;return Qt.objectLiteral(t)&&L.is(t.range)&&(Qt.string(t.uri)||Qt.undefined(t.uri))},(V=U||(U={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},V.is=function(e){let t=e;return Qt.objectLiteral(t)&&L.is(t.targetRange)&&Qt.string(t.targetUri)&&L.is(t.targetSelectionRange)&&(L.is(t.originSelectionRange)||Qt.undefined(t.originSelectionRange))},(q=D||(D={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},q.is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.numberRange(t.red,0,1)&&Qt.numberRange(t.green,0,1)&&Qt.numberRange(t.blue,0,1)&&Qt.numberRange(t.alpha,0,1)},(B=F||(F={})).create=function(e,t){return{range:e,color:t}},B.is=function(e){const t=e;return Qt.objectLiteral(t)&&L.is(t.range)&&D.is(t.color)},(z=H||(H={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},z.is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.string(t.label)&&(Qt.undefined(t.textEdit)||ae.is(t))&&(Qt.undefined(t.additionalTextEdits)||Qt.typedArray(t.additionalTextEdits,ae.is))},(K=W||(W={})).Comment="comment",K.Imports="imports",K.Region="region",(Z=J||(J={})).create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return Qt.defined(n)&&(o.startCharacter=n),Qt.defined(r)&&(o.endCharacter=r),Qt.defined(i)&&(o.kind=i),Qt.defined(s)&&(o.collapsedText=s),o},Z.is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.uinteger(t.startLine)&&Qt.uinteger(t.startLine)&&(Qt.undefined(t.startCharacter)||Qt.uinteger(t.startCharacter))&&(Qt.undefined(t.endCharacter)||Qt.uinteger(t.endCharacter))&&(Qt.undefined(t.kind)||Qt.string(t.kind))},(G=X||(X={})).create=function(e,t){return{location:e,message:t}},G.is=function(e){let t=e;return Qt.defined(t)&&R.is(t.location)&&Qt.string(t.message)},(Y=Q||(Q={})).Error=1,Y.Warning=2,Y.Information=3,Y.Hint=4,(te=ee||(ee={})).Unnecessary=1,te.Deprecated=2,(ne||(ne={})).is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.string(t.href)},(ie=re||(re={})).create=function(e,t,n,r,i,s){let o={range:e,message:t};return Qt.defined(n)&&(o.severity=n),Qt.defined(r)&&(o.code=r),Qt.defined(i)&&(o.source=i),Qt.defined(s)&&(o.relatedInformation=s),o},ie.is=function(e){var t;let n=e;return Qt.defined(n)&&L.is(n.range)&&Qt.string(n.message)&&(Qt.number(n.severity)||Qt.undefined(n.severity))&&(Qt.integer(n.code)||Qt.string(n.code)||Qt.undefined(n.code))&&(Qt.undefined(n.codeDescription)||Qt.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Qt.string(n.source)||Qt.undefined(n.source))&&(Qt.undefined(n.relatedInformation)||Qt.typedArray(n.relatedInformation,X.is))},(oe=se||(se={})).create=function(e,t,...n){let r={title:e,command:t};return Qt.defined(n)&&n.length>0&&(r.arguments=n),r},oe.is=function(e){let t=e;return Qt.defined(t)&&Qt.string(t.title)&&Qt.string(t.command)},(ce=ae||(ae={})).replace=function(e,t){return{range:e,newText:t}},ce.insert=function(e,t){return{range:{start:e,end:e},newText:t}},ce.del=function(e){return{range:e,newText:""}},ce.is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.string(t.newText)&&L.is(t.range)},(ue=le||(le={})).create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},ue.is=function(e){const t=e;return Qt.objectLiteral(t)&&Qt.string(t.label)&&(Qt.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Qt.string(t.description)||void 0===t.description)},(fe||(fe={})).is=function(e){const t=e;return Qt.string(t)},(de=he||(he={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},de.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},de.del=function(e,t){return{range:e,newText:"",annotationId:t}},de.is=function(e){const t=e;return ae.is(t)&&(le.is(t.annotationId)||fe.is(t.annotationId))},(pe=me||(me={})).create=function(e,t){return{textDocument:e,edits:t}},pe.is=function(e){let t=e;return Qt.defined(t)&&Ie.is(t.textDocument)&&Array.isArray(t.edits)},(ve=ge||(ge={})).create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},ve.is=function(e){let t=e;return t&&"create"===t.kind&&Qt.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Qt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Qt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||fe.is(t.annotationId))},(be=ye||(ye={})).create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},be.is=function(e){let t=e;return t&&"rename"===t.kind&&Qt.string(t.oldUri)&&Qt.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Qt.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Qt.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||fe.is(t.annotationId))},(xe=we||(we={})).create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},xe.is=function(e){let t=e;return t&&"delete"===t.kind&&Qt.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Qt.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Qt.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||fe.is(t.annotationId))},(Ae||(Ae={})).is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Qt.string(e.kind)?ge.is(e)||ye.is(e)||we.is(e):me.is(e))))},(ke=$e||($e={})).create=function(e){return{uri:e}},ke.is=function(e){let t=e;return Qt.defined(t)&&Qt.string(t.uri)},(Oe=Se||(Se={})).create=function(e,t){return{uri:e,version:t}},Oe.is=function(e){let t=e;return Qt.defined(t)&&Qt.string(t.uri)&&Qt.integer(t.version)},(Ce=Ie||(Ie={})).create=function(e,t){return{uri:e,version:t}},Ce.is=function(e){let t=e;return Qt.defined(t)&&Qt.string(t.uri)&&(null===t.version||Qt.integer(t.version))},(Pe=Ee||(Ee={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},Pe.is=function(e){let t=e;return Qt.defined(t)&&Qt.string(t.uri)&&Qt.string(t.languageId)&&Qt.integer(t.version)&&Qt.string(t.text)},(Me=Te||(Te={})).PlainText="plaintext",Me.Markdown="markdown",Me.is=function(e){const t=e;return t===Me.PlainText||t===Me.Markdown},(_e||(_e={})).is=function(e){const t=e;return Qt.objectLiteral(e)&&Te.is(t.kind)&&Qt.string(t.value)},(je=Le||(Le={})).Text=1,je.Method=2,je.Function=3,je.Constructor=4,je.Field=5,je.Variable=6,je.Class=7,je.Interface=8,je.Module=9,je.Property=10,je.Unit=11,je.Value=12,je.Enum=13,je.Keyword=14,je.Snippet=15,je.Color=16,je.File=17,je.Reference=18,je.Folder=19,je.EnumMember=20,je.Constant=21,je.Struct=22,je.Event=23,je.Operator=24,je.TypeParameter=25,(Ne=Re||(Re={})).PlainText=1,Ne.Snippet=2,(Ue||(Ue={})).Deprecated=1,(De=Ve||(Ve={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},De.is=function(e){const t=e;return t&&Qt.string(t.newText)&&L.is(t.insert)&&L.is(t.replace)},(Fe=qe||(qe={})).asIs=1,Fe.adjustIndentation=2,(Be||(Be={})).is=function(e){const t=e;return t&&(Qt.string(t.detail)||void 0===t.detail)&&(Qt.string(t.description)||void 0===t.description)},(He||(He={})).create=function(e){return{label:e}},(ze||(ze={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Ke=We||(We={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Ke.is=function(e){const t=e;return Qt.string(t)||Qt.objectLiteral(t)&&Qt.string(t.language)&&Qt.string(t.value)},(Je||(Je={})).is=function(e){let t=e;return!!t&&Qt.objectLiteral(t)&&(_e.is(t.contents)||We.is(t.contents)||Qt.typedArray(t.contents,We.is))&&(void 0===e.range||L.is(e.range))},(Ze||(Ze={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Xe||(Xe={})).create=function(e,t,...n){let r={label:e};return Qt.defined(t)&&(r.documentation=t),Qt.defined(n)?r.parameters=n:r.parameters=[],r},(Qe=Ge||(Ge={})).Text=1,Qe.Read=2,Qe.Write=3,(Ye||(Ye={})).create=function(e,t){let n={range:e};return Qt.number(t)&&(n.kind=t),n},(tt=et||(et={})).File=1,tt.Module=2,tt.Namespace=3,tt.Package=4,tt.Class=5,tt.Method=6,tt.Property=7,tt.Field=8,tt.Constructor=9,tt.Enum=10,tt.Interface=11,tt.Function=12,tt.Variable=13,tt.Constant=14,tt.String=15,tt.Number=16,tt.Boolean=17,tt.Array=18,tt.Object=19,tt.Key=20,tt.Null=21,tt.EnumMember=22,tt.Struct=23,tt.Event=24,tt.Operator=25,tt.TypeParameter=26,(nt||(nt={})).Deprecated=1,(rt||(rt={})).create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s},(it||(it={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(ot=st||(st={})).create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},ot.is=function(e){let t=e;return t&&Qt.string(t.name)&&Qt.number(t.kind)&&L.is(t.range)&&L.is(t.selectionRange)&&(void 0===t.detail||Qt.string(t.detail))&&(void 0===t.deprecated||Qt.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(ct=at||(at={})).Empty="",ct.QuickFix="quickfix",ct.Refactor="refactor",ct.RefactorExtract="refactor.extract",ct.RefactorInline="refactor.inline",ct.RefactorRewrite="refactor.rewrite",ct.Source="source",ct.SourceOrganizeImports="source.organizeImports",ct.SourceFixAll="source.fixAll",(ut=lt||(lt={})).Invoked=1,ut.Automatic=2,(ht=ft||(ft={})).create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},ht.is=function(e){let t=e;return Qt.defined(t)&&Qt.typedArray(t.diagnostics,re.is)&&(void 0===t.only||Qt.typedArray(t.only,Qt.string))&&(void 0===t.triggerKind||t.triggerKind===lt.Invoked||t.triggerKind===lt.Automatic)},(mt=dt||(dt={})).create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):se.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},mt.is=function(e){let t=e;return t&&Qt.string(t.title)&&(void 0===t.diagnostics||Qt.typedArray(t.diagnostics,re.is))&&(void 0===t.kind||Qt.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||se.is(t.command))&&(void 0===t.isPreferred||Qt.boolean(t.isPreferred))&&(void 0===t.edit||Ae.is(t.edit))},(gt=pt||(pt={})).create=function(e,t){let n={range:e};return Qt.defined(t)&&(n.data=t),n},gt.is=function(e){let t=e;return Qt.defined(t)&&L.is(t.range)&&(Qt.undefined(t.command)||se.is(t.command))},(yt=vt||(vt={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},yt.is=function(e){let t=e;return Qt.defined(t)&&Qt.uinteger(t.tabSize)&&Qt.boolean(t.insertSpaces)},(wt=bt||(bt={})).create=function(e,t,n){return{range:e,target:t,data:n}},wt.is=function(e){let t=e;return Qt.defined(t)&&L.is(t.range)&&(Qt.undefined(t.target)||Qt.string(t.target))},(At=xt||(xt={})).create=function(e,t){return{range:e,parent:t}},At.is=function(e){let t=e;return Qt.objectLiteral(t)&&L.is(t.range)&&(void 0===t.parent||At.is(t.parent))},(kt=$t||($t={})).namespace="namespace",kt.type="type",kt.class="class",kt.enum="enum",kt.interface="interface",kt.struct="struct",kt.typeParameter="typeParameter",kt.parameter="parameter",kt.variable="variable",kt.property="property",kt.enumMember="enumMember",kt.event="event",kt.function="function",kt.method="method",kt.macro="macro",kt.keyword="keyword",kt.modifier="modifier",kt.comment="comment",kt.string="string",kt.number="number",kt.regexp="regexp",kt.operator="operator",kt.decorator="decorator",(Ot=St||(St={})).declaration="declaration",Ot.definition="definition",Ot.readonly="readonly",Ot.static="static",Ot.deprecated="deprecated",Ot.abstract="abstract",Ot.async="async",Ot.modification="modification",Ot.documentation="documentation",Ot.defaultLibrary="defaultLibrary",(It||(It={})).is=function(e){const t=e;return Qt.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Et=Ct||(Ct={})).create=function(e,t){return{range:e,text:t}},Et.is=function(e){const t=e;return null!=t&&L.is(t.range)&&Qt.string(t.text)},(Tt=Pt||(Pt={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Tt.is=function(e){const t=e;return null!=t&&L.is(t.range)&&Qt.boolean(t.caseSensitiveLookup)&&(Qt.string(t.variableName)||void 0===t.variableName)},(_t=Mt||(Mt={})).create=function(e,t){return{range:e,expression:t}},_t.is=function(e){const t=e;return null!=t&&L.is(t.range)&&(Qt.string(t.expression)||void 0===t.expression)},(jt=Lt||(Lt={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},jt.is=function(e){const t=e;return Qt.defined(t)&&L.is(e.stoppedLocation)},(Nt=Rt||(Rt={})).Type=1,Nt.Parameter=2,Nt.is=function(e){return 1===e||2===e},(Vt=Ut||(Ut={})).create=function(e){return{value:e}},Vt.is=function(e){const t=e;return Qt.objectLiteral(t)&&(void 0===t.tooltip||Qt.string(t.tooltip)||_e.is(t.tooltip))&&(void 0===t.location||R.is(t.location))&&(void 0===t.command||se.is(t.command))},(qt=Dt||(Dt={})).create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},qt.is=function(e){const t=e;return Qt.objectLiteral(t)&&M.is(t.position)&&(Qt.string(t.label)||Qt.typedArray(t.label,Ut.is))&&(void 0===t.kind||Rt.is(t.kind))&&void 0===t.textEdits||Qt.typedArray(t.textEdits,ae.is)&&(void 0===t.tooltip||Qt.string(t.tooltip)||_e.is(t.tooltip))&&(void 0===t.paddingLeft||Qt.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Qt.boolean(t.paddingRight))},(Ft||(Ft={})).createSnippet=function(e){return{kind:"snippet",value:e}},(Bt||(Bt={})).create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}},(Ht||(Ht={})).create=function(e){return{items:e}},(Wt=zt||(zt={})).Invoked=0,Wt.Automatic=1,(Kt||(Kt={})).create=function(e,t){return{range:e,text:t}},(Jt||(Jt={})).create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}},(Zt||(Zt={})).is=function(e){const t=e;return Qt.objectLiteral(t)&&I.is(t.uri)&&Qt.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o<i.length&&a<s.length;){let t=n(i[o],s[a]);e[c++]=t<=0?i[o++]:s[a++]}for(;o<i.length;)e[c++]=i[o++];for(;a<s.length;)e[c++]=s[a++];return e}e.create=function(e,t,n,r){return new Yt(e,t,n,r)},e.is=function(e){let t=e;return!!(Qt.defined(t)&&Qt.string(t.uri)&&(Qt.undefined(t.languageId)||Qt.string(t.languageId))&&Qt.uinteger(t.lineCount)&&Qt.func(t.getText)&&Qt.func(t.positionAt)&&Qt.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),i=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Xt||(Xt={}));var Qt,Yt=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(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&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(0===r)return M.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return M.create(i,e-t[i])}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}};!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Qt||(Qt={}));var en,tn,nn,rn,sn,on,an,cn,ln=class e{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){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(const n of t)if(e.isIncremental(n)){const e=dn(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=fn(n.text,!1,t);if(s-i===a.length)for(let e=0,t=a.length;e<t;e++)o[e+i+1]=a[e];else a.length<1e4?o.splice(i+1,s-i,...a):this._lineOffsets=o=o.slice(0,i+1).concat(a,o.slice(s+1));const c=n.text.length-(r-t);if(0!==c)for(let e=i+1+a.length,t=o.length;e<t;e++)o[e]=o[e]+c}else{if(!e.isFull(n))throw new Error("Unknown change event received");this._content=n.text,this._lineOffsets=void 0}this._version=n}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=fn(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&hn(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}};function un(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);un(r,t),un(i,t);let s=0,o=0,a=0;for(;s<r.length&&o<i.length;){const n=t(r[s],i[o]);e[a++]=n<=0?r[s++]:i[o++]}for(;s<r.length;)e[a++]=r[s++];for(;o<i.length;)e[a++]=i[o++];return e}function fn(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);hn(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function hn(e){return 13===e||10===e}function dn(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function mn(e){const t=dn(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function pn(...e){var t;const n=e[0];let r,i,s;if("string"==typeof n)r=n,i=n,e.splice(0,1),s=e&&"object"==typeof e[0]?e[0]:e;else{if(n instanceof Array){const t=e.slice(1);if(n.length!==t.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=n[0];for(let e=1;e<n.length;e++)r+=`{${e-1}}`+n[e];return pn(r,...t)}i=n.message,r=i,n.comment&&n.comment.length>0&&(r+=`/${Array.isArray(n.comment)?n.comment.join(""):n.comment}`),s=null!=(t=n.args)?t:{}}const o=null==cn?void 0:cn[r];return o?"string"==typeof o?vn(o,s):o.comment?vn(o.message,s):vn(i,s):vn(i,s)}(tn=en||(en={})).create=function(e,t,n,r){return new ln(e,t,n,r)},tn.update=function(e,t,n){if(e instanceof ln)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},tn.applyEdits=function(e,t){const n=e.getText(),r=un(t.map(mn),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<i)throw new Error("Overlapping edit");r>i&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")},(rn=nn||(nn={}))[rn.Undefined=0]="Undefined",rn[rn.EnumValueMismatch=1]="EnumValueMismatch",rn[rn.Deprecated=2]="Deprecated",rn[rn.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",rn[rn.UnexpectedEndOfString=258]="UnexpectedEndOfString",rn[rn.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",rn[rn.InvalidUnicode=260]="InvalidUnicode",rn[rn.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",rn[rn.InvalidCharacter=262]="InvalidCharacter",rn[rn.PropertyExpected=513]="PropertyExpected",rn[rn.CommaExpected=514]="CommaExpected",rn[rn.ColonExpected=515]="ColonExpected",rn[rn.ValueExpected=516]="ValueExpected",rn[rn.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",rn[rn.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",rn[rn.TrailingComma=519]="TrailingComma",rn[rn.DuplicateKey=520]="DuplicateKey",rn[rn.CommentNotPermitted=521]="CommentNotPermitted",rn[rn.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",rn[rn.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",rn[rn.SchemaResolveError=65536]="SchemaResolveError",(on=sn||(sn={}))[on.v3=3]="v3",on[on.v4=4]="v4",on[on.v6=6]="v6",on[on.v7=7]="v7",on[on.v2019_09=19]="v2019_09",on[on.v2020_12=20]="v2020_12",(an||(an={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Te.Markdown,Te.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}};var gn=/{([^}]+)}/g;function vn(e,t){return 0===Object.keys(t).length?e:e.replace(gn,((e,n)=>{var r;return null!=(r=t[n])?r:e}))}function yn(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!yn(e[n],t[n]))return!1}else{const i=[];for(r in e)i.push(r);i.sort();const s=[];for(r in t)s.push(r);if(s.sort(),!yn(i,s))return!1;for(n=0;n<i.length;n++)if(!yn(e[i[n]],t[i[n]]))return!1}return!0}function bn(e){return"number"==typeof e}function wn(e){return"boolean"==typeof e}function xn(e){return"string"==typeof e}function An(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var $n,kn,Sn=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:Q.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},o=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,i.push(e))},a=r=>{let s=(null==n?void 0:n.trailingCommas)?En(n.trailingCommas):Q.Error,a=(null==n?void 0:n.comments)?En(n.comments):this.commentSeverity,c=(null==n?void 0:n.schemaValidation)?En(n.schemaValidation):Q.Warning,l=(null==n?void 0:n.schemaRequest)?En(n.schemaRequest):Q.Warning;if(r){const i=(n,r,i)=>{if(t.root&&l){const s=t.root,a="object"===s.type?s.properties[0]:void 0;if(a&&"$schema"===a.keyNode.value){const t=a.valueNode||a,s=L.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));o(re.create(s,n,l,r,"json",i))}else{const t=L.create(e.positionAt(s.offset),e.positionAt(s.offset+1));o(re.create(t,n,l,r,"json",i))}}};if(r.errors.length){const e=r.errors[0];i(e.message,e.code,e.relatedInformation)}else if(c){for(const e of r.warnings)i(e.message,e.code,e.relatedInformation);const s=t.validate(e,r.schema,c,null==n?void 0:n.schemaDraft);s&&s.forEach(o)}In(r.schema)&&(a=void 0),Cn(r.schema)&&(s=void 0)}for(const e of t.syntaxErrors){if(e.code===nn.TrailingComma){if("number"!=typeof s)continue;e.severity=s}o(e)}if("number"==typeof a){const e=pn("Comments are not permitted in JSON.");t.comments.forEach((t=>{o(re.create(t,e,a,nn.CommentNotPermitted))}))}return i};if(r){const e=r.id||"schemaservice://untitled/"+On++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},On=0;function In(e){if(e&&"object"==typeof e){if(wn(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=In(t);if(wn(e))return e}}}function Cn(e){if(e&&"object"==typeof e){if(wn(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(wn(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Cn(t);if(wn(e))return e}}}function En(e){switch(e){case"error":return Q.Error;case"warning":return Q.Warning;case"ignore":return}}function Pn(e,t=!1){const n=e.length;let r=0,i="",s=0,o=16,a=0,c=0,l=0,u=0,f=0;function h(t,n){let i=0,s=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}r++,i++}return i<t&&(s=-1),s}function d(){if(i="",f=0,s=r,c=a,u=l,r>=n)return s=n,o=17;let t=e.charCodeAt(r);if(Tn(t)){do{r++,i+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Tn(t));return o=15}if(Mn(t))return r++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,i+="\n"),a++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=function(){let t="",i=r;for(;;){if(r>=n){t+=e.substring(i,r),f=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(i,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(Mn(s)){t+=e.substring(i,r),f=2;break}f=6}r++}else{if(t+=e.substring(i,r),r++,r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4,!0);e>=0?t+=String.fromCharCode(e):f=4;break;default:f=5}i=r}}return t}(),o=10;case 47:const c=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!Mn(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let s=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,Mn(t)&&(13===t&&10===e.charCodeAt(r)&&r++,a++,l=r)}return s||(r++,f=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!_n(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&_n(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&_n(e.charCodeAt(r))))return f=3,e.substring(t,r);for(r++;r<e.length&&_n(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&_n(e.charCodeAt(r))){for(r++;r<e.length&&_n(e.charCodeAt(r));)r++;n=r}else f=3;return e.substring(t,n)}(),o=11;default:for(;r<n&&m(t);)r++,t=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function m(e){if(Tn(e)||Mn(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,i="",s=0,o=16,f=0},getPosition:()=>r,scan:t?function(){let e;do{e=d()}while(e>=12&&e<=15);return e}:d,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-u,getTokenError:()=>f}}function Tn(e){return 32===e||9===e}function Mn(e){return 10===e||13===e}function _n(e){return e>=48&&e<=57}(kn=$n||($n={}))[kn.lineFeed=10]="lineFeed",kn[kn.carriageReturn=13]="carriageReturn",kn[kn.space=32]="space",kn[kn._0=48]="_0",kn[kn._1=49]="_1",kn[kn._2=50]="_2",kn[kn._3=51]="_3",kn[kn._4=52]="_4",kn[kn._5=53]="_5",kn[kn._6=54]="_6",kn[kn._7=55]="_7",kn[kn._8=56]="_8",kn[kn._9=57]="_9",kn[kn.a=97]="a",kn[kn.b=98]="b",kn[kn.c=99]="c",kn[kn.d=100]="d",kn[kn.e=101]="e",kn[kn.f=102]="f",kn[kn.g=103]="g",kn[kn.h=104]="h",kn[kn.i=105]="i",kn[kn.j=106]="j",kn[kn.k=107]="k",kn[kn.l=108]="l",kn[kn.m=109]="m",kn[kn.n=110]="n",kn[kn.o=111]="o",kn[kn.p=112]="p",kn[kn.q=113]="q",kn[kn.r=114]="r",kn[kn.s=115]="s",kn[kn.t=116]="t",kn[kn.u=117]="u",kn[kn.v=118]="v",kn[kn.w=119]="w",kn[kn.x=120]="x",kn[kn.y=121]="y",kn[kn.z=122]="z",kn[kn.A=65]="A",kn[kn.B=66]="B",kn[kn.C=67]="C",kn[kn.D=68]="D",kn[kn.E=69]="E",kn[kn.F=70]="F",kn[kn.G=71]="G",kn[kn.H=72]="H",kn[kn.I=73]="I",kn[kn.J=74]="J",kn[kn.K=75]="K",kn[kn.L=76]="L",kn[kn.M=77]="M",kn[kn.N=78]="N",kn[kn.O=79]="O",kn[kn.P=80]="P",kn[kn.Q=81]="Q",kn[kn.R=82]="R",kn[kn.S=83]="S",kn[kn.T=84]="T",kn[kn.U=85]="U",kn[kn.V=86]="V",kn[kn.W=87]="W",kn[kn.X=88]="X",kn[kn.Y=89]="Y",kn[kn.Z=90]="Z",kn[kn.asterisk=42]="asterisk",kn[kn.backslash=92]="backslash",kn[kn.closeBrace=125]="closeBrace",kn[kn.closeBracket=93]="closeBracket",kn[kn.colon=58]="colon",kn[kn.comma=44]="comma",kn[kn.dot=46]="dot",kn[kn.doubleQuote=34]="doubleQuote",kn[kn.minus=45]="minus",kn[kn.openBrace=123]="openBrace",kn[kn.openBracket=91]="openBracket",kn[kn.plus=43]="plus",kn[kn.slash=47]="slash",kn[kn.formFeed=12]="formFeed",kn[kn.tab=9]="tab";new Array(20).fill(0).map(((e,t)=>" ".repeat(t)));var Ln,jn=200;new Array(jn).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),new Array(jn).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),new Array(jn).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t))),new Array(jn).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),new Array(jn).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),new Array(jn).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)));(Ln||(Ln={})).DEFAULT={allowTrailingComma:!1};var Rn,Nn,Un,Vn,Dn=Pn;(Nn=Rn||(Rn={}))[Nn.None=0]="None",Nn[Nn.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Nn[Nn.UnexpectedEndOfString=2]="UnexpectedEndOfString",Nn[Nn.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Nn[Nn.InvalidUnicode=4]="InvalidUnicode",Nn[Nn.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Nn[Nn.InvalidCharacter=6]="InvalidCharacter",(Vn=Un||(Un={}))[Vn.OpenBraceToken=1]="OpenBraceToken",Vn[Vn.CloseBraceToken=2]="CloseBraceToken",Vn[Vn.OpenBracketToken=3]="OpenBracketToken",Vn[Vn.CloseBracketToken=4]="CloseBracketToken",Vn[Vn.CommaToken=5]="CommaToken",Vn[Vn.ColonToken=6]="ColonToken",Vn[Vn.NullKeyword=7]="NullKeyword",Vn[Vn.TrueKeyword=8]="TrueKeyword",Vn[Vn.FalseKeyword=9]="FalseKeyword",Vn[Vn.StringLiteral=10]="StringLiteral",Vn[Vn.NumericLiteral=11]="NumericLiteral",Vn[Vn.LineCommentTrivia=12]="LineCommentTrivia",Vn[Vn.BlockCommentTrivia=13]="BlockCommentTrivia",Vn[Vn.LineBreakTrivia=14]="LineBreakTrivia",Vn[Vn.Trivia=15]="Trivia",Vn[Vn.Unknown=16]="Unknown",Vn[Vn.EOF=17]="EOF";var qn,Fn,Bn,Hn=function(e,t=[],n=Ln.DEFAULT){let r=null,i=[];const s=[];function o(e){Array.isArray(i)?i.push(e):null!==r&&(i[r]=e)}return function(e,t,n=Ln.DEFAULT){const r=Pn(e,!1),i=[];let s=0;function o(e){return e?()=>0===s&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?t=>0===s&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>0===s&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function l(e){return e?()=>{if(s>0)s++;else{!1===e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice()))&&(s=1)}}:()=>!0}function u(e){return e?()=>{s>0&&s--,0===s&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const f=l(t.onObjectBegin),h=c(t.onObjectProperty),d=u(t.onObjectEnd),m=l(t.onArrayBegin),p=u(t.onArrayEnd),g=c(t.onLiteralValue),v=a(t.onSeparator),y=o(t.onComment),b=a(t.onError),w=n&&n.disallowComments,x=n&&n.allowTrailingComma;function A(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:$(14);break;case 5:$(15);break;case 3:$(13);break;case 1:w||$(11);break;case 2:$(12);break;case 6:$(16)}switch(e){case 12:case 13:w?$(10):y();break;case 16:$(1);break;case 15:case 14:break;default:return e}}}function $(e,t=[],n=[]){if(b(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){A();break}if(-1!==n.indexOf(e))break;e=A()}}}function k(e){const t=r.getTokenValue();return e?g(t):(h(t),i.push(t)),A(),!0}function S(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&($(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return A(),!0}function O(){return 10!==r.getToken()?($(3,[],[2,5]),!1):(k(!1),6===r.getToken()?(v(":"),A(),E()||$(4,[],[2,5])):$(5,[],[2,5]),i.pop(),!0)}function I(){f(),A();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||$(4,[],[]),v(","),A(),2===r.getToken()&&x)break}else e&&$(6,[],[]);O()||$(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?$(7,[2],[]):A(),!0}function C(){m(),A();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||$(4,[],[]),v(","),A(),4===r.getToken()&&x)break}else t&&$(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,E()||$(4,[],[4,5]),t=!0}return p(),e||i.pop(),4!==r.getToken()?$(8,[4],[]):A(),!0}function E(){switch(r.getToken()){case 3:return C();case 1:return I();case 10:return k(!0);default:return S()}}if(A(),17===r.getToken())return!!n.allowEmptyContent||($(4,[],[]),!1);if(!E())return $(4,[],[]),!1;17!==r.getToken()&&$(9,[],[])}(e,{onObjectBegin:()=>{const e={};o(e),s.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];o(e),s.push(i),i=e,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},zn=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const i=t.children;if(Array.isArray(i))for(let t=0;t<i.length&&i[t].offset<=n;t++){const s=e(i[t],n,r);if(s)return s}return t}},Wn=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function Kn(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function Jn(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}(Fn=qn||(qn={}))[Fn.InvalidSymbol=1]="InvalidSymbol",Fn[Fn.InvalidNumberFormat=2]="InvalidNumberFormat",Fn[Fn.PropertyNameExpected=3]="PropertyNameExpected",Fn[Fn.ValueExpected=4]="ValueExpected",Fn[Fn.ColonExpected=5]="ColonExpected",Fn[Fn.CommaExpected=6]="CommaExpected",Fn[Fn.CloseBraceExpected=7]="CloseBraceExpected",Fn[Fn.CloseBracketExpected=8]="CloseBracketExpected",Fn[Fn.EndOfFileExpected=9]="EndOfFileExpected",Fn[Fn.InvalidCommentToken=10]="InvalidCommentToken",Fn[Fn.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Fn[Fn.UnexpectedEndOfString=12]="UnexpectedEndOfString",Fn[Fn.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Fn[Fn.InvalidUnicode=14]="InvalidUnicode",Fn[Fn.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Fn[Fn.InvalidCharacter=16]="InvalidCharacter",(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,l=o<c?o:c,u=-1,f=0;f<=l;++f){if(f===l){if(c>l){if(47===n.charCodeAt(a+f))return n.slice(a+f+1);if(0===f)return n.slice(a+f)}else o>l&&(47===e.charCodeAt(i+f)?u=f:0===f&&(u=0));break}var h=e.charCodeAt(i+f);if(h!==n.charCodeAt(a+f))break;47===h&&(u=f)}var d="";for(f=i+u+1;f<=s;++f)f!==s&&47!==e.charCodeAt(f)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n=(t=e).dir||t.root,r=t.base||(t.name||"")+(t.ext||""),n?n===t.root?n+r:n+"/"+r:r;var t,n,r},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==f&&(f=1):-1!==o&&(f=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===f||1===f&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;if(n.r(r),n.d(r,{URI:()=>d,Utils:()=>I}),"object"==typeof process)i="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;i=e.indexOf("Windows")>=0}const s=/^\w[\w\d+.-]*$/,o=/^\//,a=/^\/\//;function c(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",f="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(e,t,n,r,i,s=!1){l(this,"scheme"),l(this,"authority"),l(this,"path"),l(this,"query"),l(this,"fragment"),"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==f&&(t=f+t):t=f}return t}(this.scheme,n||u),this.query=r||u,this.fragment=i||u,c(this,s))}static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return b(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===i?i=this.query:null===i&&(i=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new p(t,n,r,i,s)}static parse(e,t=!1){const n=h.exec(e);return n?new p(n[2]||u,$(n[4]||u),$(n[5]||u),$(n[7]||u),$(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(i&&(e=e.replace(/\\/g,f)),e[0]===f&&e[1]===f){const n=e.indexOf(f,2);-1===n?(t=e.substring(2),e=f):(t=e.substring(2,n),e=e.substring(n)||f)}return new p("file",t,e,u,u)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===m?e.fsPath:null,t}}return e}}const m=i?1:void 0;class p extends d{constructor(){super(...arguments),l(this,"_formatted",null),l(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=g[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function y(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function b(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,"\\")),n}function w(e,t){const n=t?y:v;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=f,r+=f),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:v(c,!1,!1)),r}function x(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+x(e.substr(3)):e}}const A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function $(e){return e.match(A)?e.replace(A,(e=>x(e))):e}var k=n(975);const S=k.posix||k,O="/";var I,C;(C=I||(I={})).joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},C.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==O&&(n=O+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===O&&!e.authority&&(i=i.substring(1)),e.with({path:i})},C.dirname=function(e){if(0===e.path.length||e.path===O)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},C.basename=function(e){return S.basename(e.path)},C.extname=function(e){return S.extname(e.path)},Bn=r})();var Zn,Xn,{URI:Gn,Utils:Qn}=Bn,Yn={"color-hex":{errorMessage:pn("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:pn("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:pn("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:pn("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:pn("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:pn("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:pn("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:pn("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},er=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},tr=class extends er{constructor(e,t){super(e,t),this.type="null",this.value=null}},nr=class extends er{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},rr=class extends er{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},ir=class extends er{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},sr=class extends er{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},or=class extends er{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},ar=class extends er{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function cr(e){return wn(e)?e?{}:{not:{}}:e}(Xn=Zn||(Zn={}))[Xn.Key=0]="Key",Xn[Xn.Enum=1]="Enum";var lr="http://json-schema.org/",ur="https://json-schema.org/";function fr(e){e.startsWith(lr)&&(e=ur+e.substring(lr.length));try{return Gn.parse(e).toString(!0)}catch(t){return e}}function hr(e){var t;return null!=(t=dr[fr(e)])?t:void 0}var dr={"https://json-schema.org/draft-03/schema":sn.v3,"https://json-schema.org/draft-04/schema":sn.v4,"https://json-schema.org/draft-06/schema":sn.v6,"https://json-schema.org/draft-07/schema":sn.v7,"https://json-schema.org/draft/2019-09/schema":sn.v2019_09,"https://json-schema.org/draft/2020-12/schema":sn.v2020_12},mr=class{constructor(e){this.schemaDraft=e}},pr=class e{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},gr=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};gr.instance=new gr;var vr=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(const e of this.problems)e.code===nn.EnumValueMismatch&&(e.message=pn("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function yr(e){return Wn(e)}var br=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return zn(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const i=n.children;if(Array.isArray(i))for(let e=0;e<i.length&&r;e++)r=t(i[e]);return r};t(this.root)}}validate(e,t,n=Q.Warning,r){if(this.root&&t){const i=new vr;return xr(this.root,t,i,gr.instance,new mr(null!=r?r:wr(t))),i.problems.map((t=>{var r;const i=L.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return re.create(i,t.message,null!=(r=t.severity)?r:n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new pr(t,n),i=wr(e),s=new mr(i);return xr(this.root,e,new vr,r,s),r.schemas}return[]}};function wr(e,t=sn.v2020_12){var n;let r=e.$schema;return r&&null!=(n=hr(r))?n:t}function xr(e,t,n,r,i){if(!e||!r.include(e))return;if("property"===e.type)return xr(e.valueNode,t,n,r,i);const s=e;switch(function(){var e;function o(e){return s.type===e||"integer"===e&&"number"===s.type&&s.isInteger}Array.isArray(t.type)?t.type.some(o)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||pn("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(o(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||pn('Incorrect type. Expected "{0}".',t.type)}));if(Array.isArray(t.allOf))for(const e of t.allOf){const t=new vr,o=r.newSub();xr(s,cr(e),t,o,i),n.merge(t),r.merge(o)}const a=cr(t.not);if(a){const e=new vr,o=r.newSub();xr(s,a,e,o,i),e.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||pn("Matches a schema that is not allowed.")});for(const e of o.schemas)e.inverted=!e.inverted,r.add(e)}const c=(e,t)=>{var o;const a=[],c=null!=(o=function(e){var t,n;if(e.length<2)return;const r=t=>{const n=new Map;for(let r=0;r<e.length;r++){const i=t(cr(e[r]),r);if(!i)return;i.forEach((([e,t])=>{if(void 0!==t.const){n.has(e)||n.set(e,new Map);const i=n.get(e);i.has(t.const)||i.set(t.const,[]),i.get(t.const).push(r)}}))}return n},i=(t,n)=>{for(const[r,i]of t){const t=new Set;if(i.forEach((e=>e.forEach((e=>t.add(e))))),t.size===e.length){const t=n(r),s=i.get(t);if(null==s?void 0:s.length)return s.map((t=>e[t]));break}}};if("object"===s.type&&(null==(t=s.properties)?void 0:t.length)){const e=r((e=>e.properties?Object.entries(e.properties).map((([e,t])=>[e,cr(t)])):void 0));if(e)return i(e,(e=>{var t;const n=s.properties.find((t=>t.keyNode.value===e));return"string"===(null==(t=null==n?void 0:n.valueNode)?void 0:t.type)?n.valueNode.value:void 0}))}else if("array"===s.type&&(null==(n=s.items)?void 0:n.length)){const e=r((e=>{const t=e.prefixItems||(Array.isArray(e.items)?e.items:void 0);return t?t.map(((e,t)=>[t,cr(e)])):void 0}));if(e)return i(e,(e=>{const t=s.items[e];return"string"===(null==t?void 0:t.type)?t.value:void 0}))}return}(e))?o:e;let l;for(const e of c){const n=cr(e),o=new vr,c=r.newSub();if(xr(s,n,o,c,i),o.hasProblems()||a.push(n),l)if(t||o.hasProblems()||l.validationResult.hasProblems()){const e=o.compare(l.validationResult);e>0?l={schema:n,validationResult:o,matchingSchemas:c}:0===e&&(l.matchingSchemas.merge(c),l.validationResult.mergeEnumValues(o))}else l.matchingSchemas.merge(c),l.validationResult.propertiesMatches+=o.propertiesMatches,l.validationResult.propertiesValueMatches+=o.propertiesValueMatches,l.validationResult.mergeProcessedProperties(o);else l={schema:n,validationResult:o,matchingSchemas:c}}return a.length>1&&t&&n.problems.push({location:{offset:s.offset,length:1},message:pn("Matches multiple schemas when only one must validate.")}),l&&(l.validationResult.updateEnumMismatchProblemMessages(),n.merge(l.validationResult),r.merge(l.matchingSchemas)),a.length};Array.isArray(t.anyOf)&&c(t.anyOf,!1);Array.isArray(t.oneOf)&&c(t.oneOf,!0);const l=e=>{const t=new vr,o=r.newSub();xr(s,cr(e),t,o,i),n.merge(t),r.merge(o)},u=cr(t.if);u&&((e,t,o)=>{const a=cr(e),c=new vr,u=r.newSub();xr(s,a,c,u,i),r.merge(u),n.mergeProcessedProperties(c),c.hasProblems()?o&&l(o):t&&l(t)})(u,cr(t.then),cr(t.else));if(Array.isArray(t.enum)){const e=yr(s);let r=!1;for(const n of t.enum)if(yn(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:s.offset,length:s.length},code:nn.EnumValueMismatch,message:t.errorMessage||pn("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}if(f=t.const,void 0!==f){yn(yr(s),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:nn.EnumValueMismatch,message:t.errorMessage||pn("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}var f;let h=t.deprecationMessage;if(h||t.deprecated){h=h||pn("Value is deprecated");let t="property"===(null==(e=s.parent)?void 0:e.type)?s.parent:s;n.problems.push({location:{offset:t.offset,length:t.length},severity:Q.Warning,message:h,code:nn.Deprecated})}}(),s.type){case"object":!function(e){const s=Object.create(null),o=new Set;for(const t of e.properties){const e=t.keyNode.value;s[e]=t.valueNode,o.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!s[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,i=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:i,message:pn('Missing property "{0}".',r)})}const a=e=>{o.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const o=t.properties[e],c=s[e];if(c)if(wn(o))if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pn("Property {0} is not allowed.",e)})}else{const e=new vr;xr(c,o,e,r,i),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=Kn(e);if(c){const l=[];for(const a of o)if(c.test(a)){l.push(a);const o=s[a];if(o){const s=t.patternProperties[e];if(wn(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pn("Property {0} is not allowed.",a)})}else{const e=new vr;xr(o,s,e,r,i),n.mergePropertyMatch(e)}}}l.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of o){a(e);const o=s[e];if(o)if(!1===c){const r=o.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pn("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new vr;xr(o,c,e,r,i),n.mergePropertyMatch(e)}}const l=t.unevaluatedProperties;if(void 0!==l){const e=[];for(const a of o)if(!n.processedProperties.has(a)){e.push(a);const o=s[a];if(o)if(!1===l){const e=o.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pn("Property {0} is not allowed.",a)})}else if(!0!==l){const e=new vr;xr(o,l,e,r,i),n.mergePropertyMatch(e)}}e.forEach(a)}bn(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Object has more properties than limit of {0}.",t.maxProperties)});bn(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Object has fewer properties than the required number of {0}",t.minProperties)});if(t.dependentRequired)for(const e in t.dependentRequired){const n=s[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&f(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=s[e],r=t.dependentSchemas[e];n&&An(r)&&f(e,r)}if(t.dependencies)for(const e in t.dependencies){s[e]&&f(e,t.dependencies[e])}const u=cr(t.propertyNames);if(u)for(const t of e.properties){const e=t.keyNode;e&&xr(e,u,n,r,i)}function f(t,o){if(Array.isArray(o))for(const r of o)s[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Object is missing property {0} required by property {1}.",r,t)});else{const t=cr(o);if(t){const s=new vr;xr(e,t,s,r,i),n.mergePropertyMatch(s)}}}}(s);break;case"array":!function(e){let s,o;i.schemaDraft>=sn.v2020_12?(s=t.prefixItems,o=Array.isArray(t.items)?void 0:t.items):(s=Array.isArray(t.items)?t.items:void 0,o=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==s){const t=Math.min(s.length,e.items.length);for(;a<t;a++){const t=cr(s[a]),o=new vr,c=e.items[a];c&&(xr(c,t,o,r,i),n.mergePropertyMatch(o)),n.processedProperties.add(String(a))}}if(void 0!==o&&a<e.items.length)if("boolean"==typeof o)for(!1===o&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const t=new vr;xr(e.items[a],o,t,r,i),n.mergePropertyMatch(t),n.processedProperties.add(String(a))}const c=cr(t.contains);if(c){let r=0;for(let t=0;t<e.items.length;t++){const s=e.items[t],o=new vr;xr(s,c,o,gr.instance,i),o.hasProblems()||(r++,i.schemaDraft>=sn.v2020_12&&n.processedProperties.add(String(t)))}0!==r||bn(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pn("Array does not contain required item.")}),bn(t.minContains)&&r<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pn("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),bn(t.maxContains)&&r>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pn("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const l=t.unevaluatedItems;if(void 0!==l)for(let s=0;s<e.items.length;s++){if(!n.processedProperties.has(String(s)))if(!1===l)n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Item does not match any validation rule from the array.")});else{const o=new vr;xr(e.items[s],t.unevaluatedItems,o,r,i),n.mergePropertyMatch(o)}n.processedProperties.add(String(s)),n.propertiesValueMatches++}bn(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Array has too few items. Expected {0} or more.",t.minItems)});bn(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Array has too many items. Expected {0} or fewer.",t.maxItems)});if(!0===t.uniqueItems){let t=function(){for(let e=0;e<r.length-1;e++){const t=r[e];for(let n=e+1;n<r.length;n++)if(yn(t,r[n]))return!0}return!1};const r=yr(e);t()&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Array has duplicate items.")})}}(s);break;case"string":!function(e){bn(t.minLength)&&Jn(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("String is shorter than the minimum length of {0}.",t.minLength)});bn(t.maxLength)&&Jn(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("String is longer than the maximum length of {0}.",t.maxLength)});if(xn(t.pattern)){const r=Kn(t.pattern);r&&!r.test(e.value)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pn('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=pn("URI with a scheme is expected.")):r=pn("URI is expected.")}else r=pn("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pn("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=Yn[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(s);break;case"number":!function(e){const r=e.value;function i(e){var t;const n=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return n&&{value:Number(n[1]+(n[2]||"")),multiplier:((null==(t=n[2])?void 0:t.length)||0)-(parseInt(n[3])||0)}}if(bn(t.multipleOf)){let s=-1;if(Number.isInteger(t.multipleOf))s=r%t.multipleOf;else{let e=i(t.multipleOf),n=i(r);if(e&&n){const t=o(10,Math.abs(n.multiplier-e.multiplier));n.multiplier<e.multiplier?n.value*=t:e.value*=t,s=n.value%e.value}}0!==s&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Value is not divisible by {0}.",t.multipleOf)})}function s(e,t){return bn(t)?t:wn(t)&&t?e:void 0}function a(e,t){if(!wn(t)||!t)return e}const c=s(t.minimum,t.exclusiveMinimum);bn(c)&&r<=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Value is below the exclusive minimum of {0}.",c)});const l=s(t.maximum,t.exclusiveMaximum);bn(l)&&r>=l&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Value is above the exclusive maximum of {0}.",l)});const u=a(t.minimum,t.exclusiveMinimum);bn(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Value is below the minimum of {0}.",u)});const f=a(t.maximum,t.exclusiveMaximum);bn(f)&&r>f&&n.problems.push({location:{offset:e.offset,length:e.length},message:pn("Value is above the maximum of {0}.",f)})}(s)}r.add({node:s,schema:t})}function Ar(e,t){const n=[];let r=-1;const i=e.getText(),s=Dn(i,!1),o=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=s.scan();switch(u(),t){case 12:case 13:Array.isArray(o)&&o.push(L.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,i,s,o,a=Q.Error){if(0===n.length||s!==r){const c=L.create(e.positionAt(s),e.positionAt(o));n.push(re.create(c,t,a,i,e.languageId)),r=s}}function l(e,t,n=void 0,r=[],o=[]){let l=s.getTokenOffset(),u=s.getTokenOffset()+s.getTokenLength();if(l===u&&l>0){for(l--;l>0&&/\s/.test(i.charAt(l));)l--;u=l+1}if(c(e,t,l,u),n&&f(n,!1),r.length+o.length>0){let e=s.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==o.indexOf(e))break;e=a()}}return n}function u(){switch(s.getTokenError()){case 4:return l(pn("Invalid unicode sequence in string."),nn.InvalidUnicode),!0;case 5:return l(pn("Invalid escape character in string."),nn.InvalidEscapeCharacter),!0;case 3:return l(pn("Unexpected end of number."),nn.UnexpectedEndOfNumber),!0;case 1:return l(pn("Unexpected end of comment."),nn.UnexpectedEndOfComment),!0;case 2:return l(pn("Unexpected end of string."),nn.UnexpectedEndOfString),!0;case 6:return l(pn("Invalid characters in string. Control characters must be escaped."),nn.InvalidCharacter),!0}return!1}function f(e,t){return e.length=s.getTokenOffset()+s.getTokenLength()-e.offset,t&&a(),e}const h=new sr(void 0,0,0);function d(t,n){const r=new or(t,s.getTokenOffset(),h);let i=m(r);if(!i){if(16!==s.getToken())return;{l(pn("Property keys must be doublequoted"),nn.PropertyKeysMustBeDoublequoted);const e=new sr(r,s.getTokenOffset(),s.getTokenLength());e.value=s.getTokenValue(),i=e,a()}}if(r.keyNode=i,"//"!==i.value){const e=n[i.value];e?(c(pn("Duplicate object key"),nn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,Q.Warning),An(e)&&c(pn("Duplicate object key"),nn.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,Q.Warning),n[i.value]=!0):n[i.value]=r}if(6===s.getToken())r.colonOffset=s.getTokenOffset(),a();else if(l(pn("Colon expected"),nn.ColonExpected),10===s.getToken()&&e.positionAt(i.offset+i.length).line<e.positionAt(s.getTokenOffset()).line)return r.length=i.length,r;const o=p(r);return o?(r.valueNode=o,r.length=o.offset+o.length-r.offset,r):l(pn("Value expected"),nn.ValueExpected,r,[],[2,5])}function m(e){if(10!==s.getToken())return;const t=new sr(e,s.getTokenOffset());return t.value=s.getTokenValue(),f(t,!0)}function p(e){return function(e){if(3!==s.getToken())return;const t=new rr(e,s.getTokenOffset());a();let n=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){n||l(pn("Value expected"),nn.ValueExpected);const e=s.getTokenOffset();if(a(),4===s.getToken()){n&&c(pn("Trailing comma"),nn.TrailingComma,e,e+1);continue}}else n&&l(pn("Expected comma"),nn.CommaExpected);const e=p(t);e?t.items.push(e):l(pn("Value expected"),nn.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==s.getToken()?l(pn("Expected comma or closing bracket"),nn.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==s.getToken())return;const t=new ar(e,s.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){r||l(pn("Property expected"),nn.PropertyExpected);const e=s.getTokenOffset();if(a(),2===s.getToken()){r&&c(pn("Trailing comma"),nn.TrailingComma,e,e+1);continue}}else r&&l(pn("Expected comma"),nn.CommaExpected);const e=d(t,n);e?t.properties.push(e):l(pn("Property expected"),nn.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==s.getToken()?l(pn("Expected comma or closing brace"),nn.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||m(e)||function(e){if(11!==s.getToken())return;const t=new ir(e,s.getTokenOffset());if(0===s.getTokenError()){const e=s.getTokenValue();try{const n=JSON.parse(e);if(!bn(n))return l(pn("Invalid number format."),nn.Undefined,t);t.value=n}catch(e){return l(pn("Invalid number format."),nn.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return f(t,!0)}(e)||function(e){switch(s.getToken()){case 7:return f(new tr(e,s.getTokenOffset()),!0);case 8:return f(new nr(e,!0,s.getTokenOffset()),!0);case 9:return f(new nr(e,!1,s.getTokenOffset()),!0);default:return}}(e)}let g;return 17!==a()&&(g=p(g),g?17!==s.getToken()&&l(pn("End of file expected."),nn.Undefined):l(pn("Expected a JSON object, array or literal."),nn.Undefined)),new br(g,n,o)}var $r={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":{$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},"https://json-schema.org/draft/2019-09/schema":{$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}},kr={id:pn("A unique identifier for the schema."),$schema:pn("The schema to verify this document against."),title:pn("A descriptive title of the schema."),description:pn("A long description of the schema. Used in hover menus and suggestions."),default:pn("A default value. Used by suggestions."),multipleOf:pn("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:pn("The maximum numerical value, inclusive by default."),exclusiveMaximum:pn("Makes the maximum property exclusive."),minimum:pn("The minimum numerical value, inclusive by default."),exclusiveMinimum:pn("Makes the minimum property exclusive."),maxLength:pn("The maximum length of a string."),minLength:pn("The minimum length of a string."),pattern:pn("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:pn("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:pn("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:pn("The maximum number of items that can be inside an array. Inclusive."),minItems:pn("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:pn("If all of the items in the array must be unique. Defaults to false."),maxProperties:pn("The maximum number of properties an object can have. Inclusive."),minProperties:pn("The minimum number of properties an object can have. Inclusive."),required:pn("An array of strings that lists the names of all properties required on this object."),additionalProperties:pn("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adjacent keywords will cause this schema to fail."),definitions:pn("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:pn("A map of property names to schemas for each property."),patternProperties:pn("A map of regular expressions on property names to schemas for matching properties."),dependencies:pn("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:pn("The set of literal values that are valid."),type:pn("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:pn("Describes the format expected for the value. By default, not used for validation"),allOf:pn("An array of schemas, all of which must match."),anyOf:pn("An array of schemas, where at least one must match."),oneOf:pn("An array of schemas, exactly one of which must match."),not:pn("A schema which must not match."),$id:pn("A unique identifier for the schema."),$ref:pn("Reference a definition hosted on any location."),$comment:pn("Comments from schema authors to readers or maintainers of the schema."),readOnly:pn("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:pn("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:pn('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:pn("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:pn("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:pn("Describes the media type of a string property."),contentEncoding:pn("Describes the content encoding of a string property."),if:pn('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:pn('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:pn('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in $r.schemas){const t=$r.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=kr[e];r&&(n.description=r)}}function Sr(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t&&!!t.extended,s=!!t&&!!t.globstar;let o=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=c;break}case"{":if(i){o=!0,r+="(";break}case"}":if(i){o=!1,r+=")";break}case",":if(o){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const l=n[e+1];if(s){a>1&&("/"===t||void 0===t||"{"===t||","===t)&&("/"===l||void 0===l||","===l||"}"===l)?("/"===l?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}else r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}var Or=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:Sr("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=_r(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},Ir=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new Cr(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Cr=class{constructor(e,t=[]){this.schema=e,this.errors=t}};function Er(e,t,n){return{message:e,code:t,relatedInformation:n?[{location:{uri:n,range:L.create(0,0,0,0)},message:e}]:void 0}}var Pr=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return cr(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const i=Kn(r);if(null==i?void 0:i.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},Tr=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=Gn.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=fr(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let i=0;i<r.length;i++){const s=r[i];s&&(s.uri===e||s.dependencies.has(e))&&(s.uri!==e&&n.push(s.uri),s.clearSchema()&&(t=!0),r[i]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=fr(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(fr),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new Ir(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new Or(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=fr(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=fr(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=pn("Unable to load schema from '{0}'. No schema request service available",Lr(e));return this.promise.resolve(new Cr({},[Er(t,nn.SchemaResolveError,e)]))}return this.requestService(e).then((t=>{if(!t){const t=pn("Unable to load schema from '{0}': No content.",Lr(e));return new Cr({},[Er(t,nn.SchemaResolveError,e)])}const n=[];65279===t.charCodeAt(0)&&(n.push(Er(pn("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Lr(e)),nn.SchemaResolveError,e)),t=t.trimStart());let r={};const i=[];return r=Hn(t,i),i.length&&n.push(Er(pn("Unable to parse content from '{0}': Parse error at offset {1}.",Lr(e),i[0].offset),nn.SchemaResolveError,e)),new Cr(r,n)}),(t=>{let{message:n,code:r}=t;if("string"!=typeof n){let e=t.toString();const r=t.toString().split("Error: ");r.length>1&&(e=r[1]),function(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}(e,".")&&(e=e.substr(0,e.length-1)),n=e}let i=nn.SchemaResolveError;"number"==typeof r&&r<65536&&(i+=r);const s=pn("Unable to load schema from '{0}': {1}.",Lr(e),n);return new Cr({},[Er(s,i,e)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema,i=r.$schema?hr(r.$schema):void 0;if(i===sn.v3)return this.promise.resolve(new Pr({},[Er(pn("Draft-03 schemas are not supported."),nn.SchemaUnsupportedFeature)],[],i));let s=new Set;const o=this.contextService,a=(e,t,r,i)=>{let s;var o,a,c;if(void 0===i||0===i.length?s=t:"/"===i.charAt(0)?s=((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,i):(o=t,c=i,(a=r).anchors||(a.anchors=u(o)),s=a.anchors.get(c)),s)((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,s);else{const e=pn("$ref '{0}' in '{1}' can not be resolved.",i||"",r.uri);n.push(Er(e,nn.SchemaResolveError))}},c=(e,t,r,i)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(t)&&(t=o.resolveRelativePath(t,i.uri)),t=fr(t);const s=this.getOrAddSchemaHandle(t);return s.getUnresolvedSchema().then((o=>{if(i.dependencies.add(t),o.errors.length){const e=o.errors[0],i=r?pn("Problems loading reference '{0}': {1}",r,e.message):e.message;n.push(Er(i,e.code,t))}return a(e,o.schema,s,r),l(e,o.schema,s)}))},l=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const i=new Set;for(;e.$ref;){const s=e.$ref,o=s.split("#",2);if(delete e.$ref,o[0].length>0)return void r.push(c(e,o[0],o[1],n));if(!i.has(s)){const r=o[1];a(e,t,n,r),i.add(s)}}e.$recursiveRef&&s.add("$recursiveRef"),e.$dynamicRef&&s.add("$dynamicRef")})),this.promise.all(r)},u=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,i=xn(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;i&&(t.has(i)?n.push(Er(pn("Duplicate anchor declaration: '{0}'",i),nn.SchemaResolveError)):t.set(i,e)),e.$recursiveAnchor&&s.add("$recursiveAnchor"),e.$dynamicAnchor&&s.add("$dynamicAnchor")})),t};return l(r,r,t).then((e=>{let t=[];return s.size&&t.push(Er(pn("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", ")),nn.SchemaUnsupportedFeature)),new Pr(r,n,t,i)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)An(t)&&a.push(t)},i=(...e)=>{for(const t of e)if(An(t))for(const e in t){const n=t[e];An(n)&&a.push(n)}},s=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)An(e)&&a.push(e)},o=e=>{if(Array.isArray(e))for(const t of e)An(t)&&a.push(t);else An(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),i(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),s(c.anyOf,c.allOf,c.oneOf,c.prefixItems),o(c.items)),c=a.pop()}getSchemaFromProperty(e,t){var n,r;if("object"===(null==(n=t.root)?void 0:n.type))for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===(null==(r=n.valueNode)?void 0:r.type)){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=_r(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=fr(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Mr++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}},Mr=0;function _r(e){try{return Gn.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function Lr(e){try{const t=Gn.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}var jr=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){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=function(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const i=e.charCodeAt(t);Rr(i)&&(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Rr(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}};function Rr(e){return 13===e||10===e}var Nr=class extends Gt{constructor(e){super(e),this.setTimeout(500);this.service=function(e){const t=Promise,n=new Tr(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions($r);const r=new Sn(n,t);return{configure:e=>{var t;n.clearExternalSchemas(),null==(t=e.schemas)||t.forEach(n.registerExternalSchema.bind(n)),r.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:r.doValidation.bind(r),getLanguageStatus:r.getLanguageStatus.bind(r),parseJSONDocument:e=>Ar(e,{collectComments:!0}),getMatchingSchemas:n.getMatchingSchemas.bind(n)}}({schemaRequestService:e=>{},workspaceContext:{resolveRelativePath:(e,t)=>{}}}),this.$configureService()}$configureService(){this.service.configure({allowComments:this.allowComments,validate:!0})}setOptions(e){this.allowComments=e&&e.allowComments,this.trailingCommas=e&&e.trailingCommas,this.$configureService()}onUpdate(){return e=this,t=null,n=function*(){var e,t=this.doc.getValue(),n=[],r=new jr("file:///foo.json","json",1,t);try{let t=this.service.parseJSONDocument(r);n=null==(e=yield this.service.doValidation(r,t,{trailingCommas:this.trailingCommas?"ignore":"error"}))?void 0:e.map((e=>({row:e.range.start.line,column:e.range.start.character,text:e.message,type:1===e.severity?"error":2===e.severity?"warning":"info",code:e.code,data:e.data})))}catch(e){console.error(e)}this.sender.emit("annotate",n)},new Promise(((r,i)=>{var s=e=>{try{a(n.next(e))}catch(e){i(e)}},o=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,o);a((n=n.apply(e,t)).next())}));var e,t,n}};return(e=>c(t({},"__esModule",{value:!0}),e))(g)})();r=r.default||r,t.JsonWorker=r.JsonWorker}));
@@ -6,6 +6,11 @@ const MESSAGE_BODY_STYLES = `
6
6
  :host {
7
7
  all: initial;
8
8
  display: block;
9
+ /* Nothing the message does paints outside this box, whatever its outermost wrapper says.
10
+ EmailEngine clips the message inside a wrapper of its own; this is the viewer's copy of
11
+ that rule, for a body rendered by a version whose wrapper the sender could still style.
12
+ clip, not hidden: the host must not become a scroll container of its own. */
13
+ overflow: clip;
9
14
  color: inherit;
10
15
  font-family: var(--ee-font, sans-serif);
11
16
  font-size: 14px;