paas-component-library 0.0.21 → 0.0.22

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.
@@ -1,7 +1,7 @@
1
1
  var Le = Object.defineProperty;
2
2
  var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ne } from "./index-KE2muaV4.js";
4
+ import { m as Ne } from "./index-BTjmbdqK.js";
5
5
  import "vue";
6
6
  import "heyui";
7
7
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as F } from "./index-KE2muaV4.js";
1
+ import { m as F } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-KE2muaV4.js";
1
+ import { m as l } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as p } from "./index-KE2muaV4.js";
1
+ import { m as p } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  var $e = Object.defineProperty;
2
2
  var qe = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Qe } from "./index-KE2muaV4.js";
4
+ import { m as Qe } from "./index-BTjmbdqK.js";
5
5
  import "vue";
6
6
  import "heyui";
7
7
  /*!-----------------------------------------------------------------------------
@@ -72326,37 +72326,37 @@ Se({
72326
72326
  id: "freemarker2",
72327
72327
  extensions: [".ftl", ".ftlh", ".ftlx"],
72328
72328
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
72329
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagAutoInterpolationDollar)
72329
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagAutoInterpolationDollar)
72330
72330
  });
72331
72331
  Se({
72332
72332
  id: "freemarker2.tag-angle.interpolation-dollar",
72333
72333
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
72334
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagAngleInterpolationDollar)
72334
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagAngleInterpolationDollar)
72335
72335
  });
72336
72336
  Se({
72337
72337
  id: "freemarker2.tag-bracket.interpolation-dollar",
72338
72338
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
72339
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagBracketInterpolationDollar)
72339
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagBracketInterpolationDollar)
72340
72340
  });
72341
72341
  Se({
72342
72342
  id: "freemarker2.tag-angle.interpolation-bracket",
72343
72343
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
72344
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagAngleInterpolationBracket)
72344
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagAngleInterpolationBracket)
72345
72345
  });
72346
72346
  Se({
72347
72347
  id: "freemarker2.tag-bracket.interpolation-bracket",
72348
72348
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
72349
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagBracketInterpolationBracket)
72349
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagBracketInterpolationBracket)
72350
72350
  });
72351
72351
  Se({
72352
72352
  id: "freemarker2.tag-auto.interpolation-dollar",
72353
72353
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
72354
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagAutoInterpolationDollar)
72354
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagAutoInterpolationDollar)
72355
72355
  });
72356
72356
  Se({
72357
72357
  id: "freemarker2.tag-auto.interpolation-bracket",
72358
72358
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
72359
- loader: () => import("./freemarker2-fY-zyt1e.js").then((o) => o.TagAutoInterpolationBracket)
72359
+ loader: () => import("./freemarker2-L3NO3bI0.js").then((o) => o.TagAutoInterpolationBracket)
72360
72360
  });
72361
72361
  /*!-----------------------------------------------------------------------------
72362
72362
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72394,7 +72394,7 @@ Se({
72394
72394
  extensions: [".handlebars", ".hbs"],
72395
72395
  aliases: ["Handlebars", "handlebars", "hbs"],
72396
72396
  mimetypes: ["text/x-handlebars-template"],
72397
- loader: () => import("./handlebars-LpmhGH2k.js")
72397
+ loader: () => import("./handlebars-W6i1DAbe.js")
72398
72398
  });
72399
72399
  /*!-----------------------------------------------------------------------------
72400
72400
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72419,7 +72419,7 @@ Se({
72419
72419
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
72420
72420
  aliases: ["HTML", "htm", "html", "xhtml"],
72421
72421
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
72422
- loader: () => import("./html-VQB_63Yh.js")
72422
+ loader: () => import("./html-SlBloWjN.js")
72423
72423
  });
72424
72424
  /*!-----------------------------------------------------------------------------
72425
72425
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72460,7 +72460,7 @@ Se({
72460
72460
  filenames: ["jakefile"],
72461
72461
  aliases: ["JavaScript", "javascript", "js"],
72462
72462
  mimetypes: ["text/javascript"],
72463
- loader: () => import("./javascript-_l_m8DAL.js")
72463
+ loader: () => import("./javascript-R_9ktsn6.js")
72464
72464
  });
72465
72465
  /*!-----------------------------------------------------------------------------
72466
72466
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72535,7 +72535,7 @@ Se({
72535
72535
  extensions: [".liquid", ".html.liquid"],
72536
72536
  aliases: ["Liquid", "liquid"],
72537
72537
  mimetypes: ["application/liquid"],
72538
- loader: () => import("./liquid-iuzPwcnl.js")
72538
+ loader: () => import("./liquid-z7APRx1Z.js")
72539
72539
  });
72540
72540
  /*!-----------------------------------------------------------------------------
72541
72541
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72571,7 +72571,7 @@ Se({
72571
72571
  id: "mdx",
72572
72572
  extensions: [".mdx"],
72573
72573
  aliases: ["MDX", "mdx"],
72574
- loader: () => import("./mdx--Ahx-8Ss.js")
72574
+ loader: () => import("./mdx-DX0880Ca.js")
72575
72575
  });
72576
72576
  /*!-----------------------------------------------------------------------------
72577
72577
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72766,7 +72766,7 @@ Se({
72766
72766
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
72767
72767
  aliases: ["Python", "py"],
72768
72768
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
72769
- loader: () => import("./python-rF2AOrZB.js")
72769
+ loader: () => import("./python-TcWdCld4.js")
72770
72770
  });
72771
72771
  /*!-----------------------------------------------------------------------------
72772
72772
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -72803,7 +72803,7 @@ Se({
72803
72803
  extensions: [".cshtml"],
72804
72804
  aliases: ["Razor", "razor"],
72805
72805
  mimetypes: ["text/x-cshtml"],
72806
- loader: () => import("./razor-19N_fB6K.js")
72806
+ loader: () => import("./razor-a_Zw6LLO.js")
72807
72807
  });
72808
72808
  /*!-----------------------------------------------------------------------------
72809
72809
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -73055,7 +73055,7 @@ Se({
73055
73055
  extensions: [".ts", ".tsx", ".cts", ".mts"],
73056
73056
  aliases: ["TypeScript", "ts", "typescript"],
73057
73057
  mimetypes: ["text/typescript"],
73058
- loader: () => import("./typescript-7AVBOSrg.js")
73058
+ loader: () => import("./typescript-TQQL802z.js")
73059
73059
  });
73060
73060
  /*!-----------------------------------------------------------------------------
73061
73061
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -73111,7 +73111,7 @@ Se({
73111
73111
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
73112
73112
  aliases: ["XML", "xml"],
73113
73113
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
73114
- loader: () => import("./xml-LuAV4Hjr.js")
73114
+ loader: () => import("./xml-7gEIcmOZ.js")
73115
73115
  });
73116
73116
  /*!-----------------------------------------------------------------------------
73117
73117
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -73124,7 +73124,7 @@ Se({
73124
73124
  extensions: [".yaml", ".yml"],
73125
73125
  aliases: ["YAML", "yaml", "YML", "yml"],
73126
73126
  mimetypes: ["application/x-yaml", "text/x-yaml"],
73127
- loader: () => import("./yaml-xe0K8bvB.js")
73127
+ loader: () => import("./yaml-4b5cnoRH.js")
73128
73128
  });
73129
73129
  /*!-----------------------------------------------------------------------------
73130
73130
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -73219,7 +73219,7 @@ var AR = class {
73219
73219
  }, J6 = new AR("css", PR, OR), eW = new AR("scss", PR, OR), tW = new AR("less", PR, OR);
73220
73220
  sm.languages.css = { cssDefaults: J6, lessDefaults: tW, scssDefaults: eW };
73221
73221
  function FR() {
73222
- return import("./cssMode-TJ8FvwTS.js");
73222
+ return import("./cssMode-3zA5Lqln.js");
73223
73223
  }
73224
73224
  sm.languages.onLanguage("less", () => {
73225
73225
  FR().then((o) => o.setupMode(tW));
@@ -73314,7 +73314,7 @@ Zy.languages.html = {
73314
73314
  registerHTMLLanguageService: Qy
73315
73315
  };
73316
73316
  function Zce() {
73317
- return import("./htmlMode-A4O4qLlM.js");
73317
+ return import("./htmlMode-RRy2G16q.js");
73318
73318
  }
73319
73319
  function Qy(o, e = Yy, t = Xy(o)) {
73320
73320
  const i = new $ce(o, e, t);
@@ -73391,7 +73391,7 @@ var the = class {
73391
73391
  }, oW = new the("json", ihe, nhe);
73392
73392
  ab.languages.json = { jsonDefaults: oW };
73393
73393
  function she() {
73394
- return import("./jsonMode-_TFThZn_.js");
73394
+ return import("./jsonMode-BCf9lvy2.js");
73395
73395
  }
73396
73396
  ab.languages.register({
73397
73397
  id: "json",
@@ -73554,7 +73554,7 @@ Np.languages.typescript = {
73554
73554
  getJavaScriptWorker: fhe
73555
73555
  };
73556
73556
  function Jy() {
73557
- return import("./tsMode-zMp6lOuN.js");
73557
+ return import("./tsMode-0Wc9tdsO.js");
73558
73558
  }
73559
73559
  Np.languages.onLanguage("typescript", () => Jy().then((o) => o.setupTypeScript(fW)));
73560
73560
  Np.languages.onLanguage("javascript", () => Jy().then((o) => o.setupJavaScript(gW)));
@@ -106834,6 +106834,12 @@ const DCe = {
106834
106834
  t.layout();
106835
106835
  });
106836
106836
  }), {};
106837
+ },
106838
+ methods: {
106839
+ rollingBottom() {
106840
+ var o = monacoEditor.getModel(), e = o.getLineCount();
106841
+ editor.revealLine(e);
106842
+ }
106837
106843
  }
106838
106844
  };
106839
106845
  function kCe(o, e, t, i, n, s) {
@@ -1,5 +1,5 @@
1
- import { conf as t, language as e } from "./typescript-7AVBOSrg.js";
2
- import "./index-KE2muaV4.js";
1
+ import { conf as t, language as e } from "./typescript-TQQL802z.js";
2
+ import "./index-BTjmbdqK.js";
3
3
  import "vue";
4
4
  import "heyui";
5
5
  /*!-----------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  var Ge = Object.defineProperty;
2
2
  var Qe = (e, n, i) => n in e ? Ge(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var C = (e, n, i) => (Qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ze } from "./index-KE2muaV4.js";
4
+ import { m as Ze } from "./index-BTjmbdqK.js";
5
5
  import "vue";
6
6
  import "heyui";
7
7
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as d } from "./index-KE2muaV4.js";
1
+ import { m as d } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as p } from "./index-KE2muaV4.js";
1
+ import { m as p } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
package/dist/paas-ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as p } from "./index-KE2muaV4.js";
1
+ import { g as p } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  export {
@@ -1121,7 +1121,7 @@ The flag will not be saved for the future.
1121
1121
  `):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
1122
1122
  `):void 0}})}provideRenameEdits(e,t){return Hg(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Hg(this,void 0,void 0,function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join(`
1123
1123
  `)};const r=yield o.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r})}}function iSe(s,e,t,i){return Hg(this,void 0,void 0,function*(){const n=new TP(e,t,s),o=yield n.resolveRenameLocation(st.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,st.None)})}let $g=IP=class{static get(e){return e.getContribution(IP.ID)}constructor(e,t,i,n,o,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new Q,this._cts=new Ti,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(EP,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Hg(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Ti,!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new TP(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;const o=new uu(this.editor,5,void 0,this._cts.token);let r;try{const f=n.resolveRenameLocation(o.token);this._progressService.showWhile(f,250),r=yield f}catch(f){(e=ho.get(this.editor))===null||e===void 0||e.showMessage(f||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}finally{o.dispose()}if(!r)return;if(r.rejectReason){(t=ho.get(this.editor))===null||t===void 0||t.showMessage(r.rejectReason,i);return}if(o.token.isCancellationRequested)return;const a=new uu(this.editor,5,r.range,this._cts.token),l=this.editor.getSelection();let d=0,c=r.text.length;!k.isEmpty(l)&&!k.spansMultipleLines(l)&&k.containsRange(r.range,l)&&(d=Math.max(0,l.startColumn-r.range.startColumn),c=Math.min(r.range.endColumn,l.endColumn)-r.range.startColumn);const u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(r.range,r.text,d,c,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();const g=Bw(n.provideRenameEdits(h.newName,a.token),a.token).then(f=>Hg(this,void 0,void 0,function*(){if(!(!f||!this.editor.hasModel())){if(f.rejectReason){this._notificationService.info(f.rejectReason);return}this.editor.setSelection(k.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(f,{editor:this.editor,showPreview:h.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",r==null?void 0:r.text,h.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",r==null?void 0:r.text,h.newName),respectAutoSaveConfig:!0}).then(m=>{m.ariaSummary&&es(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,m.ariaSummary))}).catch(m=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(m)})}}),f=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(f)}).finally(()=>{a.dispose()});return this._progressService.showWhile(g,250),g})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};$g.ID="editor.contrib.renameController",$g=IP=tSe([Vg(1,Pe),Vg(2,Pi),Vg(3,dv),Vg(4,Yc),Vg(5,ko),Vg(6,fI),Vg(7,ve)],$g);class nSe extends _e{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Y.and(I.writable,I.hasRenameProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(xt),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return Ie.isUri(n)&&P.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(o),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},je):super.runCommand(e,t)}run(e,t){const i=$g.get(t);return i?i.run():Promise.resolve()}}wt($g.ID,$g,4),se(nSe);const NP=ln.bindToContribution($g.get);ae(new NP({id:"acceptRenameInput",precondition:Jk,handler:s=>s.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:Y.and(I.focus,Y.not("isComposing")),primary:3}})),ae(new NP({id:"acceptRenameInputWithPreview",precondition:Y.and(Jk,Y.has("config.editor.rename.enablePreview")),handler:s=>s.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:Y.and(I.focus,Y.not("isComposing")),primary:1027}})),ae(new NP({id:"cancelRenameInput",precondition:Jk,handler:s=>s.cancelRenameInput(),kbOpts:{weight:199,kbExpr:I.focus,primary:9,secondary:[1033]}})),el("_executeDocumentRenameProvider",function(s,e,t,...i){const[n]=i;Mt(typeof n=="string");const{renameProvider:o}=s.get(ve);return iSe(o,e,t,n)}),el("_executePrepareRename",function(s,e,t){return Hg(this,void 0,void 0,function*(){const{renameProvider:i}=s.get(ve),o=yield new TP(e,t,i).resolveRenameLocation(st.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})}),li.as(ga.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:p("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function sSe(s){for(let e=0,t=s.length;e<t;e+=4){const i=s[e+0],n=s[e+1],o=s[e+2],r=s[e+3];s[e+0]=r,s[e+1]=o,s[e+2]=n,s[e+3]=i}}function oSe(s){const e=new Uint8Array(s.buffer,s.byteOffset,s.length*4);return MF()||sSe(e),zw.wrap(e)}function Tz(s){const e=new Uint32Array(rSe(s));let t=0;if(e[t++]=s.id,s.type==="full")e[t++]=1,e[t++]=s.data.length,e.set(s.data,t),t+=s.data.length;else{e[t++]=2,e[t++]=s.deltas.length;for(const i of s.deltas)e[t++]=i.start,e[t++]=i.deleteCount,i.data?(e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length):e[t++]=0}return oSe(e)}function rSe(s){let e=0;if(e+=2,s.type==="full")e+=1+s.data.length;else{e+=1,e+=3*s.deltas.length;for(const t of s.deltas)t.data&&(e+=t.data.length)}return e}var Fu=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function eL(s){return s&&!!s.data}function Nz(s){return s&&Array.isArray(s.edits)}class aSe{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function Az(s,e){return s.has(e)}function lSe(s,e){const t=s.orderedGroups(e);return t.length>0?t[0]:[]}function Rz(s,e,t,i,n){return Fu(this,void 0,void 0,function*(){const o=lSe(s,e),r=yield Promise.all(o.map(a=>Fu(this,void 0,void 0,function*(){let l,d=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(c){d=c,l=null}return(!l||!eL(l)&&!Nz(l))&&(l=null),new aSe(a,l,d)})));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null})}function dSe(s,e){const t=s.orderedGroups(e);return t.length>0?t[0]:null}class cSe{constructor(e,t){this.provider=e,this.tokens=t}}function uSe(s,e){return s.has(e)}function Mz(s,e){const t=s.orderedGroups(e);return t.length>0?t[0]:[]}function AP(s,e,t,i){return Fu(this,void 0,void 0,function*(){const n=Mz(s,e),o=yield Promise.all(n.map(r=>Fu(this,void 0,void 0,function*(){let a;try{a=yield r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){Oi(l),a=null}return(!a||!eL(a))&&(a=null),new cSe(r,a)})));for(const r of o)if(r.tokens)return r;return o.length>0?o[0]:null})}gt.registerCommand("_provideDocumentSemanticTokensLegend",(s,...e)=>Fu(void 0,void 0,void 0,function*(){const[t]=e;Mt(t instanceof Ie);const i=s.get(si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=s.get(ve),o=dSe(n,i);return o?o[0].getLegend():s.get(pi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)})),gt.registerCommand("_provideDocumentSemanticTokens",(s,...e)=>Fu(void 0,void 0,void 0,function*(){const[t]=e;Mt(t instanceof Ie);const i=s.get(si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=s.get(ve);if(!Az(n,i))return s.get(pi).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const o=yield Rz(n,i,null,null,st.None);if(!o)return;const{provider:r,tokens:a}=o;if(!a||!eL(a))return;const l=Tz({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l})),gt.registerCommand("_provideDocumentRangeSemanticTokensLegend",(s,...e)=>Fu(void 0,void 0,void 0,function*(){const[t,i]=e;Mt(t instanceof Ie);const n=s.get(si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:o}=s.get(ve),r=Mz(o,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!k.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=yield AP(o,n,k.lift(i),st.None);if(a)return a.provider.getLegend()})),gt.registerCommand("_provideDocumentRangeSemanticTokens",(s,...e)=>Fu(void 0,void 0,void 0,function*(){const[t,i]=e;Mt(t instanceof Ie),Mt(k.isIRange(i));const n=s.get(si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:o}=s.get(ve),r=yield AP(o,n,k.lift(i),st.None);if(!(!r||!r.tokens))return Tz({id:0,type:"full",data:r.tokens.data})}));const RP="editor.semanticHighlighting";function MP(s,e,t){var i;const n=(i=t.getValue(RP,{overrideIdentifier:s.getLanguageId(),resource:s.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var Pz=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hl=function(s,e){return function(t,i){e(t,i,s)}},Bu;let PP=class extends V{constructor(e,t,i,n,o,r){super(),this._watchers=Object.create(null);const a=c=>{this._watchers[c.uri.toString()]=new X0(c,e,i,o,r)},l=(c,u)=>{u.dispose(),delete this._watchers[c.uri.toString()]},d=()=>{for(const c of t.getModels()){const u=this._watchers[c.uri.toString()];MP(c,i,n)?u||a(c):u&&l(c,u)}};this._register(t.onModelAdded(c=>{MP(c,i,n)&&a(c)})),this._register(t.onModelRemoved(c=>{const u=this._watchers[c.uri.toString()];u&&l(c,u)})),this._register(n.onDidChangeConfiguration(c=>{c.affectsConfiguration(RP)&&d()})),this._register(i.onDidColorThemeChange(d))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};PP=Pz([Hl(0,xy),Hl(1,si),Hl(2,tn),Hl(3,dt),Hl(4,ur),Hl(5,ve)],PP);let X0=Bu=class extends V{constructor(e,t,i,n,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Bu.REQUEST_MIN_DELAY,max:Bu.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Ot(()=>this._fetchDocumentSemanticTokensNow(),Bu.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{It(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),It(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Az(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new Ti,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=Rz(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent(l=>{o.push(l)}),a=new Xn(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{const{provider:d,tokens:c}=l,u=this._semanticTokensStylingService.getStyling(d);this._setDocumentSemanticTokens(d,c||null,u,o)}},l=>{l&&(ia(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||je(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let r=0;r<o;r++)i[n+r]=e[t+r]}_setDocumentSemanticTokens(e,t,i,n){const o=this._currentDocumentResponse,r=()=>{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(Nz(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=o.data,d=new Uint32Array(l.length+a);let c=l.length,u=d.length;for(let h=t.edits.length-1;h>=0;h--){const g=t.edits[h];if(g.start>l.length){i.warnInvalidEditStart(o.resultId,t.resultId,h,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=c-(g.start+g.deleteCount);f>0&&(Bu._copy(l,c-f,d,u-f,f),u-=f),g.data&&(Bu._copy(g.data,0,d,u-g.data.length,g.data.length),u-=g.data.length),c=g.start}c>0&&Bu._copy(l,0,d,0,c),t={resultId:t.resultId,data:d}}}if(eL(t)){this._currentDocumentResponse=new hSe(e,t.resultId,t.data);const a=_9(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const d of a)for(const c of l.changes)d.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};X0.REQUEST_MIN_DELAY=300,X0.REQUEST_MAX_DELAY=2e3,X0=Bu=Pz([Hl(1,xy),Hl(2,tn),Hl(3,ur),Hl(4,ve)],X0);class hSe{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}OS(PP);var gSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Q0=function(s,e){return function(t,i){e(t,i,s)}};let J0=class extends V{constructor(e,t,i,n,o,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Ot(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(RP)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!MP(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!uSe(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(i=>this._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=Gi(r=>Promise.resolve(AP(this._provider,e,t,r))),o=new Xn(!1);return n.then(r=>{if(this._debounceInformation.update(e,o.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,d=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,_9(l,d,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};J0.ID="editor.contrib.viewportSemanticTokens",J0=gSe([Q0(1,xy),Q0(2,tn),Q0(3,dt),Q0(4,ur),Q0(5,ve)],J0),wt(J0.ID,J0,1);class fSe{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const o=[];i.push(o),this.selectSubwords&&this._addInWordRanges(o,e,n),this._addWordRanges(o,e,n),this._addWhitespaceLine(o,e,n),o.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:r}=n,a=i.column-r;let l=a,d=a,c=0;for(;l>=0;l--){const u=o.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(fc(u)&&Za(c))break;c=u}for(l+=1;d<o.length;d++){const u=o.charCodeAt(d);if(Za(u)&&fc(c))break;if(u===95||u===45)break;c=u}l<d&&e.push({range:new k(i.lineNumber,r+l,i.lineNumber,r+d)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new k(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new k(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var pSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mSe=function(s,e){return function(t,i){e(t,i,s)}},tL=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},OP;class FP{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new FP(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let Vm=OP=class{static get(e){return e.getContribution(OP.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return tL(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||(yield Fz(this._languageFeaturesService.selectionRangeProvider,i,t.map(o=>o.getPosition()),this._editor.getOption(112),st.None).then(o=>{var r;if(!(!Zn(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!vi(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new FP(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));const n=this._state.map(o=>ye.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}};Vm.ID="editor.contrib.smartSelectController",Vm=OP=pSe([mSe(1,ve)],Vm);class Oz extends _e{constructor(e,t){super(t),this._forward=e}run(e,t){return tL(this,void 0,void 0,function*(){const i=Vm.get(t);i&&(yield i.run(this._forward))})}}class _Se extends Oz{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:D.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}gt.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class bSe extends Oz{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:D.MenubarSelectionMenu,group:"1_basic",title:p({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}wt(Vm.ID,Vm,4),se(_Se),se(bSe);function Fz(s,e,t,i,n){return tL(this,void 0,void 0,function*(){const o=s.all(e).concat(new fSe(i.selectSubwords));o.length===1&&o.unshift(new Wo);const r=[],a=[];for(const l of o)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(d=>{if(Zn(d)&&d.length===t.length)for(let c=0;c<t.length;c++){a[c]||(a[c]=[]);for(const u of d[c])k.isIRange(u.range)&&k.containsPosition(u.range,t[c])&&a[c].push(k.lift(u.range))}},Oi));return yield Promise.all(r),a.map(l=>{if(l.length===0)return[];l.sort((h,g)=>P.isBefore(h.getStartPosition(),g.getStartPosition())?1:P.isBefore(g.getStartPosition(),h.getStartPosition())||P.isBefore(h.getEndPosition(),g.getEndPosition())?-1:P.isBefore(g.getEndPosition(),h.getEndPosition())?1:0);const d=[];let c;for(const h of l)(!c||k.containsRange(h,c)&&!k.equalsRange(h,c))&&(d.push(h),c=h);if(!i.selectLeadingAndTrailingWhitespace)return d;const u=[d[0]];for(let h=1;h<d.length;h++){const g=d[h-1],f=d[h];if(f.startLineNumber!==g.startLineNumber||f.endLineNumber!==g.endLineNumber){const m=new k(g.startLineNumber,e.getLineFirstNonWhitespaceColumn(g.startLineNumber),g.endLineNumber,e.getLineLastNonWhitespaceColumn(g.endLineNumber));m.containsRange(g)&&!m.equalsRange(g)&&f.containsRange(m)&&!f.equalsRange(m)&&u.push(m);const _=new k(g.startLineNumber,1,g.endLineNumber,e.getLineMaxColumn(g.endLineNumber));_.containsRange(g)&&!_.equalsRange(m)&&f.containsRange(_)&&!f.equalsRange(_)&&u.push(_)}u.push(f)}return u})})}gt.registerCommand("_executeSelectionRangeProvider",function(s,...e){return tL(this,void 0,void 0,function*(){const[t,i]=e;Mt(Ie.isUri(t));const n=s.get(ve).selectionRangeProvider,o=yield s.get(Os).createModelReference(t);try{return Fz(n,o.object.textEditorModel,i,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},st.None)}finally{o.dispose()}})});const vSe=Object.freeze({View:{value:p("view","View"),original:"View"},Help:{value:p("help","Help"),original:"Help"},Test:{value:p("test","Test"),original:"Test"},File:{value:p("file","File"),original:"File"},Preferences:{value:p("preferences","Preferences"),original:"Preferences"},Developer:{value:p({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}});var CSe=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class Bz{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&vi(this.startLineNumbers,e.startLineNumbers)&&vi(this.endLineNumbers,e.endLineNumbers)}}const Wz=ad("stickyScrollViewLayer",{createHTML:s=>s}),BP="data-sticky-line-index",Vz="data-sticky-is-line",wSe="data-sticky-is-line-number",Hz="data-sticky-is-folding-icon";class ySe extends V{constructor(e){super(),this._editor=e,this._foldingIconStore=new Q,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof fu),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(114)&&t(),i.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(i=>{i.scrollLeftChanged&&t(),i.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(i=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,i=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&i===1/0)return;this._previousState=e;const n=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const r=[...e.startLineNumbers];e.showEndForLine!==null&&(r[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=r}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(n,t,i)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),bn(this._lineNumbersDomNode),bn(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(e?!0:i.isCollapsed)}}_renderRootNode(e,t,i=1/0){return CSe(this,void 0,void 0,function*(){const n=this._editor.getLayoutInfo();for(const[r,a]of this._lineNumbers.entries()){const l=e[r],d=a>=i||(l==null?void 0:l.lineNumber)!==a?this._renderChildNode(r,a,t,n):this._updateTopAndZIndexOfStickyLine(l);d&&(this._linesDomNode.appendChild(d.lineDomNode),this._lineNumbersDomNode.appendChild(d.lineNumberDomNode),this._stickyLines.push(d))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const o=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(o===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${o}px`,this._linesDomNodeScrollable.style.height=`${o}px`,this._rootDomNode.style.height=`${o}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(j(this._lineNumbersDomNode,ue.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(j(this._lineNumbersDomNode,ue.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel();if(!o)return;const r=o.coordinatesConverter.convertModelPositionToViewPosition(new P(t,1)).lineNumber,a=o.getViewLineRenderingData(r),l=this._editor.getOption(67);let d;try{d=no.filter(a.inlineDecorations,r,a.minColumn,a.maxColumn)}catch{d=[]}const c=new Dc(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),u=new Nf(2e3),h=J_(c,u);let g;Wz?g=Wz.createHTML(u.build()):g=u.build();const f=document.createElement("span");f.setAttribute(BP,String(e)),f.setAttribute(Vz,""),f.setAttribute("role","listitem"),f.tabIndex=0,f.className="sticky-line-content",f.classList.add(`stickyLine${t}`),f.style.lineHeight=`${this._lineHeight}px`,f.innerHTML=g;const m=document.createElement("span");m.setAttribute(BP,String(e)),m.setAttribute(wSe,""),m.className="sticky-line-number",m.style.lineHeight=`${this._lineHeight}px`;const _=n.contentLeft;m.style.width=`${_}px`;const b=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?b.innerText=t.toString():l.renderType===2&&(b.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),b.className="sticky-line-number-inner",b.style.lineHeight=`${this._lineHeight}px`,b.style.width=`${n.lineNumbersWidth}px`,b.style.paddingLeft=`${n.lineNumbersLeft}px`,m.appendChild(b);const v=this._renderFoldingIconForLine(i,t);v&&m.appendChild(v.domNode),this._editor.applyFontInfo(f),this._editor.applyFontInfo(b),m.style.lineHeight=`${this._lineHeight}px`,f.style.lineHeight=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`,f.style.height=`${this._lineHeight}px`;const C=new SSe(e,t,f,m,v,h.characterMapping);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,o=e.lineNumberDomNode,r=i===this._lineNumbers.length-1,a="0",l="1";n.style.zIndex=r?a:l,o.style.zIndex=r?a:l;const d=`${i*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,c=`${i*this._lineHeight}px`;return n.style.top=r?d:c,o.style.top=r?d:c,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(109);if(!e||i==="never")return;const n=e.regions,o=n.findRange(t),r=n.getStartLineNumber(o);if(!(t===r))return;const l=n.isCollapsed(o),d=new xSe(l,r,n.getEndLineNumber(o),this._lineHeight);return d.setVisible(this._isOnGlyphMargin?!0:l||i==="always"),d.domNode.setAttribute(Hz,""),d}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._stickyLines.length&&this._stickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=HI(t.characterMapping,e,0);return new P(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return(i=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&i!==void 0?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,BP);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,Vz)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Hz)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(i!==null)return i;e=e.parentElement}}}class SSe{constructor(e,t,i,n,o,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=o,this.characterMapping=r}}class xSe{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=Te.asClassName(e?gk:hk)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class eC{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class iL{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class $z{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var nL=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},tC=function(s,e){return function(t,i){e(t,i,s)}},zz=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},iC;(function(s){s.OUTLINE_MODEL="outlineModel",s.FOLDING_PROVIDER_MODEL="foldingProviderModel",s.INDENTATION_MODEL="indentationModel"})(iC||(iC={}));var Wu;(function(s){s[s.VALID=0]="VALID",s[s.INVALID=1]="INVALID",s[s.CANCELED=2]="CANCELED"})(Wu||(Wu={}));let WP=class extends V{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Lr(300)),this._updateOperation=this._register(new Q);const o=new VP(i),r=new $P(this._editor,i),a=new HP(this._editor,t);switch(n){case iC.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(r),this._modelProviders.push(a);break;case iC.FOLDING_PROVIDER_MODEL:this._modelProviders.push(r),this._modelProviders.push(a);break;case iC.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,i){return zz(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>zz(this,void 0,void 0,function*(){for(const n of this._modelProviders){const{statusPromise:o,modelPromise:r}=n.computeStickyModel(e,t,i);this._modelPromise=r;const a=yield o;if(this._modelPromise!==r)return null;switch(a){case Wu.CANCELED:return this._updateOperation.clear(),null;case Wu.VALID:return n.stickyModel}}return null})).catch(n=>(je(n),null))})}};WP=nL([tC(1,Ht),tC(2,ve)],WP);class Uz{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Wu.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=Gi(o=>this.createModelFromProvider(e,t,o));return{statusPromise:n.then(o=>this.isModelValid(o)?i.isCancellationRequested?Wu.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,o),Wu.VALID):this._invalid()).then(void 0,o=>(je(o),Wu.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let VP=class extends Uz{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return Zd.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var o;const{stickyOutlineElement:r,providerID:a}=this._stickyModelFromOutlineModel(n,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new $z(e.uri,t,r,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(nt.first(e.children.values())instanceof O$){const a=nt.find(e.children.values(),l=>l.id===t);if(a)i=a.children;else{let l="",d=-1,c;for(const[u,h]of e.children.entries()){const g=this._findSumOfRangesOfGroup(h);g>d&&(c=h,d=g,l=h.id)}t=l,i=c.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort((a,l)=>{const d=new eC(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),c=new eC(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(d,c)});for(const a of o)n.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new iL(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(const r of o.children.values())i.push(this._stickyModelFromOutlineElement(r,o.symbol.selectionRange.startLineNumber));i.sort((o,r)=>this._comparator(o.range,r.range));const n=new eC(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new iL(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof BM?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};VP=nL([tC(0,ve)],VP);class jz extends Uz{constructor(e){super(),this._foldingLimitReporter=new R$(e)}createStickyModel(e,t,i,n){const o=this._fromFoldingRegions(n);return new $z(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,i=[],n=new iL(void 0,[],void 0);for(let o=0;o<t;o++){const r=e.getParentIndex(o);let a;r!==-1?a=i[r]:a=n;const l=new iL(new eC(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),i.push(l)}return n}}let HP=class extends jz{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,i){return new RM(e,this._languageConfigurationService,this._foldingLimitReporter).compute(i)}};HP=nL([tC(1,Ht)],HP);let $P=class extends jz{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return Wl.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,i){const n=Wl.getFoldingRangeProviders(this._languageFeaturesService,e);return new PM(e,n,()=>this.createModelFromProvider(e,t,i),this._foldingLimitReporter,void 0).compute(i)}};$P=nL([tC(1,ve)],$P);var kSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},qz=function(s,e){return function(t,i){e(t,i,s)}},Kz=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class LSe{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let zP=class extends V{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new M),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new Q),this._updateSoon=this._register(new Ot(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new WP(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return Kz(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Ti,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return Kz(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),i=t.getVersionId(),n=yield this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(t.children.length===0)return;let r=o;const a=[];for(let c=0;c<t.children.length;c++){const u=t.children[c];u.range&&a.push(u.range.startLineNumber)}const l=this.updateIndex(c_(a,e.startLineNumber,(c,u)=>c-u)),d=this.updateIndex(c_(a,e.startLineNumber+n,(c,u)=>c-u));for(let c=l;c<=d;c++){const u=t.children[c];if(!u)return;if(u.range){const h=u.range.startLineNumber,g=u.range.endLineNumber;e.startLineNumber<=g+1&&h-1<=e.endLineNumber&&h!==r&&(r=h,i.push(new LSe(h,g-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n,o)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const o=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(o)for(const r of o)n=n.filter(a=>!(a.startLineNumber>=r.startLineNumber&&a.endLineNumber<=r.endLineNumber+1));return n}};zP=kSe([qz(1,ve),qz(2,Ht)],zP);var DSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hm=function(s,e){return function(t,i){e(t,i,s)}},UP=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},jP;let $l=jP=class extends V{constructor(e,t,i,n,o,r,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=a,this._sessionStore=new Q,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new ySe(this._editor),this._stickyLineCandidateProvider=new zP(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new Bz([],[],0),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(114)||c.hasChanged(72)||c.hasChanged(66)||c.hasChanged(109))&&this._readConfiguration()})),this._register(j(l,ue.CONTEXT_MENU,c=>UP(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=I.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=I.stickyScrollVisible.bindTo(this._contextKeyService);const d=this._register(Ja(l));this._register(d.onDidBlur(c=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(d.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(j(l,ue.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(jP.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new Q,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(k.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new Q),t=this._register(new _x(this._editor,{extractLineNumberFromMouseEvent:o=>{const r=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return r?r.lineNumber:0}})),i=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;const r=o.target.element;if(!r||r.innerText!==r.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(r);return a?{range:new k(a.lineNumber,a.column,a.lineNumber,a.column+r.innerText.length),textElement:r}:null},n=this._stickyScrollWidget.getDomNode();this._register(Ai(n,ue.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){const d=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(d===null)return;const c=new P(this._endLineNumbers[d],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(o.target)){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);this._toggleFoldingRegionForLine(d);return}if(!this._stickyScrollWidget.isInStickyLine(o.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!l){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(d===null)return;l=new P(d,1)}this._revealPosition(l)})),this._register(Ai(n,ue.MOUSE_MOVE,o=>{if(o.shiftKey){const r=this._stickyScrollWidget.getLineIndexFromChildDomNode(o.target);if(r===null||this._showEndForLine!==null&&this._showEndForLine===r)return;this._showEndForLine=r,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(j(n,ue.MOUSE_LEAVE,o=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([o,r])=>{const a=i(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:d}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(d.style.textDecoration==="underline")return;const c=new Ti;e.add(Fe(()=>c.dispose(!0)));let u;kx(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new P(l.startLineNumber,l.startColumn+1),c.token).then(h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const g=d;u!==g?(e.clear(),u=g,u.style.textDecoration="underline",e.add(Fe(()=>{u.style.textDecoration="none"}))):u||(u=g,u.style.textDecoration="underline",e.add(Fe(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(o=>UP(this,void 0,void 0,function*(){if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;const r=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);r&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:r.lineNumber,column:1})),this._instaService.invokeFunction(cz,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){const t=new Xo(e);this._contextMenuService.showContextMenu({menuId:D.StickyScrollContext,getAnchor:()=>t})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),i=t==null?void 0:t.foldingIcon;if(!i)return;D$(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this._onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(e=1/0){var t,i;return UP(this,void 0,void 0,function*(){const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,e);return}const o=this._stickyLineCandidateProvider.getVersionId();if(o===void 0||o===n.getVersionId())if(this._foldingModel=(i=yield(t=Wl.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel())!==null&&i!==void 0?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}})}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],r=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new eC(a[0].startLineNumber,a[a.length-1].endLineNumber),d=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const c of d){const u=c.startLineNumber,h=c.endLineNumber,g=c.nestingDepth;if(h-u>0){const f=(g-1)*e,m=g*e,_=this._editor.getBottomForLineNumber(u)-i,b=this._editor.getTopForLineNumber(h)-i,v=this._editor.getBottomForLineNumber(h)-i;if(f>b&&f<=v){o.push(u),r.push(h+1),n=v-m;break}else m>_&&m<=v&&(o.push(u),r.push(h+1));if(o.length===t)break}}}return this._endLineNumbers=r,new Bz(o,r,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};$l.ID="store.contrib.stickyScrollController",$l=jP=DSe([Hm(1,Pr),Hm(2,ve),Hm(3,Pe),Hm(4,Ht),Hm(5,ur),Hm(6,Be)],$l);var ESe=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class ISe extends So{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:p("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:p({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:vSe.View,toggled:{condition:Y.equals("config.editor.stickyScroll.enabled",!0),title:p("stickyScroll","Sticky Scroll"),mnemonicTitle:p({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:D.CommandPalette},{id:D.MenubarAppearanceMenu,group:"4_editor",order:3},{id:D.StickyScrollContext}]})}run(e){return ESe(this,void 0,void 0,function*(){const t=e.get(dt),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)})}}const sL=100;class TSe extends ca{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:p("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:p({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:Y.and(Y.has("config.editor.stickyScroll.enabled"),I.stickyScrollVisible),menu:[{id:D.CommandPalette}]})}runEditorCommand(e,t){var i;(i=$l.get(t))===null||i===void 0||i.focus()}}class NSe extends ca{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:p("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sL,primary:18}})}runEditorCommand(e,t){var i;(i=$l.get(t))===null||i===void 0||i.focusNext()}}class ASe extends ca{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:p("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sL,primary:16}})}runEditorCommand(e,t){var i;(i=$l.get(t))===null||i===void 0||i.focusPrevious()}}class RSe extends ca{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:p("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sL,primary:3}})}runEditorCommand(e,t){var i;(i=$l.get(t))===null||i===void 0||i.goToFocused()}}class MSe extends ca{constructor(){super({id:"editor.action.selectEditor",title:{value:p("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:I.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:sL,primary:9}})}runEditorCommand(e,t){var i;(i=$l.get(t))===null||i===void 0||i.selectEditor()}}wt($l.ID,$l,1),Xt(ISe),Xt(TSe),Xt(ASe),Xt(NSe),Xt(RSe),Xt(MSe);var qP=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},zg=function(s,e){return function(t,i){e(t,i,s)}},PSe=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Ug;class OSe{constructor(e,t,i,n,o,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=r}}let KP=class extends dZ{constructor(e,t,i,n,o,r){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var e;const t=[],{items:i}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},i),o=nt.slice(i,n),r=nt.slice(i,0,n);let a=5;for(const l of nt.concat(o,r)){if(l.score===va.Default)continue;const d=new k(l.editStart.lineNumber,l.editStart.column,l.editInsertEnd.lineNumber,l.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),c=l.completion.insertTextRules&&l.completion.insertTextRules&4?{snippet:l.completion.insertText}:l.completion.insertText;t.push(new OSe(d,c,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(st.None)}return t}};KP=qP([zg(5,Sk)],KP);let GP=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}provideInlineCompletions(e,t,i,n){var o;return PSe(this,void 0,void 0,function*(){if(i.selectedSuggestionInfo)return;const r=this._getEditorOption(88,e);if(Tm.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(Tm.valueFor(r,l)!=="inline")return;let d=e.getWordAtPosition(t),c;if(d!=null&&d.word||(c=this._getTriggerCharacterInfo(e,t)),!(d!=null&&d.word)&&!c||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let u;const h=e.getValueInRange(new k(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,d))){const g=new oz(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),u=this._lastResult}else{const g=yield GM(this._languageFeatureService.completionProvider,e,t,new R0(void 0,void 0,c==null?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let f;g.needsClipboard&&(f=yield this._clipboardService.readText());const m=new Lu(g.items,t.column,new oz(h,0),Ba.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);u=new KP(e,t.lineNumber,d,m,g,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(st.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(k.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))!((i=r.triggerCharacters)===null||i===void 0)&&i.includes(n)&&o.add(r);if(o.size!==0)return{providers:o,ch:n}}};GP=qP([zg(1,ve),zg(2,Od),zg(3,Sk)],GP);let oL=Ug=class{constructor(e,t,i,n){if(++Ug._counter===1){const o=n.createInstance(GP,(r,a)=>{var l;return((l=i.listCodeEditors().find(c=>c.getModel()===a))!==null&&l!==void 0?l:e).getOption(r)});Ug._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Ug._counter===0&&((e=Ug._disposable)===null||e===void 0||e.dispose(),Ug._disposable=void 0)}};oL._counter=0,oL=Ug=qP([zg(1,ve),zg(2,xt),zg(3,Pe)],oL),wt("suggest.inlineCompletionsProvider",oL,0);class FSe extends _e{constructor(){super({id:"editor.action.forceRetokenize",label:p("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new Xn;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}se(FSe);class rL extends So{constructor(){super({id:rL.ID,title:{value:p({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const t=!Gf.getTabFocusMode();Gf.setTabFocusMode(t),es(t?p("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):p("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}rL.ID="editor.action.toggleTabFocusMode",Xt(rL);var BSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},WSe=function(s,e){return function(t,i){e(t,i,s)}};let ZP=class extends V{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var o;super(),this._link=t,this._enabled=!0,this.el=X(e,te("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new lt(this.el,"click")),a=this._register(new lt(this.el,"keypress")),l=ge.chain(a.event,u=>u.map(h=>new jt(h)).filter(h=>h.keyCode===3)),d=this._register(new lt(this.el,$t.Tap)).event;this._register(zt.addTarget(this.el));const c=ge.any(r.event,l,d);this._register(c(u=>{this.enabled&&(Xe.stop(u,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};ZP=BSe([WSe(3,ao)],ZP);var Gz=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Zz=function(s,e){return function(t,i){e(t,i,s)}};const VSe=26;let YP=class extends V{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(XP))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,VSe)}};YP=Gz([Zz(1,Pe)],YP);let XP=class extends V{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Vd,{}),this.element=te("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=te("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){bn(this.element)}show(e){bn(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=X(this.element,te("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(te(`div${Te.asCSSSelector(e.icon)}`));const n=X(this.element,te("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=X(this.element,te("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(ZP,this.messageActionsContainer,Object.assign(Object.assign({},r),{tabIndex:-1}),{}));const o=X(this.element,te("div.action-container"));this.actionBar=this._register(new gr(o)),this.actionBar.push(this._register(new ys("banner.close","Close Banner",Te.asClassName(x7),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};XP=Gz([Zz(0,Pe)],XP);var QP=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},$m=function(s,e){return function(t,i){e(t,i,s)}},rs=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const HSe=xi("extensions-warning-message",re.warning,p("warningIcon","Icon shown with a warning message in the extensions editor."));let zm=class extends V{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;const r=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount);let a;if(o.nonBasicAsciiCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new jm};else if(o.ambiguousCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Vu};else if(o.invisibleCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Um};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:HSe,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(YP,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(i.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=$Se(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?fG:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new JP(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new zSe(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};zm.ID="editor.contrib.unicodeHighlighter",zm=QP([$m(1,Br),$m(2,B9),$m(3,Pe)],zm);function $Se(s,e){return{nonBasicASCII:e.nonBasicASCII===Co?!s:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Co?!s:e.includeComments,includeStrings:e.includeStrings===Co?!s:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let JP=class extends V{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Ot(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:aL.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!$T(t,e))return null;const i=t.getValueInRange(e.range);return{reason:Yz(i,this._options),inComment:zT(t,e),inString:UT(t,e)}}};JP=QP([$m(3,Br)],JP);class zSe extends V{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Ot(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const o=sI.computeUnicodeHighlights(this._model,this._options,n);for(const r of o.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||o.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:aL.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return $T(t,e)?{reason:Yz(i,this._options),inComment:zT(t,e),inString:UT(t,e)}:null}}let eO=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(zm.ID);if(!n)return[];const o=[],r=new Set;let a=300;for(const l of t){const d=n.getDecorationInfo(l);if(!d)continue;const u=i.getValueInRange(l.range).codePointAt(0),h=iO(u);let g;switch(d.reason.kind){case 0:{x_(d.reason.confusableWith)?g=p("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,iO(d.reason.confusableWith.codePointAt(0))):g=p("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,iO(d.reason.confusableWith.codePointAt(0)));break}case 1:g=p("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:g=p("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(r.has(g))continue;r.add(g);const f={codePoint:u,reason:d.reason,inComment:d.inComment,inString:d.inString},m=p("unicodeHighlight.adjustSettings","Adjust settings"),_=`command:${nC.ID}?${encodeURIComponent(JSON.stringify(f))}`,b=new Vn("",!0).appendMarkdown(g).appendText(" ").appendLink(_,m);o.push(new Ia(this,l.range,[b],!1,a++))}return o}renderHoverParts(e,t){return yH(e,t,this._editor,this._languageService,this._openerService)}};eO=QP([$m(1,ii),$m(2,ao)],eO);function tO(s){return`U+${s.toString(16).padStart(4,"0")}`}function iO(s){let e=`\`${tO(s)}\``;return Ya.isInvisibleCharacter(s)||(e+=` "${`${USe(s)}`}"`),e}function USe(s){return s===96?"`` ` ``":"`"+String.fromCodePoint(s)+"`"}function Yz(s,e){return sI.computeUnicodeHighlightReason(s,e)}class aL{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=Ke.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}aL.instance=new aL;class jSe extends _e{constructor(){super({id:Vu.ID,label:p("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,i){return rs(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(dt);n&&this.runAction(n)})}runAction(e){return rs(this,void 0,void 0,function*(){yield e.updateValue(Ps.includeComments,!1,2)})}}class qSe extends _e{constructor(){super({id:Vu.ID,label:p("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,i){return rs(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(dt);n&&this.runAction(n)})}runAction(e){return rs(this,void 0,void 0,function*(){yield e.updateValue(Ps.includeStrings,!1,2)})}}class Vu extends _e{constructor(){super({id:Vu.ID,label:p("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,i){return rs(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(dt);n&&this.runAction(n)})}runAction(e){return rs(this,void 0,void 0,function*(){yield e.updateValue(Ps.ambiguousCharacters,!1,2)})}}Vu.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Um extends _e{constructor(){super({id:Um.ID,label:p("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,i){return rs(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(dt);n&&this.runAction(n)})}runAction(e){return rs(this,void 0,void 0,function*(){yield e.updateValue(Ps.invisibleCharacters,!1,2)})}}Um.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class jm extends _e{constructor(){super({id:jm.ID,label:p("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,i){return rs(this,void 0,void 0,function*(){const n=e==null?void 0:e.get(dt);n&&this.runAction(n)})}runAction(e){return rs(this,void 0,void 0,function*(){yield e.updateValue(Ps.nonBasicASCII,!1,2)})}}jm.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class nC extends _e{constructor(){super({id:nC.ID,label:p("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,i){return rs(this,void 0,void 0,function*(){const{codePoint:n,reason:o,inString:r,inComment:a}=i,l=String.fromCodePoint(n),d=e.get(xa),c=e.get(dt);function u(f){return Ya.isInvisibleCharacter(f)?p("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",tO(f)):p("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${tO(f)} "${l}"`)}const h=[];if(o.kind===0)for(const f of o.notAmbiguousInLocales)h.push({label:p("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',f),run:()=>rs(this,void 0,void 0,function*(){GSe(c,[f])})});if(h.push({label:u(n),run:()=>KSe(c,[n])}),a){const f=new jSe;h.push({label:f.label,run:()=>rs(this,void 0,void 0,function*(){return f.runAction(c)})})}else if(r){const f=new qSe;h.push({label:f.label,run:()=>rs(this,void 0,void 0,function*(){return f.runAction(c)})})}if(o.kind===0){const f=new Vu;h.push({label:f.label,run:()=>rs(this,void 0,void 0,function*(){return f.runAction(c)})})}else if(o.kind===1){const f=new Um;h.push({label:f.label,run:()=>rs(this,void 0,void 0,function*(){return f.runAction(c)})})}else if(o.kind===2){const f=new jm;h.push({label:f.label,run:()=>rs(this,void 0,void 0,function*(){return f.runAction(c)})})}else ZSe(o);const g=yield d.pick(h,{title:p("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});g&&(yield g.run())})}}nC.ID="editor.action.unicodeHighlight.showExcludeOptions";function KSe(s,e){return rs(this,void 0,void 0,function*(){const t=s.getValue(Ps.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;yield s.updateValue(Ps.allowedCharacters,i,2)})}function GSe(s,e){var t;return rs(this,void 0,void 0,function*(){const i=(t=s.inspect(Ps.allowedLocales).user)===null||t===void 0?void 0:t.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const o of e)n[o]=!0;yield s.updateValue(Ps.allowedLocales,n,2)})}function ZSe(s){throw new Error(`Unexpected value: ${s}`)}se(Vu),se(Um),se(jm),se(nC),wt(zm.ID,zm,1),xg.register(eO);var YSe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Xz=function(s,e){return function(t,i){e(t,i,s)}},XSe=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Qz="ignoreUnusualLineTerminators";function QSe(s,e,t){s.setModelProperty(e.uri,Qz,t)}function JSe(s,e){return s.getModelProperty(e.uri,Qz)}let sC=class extends V{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return XSe(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||JSe(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=yield this._dialogService.confirm({title:p("unusualLineTerminators.title","Unusual Line Terminators"),message:p("unusualLineTerminators.message","Detected unusual line terminators"),detail:p("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",cr(e.uri)),primaryButton:p({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:p("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){QSe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};sC.ID="editor.contrib.unusualLineTerminatorsDetector",sC=YSe([Xz(1,rv),Xz(2,xt)],sC),wt(sC.ID,sC,1);var exe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Jz=function(s,e){return function(t,i){e(t,i,s)}},nO;const lL=new fe("hasWordHighlights",!1);function eU(s,e,t,i){const n=s.ordered(e);return p5(n.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,i)).then(void 0,Oi)),Zn)}class tU{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Gi(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new k(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let d=0,c=i.length;!l&&d<c;d++){const u=i.getRange(d);u&&u.startLineNumber===n&&u.startColumn<=o&&u.endColumn>=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class txe extends tU{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return eU(this._providers,e,t.getPosition(),n).then(o=>o||[])}}class ixe extends tU{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return bc(250,n).then(()=>{if(!t.isEmpty())return[];const o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:v_.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function nxe(s,e,t,i){return s.has(e)?new txe(e,t,i,s):new ixe(e,t,i)}el("_executeDocumentHighlights",(s,e,t)=>{const i=s.get(ve);return eU(i.documentHighlightProvider,e,t,st.None)});class sxe{constructor(e,t,i,n){this.toUnhook=new Q,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=i,this._hasWordHighlights=lL.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(o)})),this.toUnhook.add(e.onDidChangeModelContent(o=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{const r=this.editor.getOption(80);this.occurrencesHighlight!==r&&(this.occurrencesHighlight=r,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(k.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);es(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);es(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,i=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){this._stopAll();return}const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const r=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=nxe(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(129)),this.workerRequest.result.then(a=>{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},je)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Iye(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let jg=nO=class extends V{static get(e){return e.getContribution(nO.ID)}constructor(e,t,i){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const n=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new sxe(e,i.documentHighlightProvider,()=>nt.map(this.linkedContributions,o=>o.wordHighlighter),t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};jg.ID="editor.contrib.wordHighlighter",jg=nO=exe([Jz(1,Be),Jz(2,ve)],jg);class iU extends _e{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=jg.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class oxe extends iU{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:lL,kbOpts:{kbExpr:I.editorTextFocus,primary:65,weight:100}})}}class rxe extends iU{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:lL,kbOpts:{kbExpr:I.editorTextFocus,primary:1089,weight:100}})}}class axe extends _e{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:lL.toNegated(),kbOpts:{kbExpr:I.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=jg.get(t);n&&n.restoreViewState(!0)}}wt(jg.ID,jg,0),se(oxe),se(rxe),se(axe);class dL extends ln{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=nr(t.getOption(129)),o=t.getModel(),a=t.getSelections().map(l=>{const d=new P(l.positionLineNumber,l.positionColumn),c=this._move(n,o,d,this._wordNavigationType);return this._moveTo(l,c,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>bt.fromModelSelection(l))),a.length===1){const l=new P(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new ye(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ye(t.lineNumber,t.column,t.lineNumber,t.column)}}class Hu extends dL{_move(e,t,i,n){return kt.moveWordLeft(e,t,i,n)}}class $u extends dL{_move(e,t,i,n){return kt.moveWordRight(e,t,i,n)}}class lxe extends Hu{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class dxe extends Hu{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class cxe extends Hu{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Y.and(I.textInputFocus,(e=Y.and(rb,pS))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class uxe extends Hu{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class hxe extends Hu{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class gxe extends Hu{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Y.and(I.textInputFocus,(e=Y.and(rb,pS))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class fxe extends Hu{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(nr(ta.wordSeparators.defaultValue),t,i,n)}}class pxe extends Hu{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(nr(ta.wordSeparators.defaultValue),t,i,n)}}class mxe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class _xe extends $u{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Y.and(I.textInputFocus,(e=Y.and(rb,pS))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class bxe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class vxe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Cxe extends $u{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Y.and(I.textInputFocus,(e=Y.and(rb,pS))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class wxe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class yxe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(nr(ta.wordSeparators.defaultValue),t,i,n)}}class Sxe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(nr(ta.wordSeparators.defaultValue),t,i,n)}}class cL extends ln{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(Ht);if(!t.hasModel())return;const o=nr(t.getOption(129)),r=t.getModel(),a=t.getSelections(),l=t.getOption(6),d=t.getOption(11),c=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(g=>{const f=this._delete({wordSeparators:o,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:d,autoClosingPairs:c,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new On(f,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class sO extends cL{_delete(e,t){const i=kt.deleteWordLeft(e,t);return i||new k(1,1,1,1)}}class oO extends cL{_delete(e,t){const i=kt.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new k(n,o,n,o)}}class xxe extends sO{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:I.writable})}}class kxe extends sO{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:I.writable})}}class Lxe extends sO{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Dxe extends oO{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:I.writable})}}class Exe extends oO{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:I.writable})}}class Ixe extends oO{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Txe extends _e{constructor(){super({id:"deleteInsideWord",precondition:I.writable,label:p("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=nr(t.getOption(129)),o=t.getModel(),a=t.getSelections().map(l=>{const d=kt.deleteInsideWord(n,o,l);return new On(d,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}ae(new lxe),ae(new dxe),ae(new cxe),ae(new uxe),ae(new hxe),ae(new gxe),ae(new mxe),ae(new _xe),ae(new bxe),ae(new vxe),ae(new Cxe),ae(new wxe),ae(new fxe),ae(new pxe),ae(new yxe),ae(new Sxe),ae(new xxe),ae(new kxe),ae(new Lxe),ae(new Dxe),ae(new Exe),ae(new Ixe),se(Txe);class Nxe extends cL{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=O1.deleteWordPartLeft(e);return i||new k(1,1,1,1)}}class Axe extends cL{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:I.writable,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=O1.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new k(n,o,n,o)}}class nU extends dL{_move(e,t,i,n){return O1.moveWordPartLeft(e,t,i)}}class Rxe extends nU{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}gt.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Mxe extends nU{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}gt.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class sU extends dL{_move(e,t,i,n){return O1.moveWordPartRight(e,t,i)}}class Pxe extends sU{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class Oxe extends sU{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ae(new Nxe),ae(new Axe),ae(new Rxe),ae(new Mxe),ae(new Pxe),ae(new Oxe);class rO extends V{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=ho.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new Vn(p("editor.simple.readonly","Cannot edit in read-only input")):t=new Vn(p("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}rO.ID="editor.contrib.readOnlyMessageController",wt(rO.ID,rO,2);class aO extends V{constructor(e){super(),this.editor=e,this.widget=null,Jr&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new uL(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}aO.ID="editor.contrib.iPadShowKeyboard";class uL extends V{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(j(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(j(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return uL.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}uL.ID="editor.contrib.ShowKeyboardWidget",wt(aO.ID,aO,3);var Fxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},oU=function(s,e){return function(t,i){e(t,i,s)}},lO;let qm=lO=class extends V{static get(e){return e.getContribution(lO.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(ci.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new hL(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};qm.ID="editor.contrib.inspectTokens",qm=lO=Fxe([oU(1,Mo),oU(2,ii)],qm);class Bxe extends _e{constructor(){super({id:"editor.action.inspectTokens",label:yN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=qm.get(t);i==null||i.launch()}}function Wxe(s){let e="";for(let t=0,i=s.length;t<i;t++){const n=s.charCodeAt(t);switch(n){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(n)}}return e}function Vxe(s,e){const t=ci.get(e);if(t)return t;const i=s.encodeLanguageId(e);return{getInitialState:()=>Uf,tokenize:(n,o,r)=>bI(e,r),tokenizeEncoded:(n,o,r)=>l1(i,r)}}class hL extends V{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=Vxe(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return hL._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const d=t.tokens1[l];if(e.column-1>=d.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const o=this._model.getLineContent(e.lineNumber);let r="";if(i<t.tokens1.length){const l=t.tokens1[i].offset,d=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;r=o.substring(l,d)}vn(this._domNode,te("h2.tm-token",void 0,Wxe(r),te("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),X(this._domNode,te("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;X(this._domNode,te("table.tm-metadata-table",void 0,te("tbody",void 0,te("tr",void 0,te("td.tm-metadata-key",void 0,"language"),te("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"token type"),te("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"font style"),te("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"foreground"),te("td.tm-metadata-value",void 0,`${a?z.Format.CSS.formatHex(a.foreground):"-?-"}`)),te("tr",void 0,te("td.tm-metadata-key",void 0,"background"),te("td.tm-metadata-value",void 0,`${a?z.Format.CSS.formatHex(a.background):"-?-"}`))))),X(this._domNode,te("hr.tokens-inspect-separator")),i<t.tokens1.length&&X(this._domNode,te("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=ci.getColorMap(),i=Mn.getLanguageId(e),n=Mn.getTokenType(e),o=Mn.getFontStyle(e),r=Mn.getForeground(e),a=Mn.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:n,fontStyle:o,foreground:t[r],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}hL._ID="editor.contrib.inspectTokensWidget",wt(qm.ID,qm,4),se(Bxe);var Hxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},rU=function(s,e){return function(t,i){e(t,i,s)}},oC;let gL=oC=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=li.as(sg.Quickaccess)}provide(e){const t=new Q;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(oC.PREFIX.length));n&&n.prefix&&n.prefix!==oC.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==oC.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:p("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}})}};gL.PREFIX="?",gL=oC=Hxe([rU(0,xa),rU(1,Wt)],gL),li.as(sg.Quickaccess).registerQuickAccessProvider({ctor:gL,prefix:"",helpEntries:[{description:SN.helpQuickAccessActionLabel}]});class aU{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new Q;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new mn);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),n}doProvide(e,t){var i;const n=new Q,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){const r={editor:o},a=TW(o);if(a){let l=(i=o.saveViewState())!==null&&i!==void 0?i:void 0;n.add(a.onDidChangeCursorPosition(()=>{var d;l=(d=o.saveViewState())!==null&&d!==void 0?d:void 0})),r.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},n.add(ac(t.onCancellationRequested)(()=>{var d;return(d=r.restoreViewState)===null||d===void 0?void 0:d.call(r)}))}n.add(Fe(()=>this.clearDecorations(o))),n.add(this.provideWithTextEditor(r,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&Nc(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return IW(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:ui(v8),position:Do.Full}}}],[r,a]=i.deltaDecorations(n,o);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class fL extends aU{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=p("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,V.None}provideWithTextEditor(e,t,i){const n=e.editor,o=new Q;o.add(t.onDidAccept(l=>{const[d]=t.selectedItems;if(d){if(!this.isValidLineNumber(n,d.lineNumber))return;this.gotoLocation(e,{range:this.toRange(d.lineNumber,d.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const r=()=>{const l=this.parsePosition(n,t.value.trim().substr(fL.PREFIX.length)),d=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:d}],t.ariaLabel=d,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const c=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(c,0),this.addDecorations(n,c)};r(),o.add(t.onDidChangeValue(()=>r()));const a=TW(n);return a&&a.getOptions().get(67).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(Fe(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?p("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):p("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?p("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):p("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}fL.PREFIX=":";var $xe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},zxe=function(s,e){return function(t,i){e(t,i,s)}};let rC=class extends fL{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};rC=$xe([zxe(0,xt)],rC);let dO=class UK extends _e{constructor(){super({id:UK.ID,label:Py.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(xa).quickAccess.show(rC.PREFIX)}};dO.ID="editor.action.gotoLine",se(dO),li.as(sg.Quickaccess).registerQuickAccessProvider({ctor:rC,prefix:rC.PREFIX,helpEntries:[{description:Py.gotoLineActionLabel,commandId:dO.ID}]});const lU=[void 0,[]];function cO(s,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?Uxe(s,n.values,t,i):dU(s,e,t,i)}function Uxe(s,e,t,i){let n=0;const o=[];for(const r of e){const[a,l]=dU(s,r,t,i);if(typeof a!="number")return lU;n+=a,o.push(...l)}return[n,jxe(o)]}function dU(s,e,t,i){const n=jh(e.original,e.originalLowercase,t,s,s.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],_v(n)]:lU}function jxe(s){const e=s.sort((n,o)=>n.start-o.start),t=[];let i;for(const n of e)!i||!qxe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function qxe(s,e){return!(s.end<e.start||e.end<s.start)}function cU(s){return s.startsWith('"')&&s.endsWith('"')}const uU=" ";function uO(s){typeof s!="string"&&(s="");const e=s.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=hU(s),o=t.indexOf(na)>=0,r=cU(s);let a;const l=s.split(uU);if(l.length>1)for(const d of l){const c=cU(d),{pathNormalized:u,normalized:h,normalizedLowercase:g}=hU(d);h&&(a||(a=[]),a.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:g,expectContiguousMatch:c}))}return{original:s,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function hU(s){let e;Tn?e=s.replace(/\//g,na):e=s.replace(/\\/g,na);const t=ZZ(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function gU(s){return Array.isArray(s)?uO(s.map(e=>e.original).join(uU)):uO(s.original)}var Kxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},fU=function(s,e){return function(t,i){e(t,i,s)}},aC=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Km;let zl=Km=class extends aU{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,p("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),V.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):V.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new Q;return this.provideLabelPick(i,p("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),aC(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||n.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,i,n))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return aC(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new Vw,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(Fe(()=>i.complete(!1))),i.p})}doProvideWithEditorSymbols(e,t,i,n){var o;const r=e.editor,a=new Q;a.add(i.onDidAccept(u=>{const[h]=i.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n);let d;const c=u=>aC(this,void 0,void 0,function*(){d==null||d.dispose(!0),i.busy=!1,d=new Ti(n),i.busy=!0;try{const h=uO(i.value.substr(Km.PREFIX.length).trim()),g=yield this.doGetSymbolPicks(l,h,void 0,d.token);if(n.isCancellationRequested)return;if(g.length>0){if(i.items=g,u&&h.original.length===0){const f=o1(g,m=>!!(m.type!=="separator"&&m.range&&k.containsPosition(m.range.decoration,u)));f&&(i.activeItems=[f])}}else h.original.length>0?this.provideLabelPick(i,p("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,p("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});return a.add(i.onDidChangeValue(()=>c(void 0))),c((o=r.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;u&&u.range&&(r.revealRangeInCenter(u.range.selection,0),this.addDecorations(r,u.range.decoration))})),a}doGetSymbolPicks(e,t,i,n){var o,r;return aC(this,void 0,void 0,function*(){const a=yield e;if(n.isCancellationRequested)return[];const l=t.original.indexOf(Km.SCOPE_PREFIX)===0,d=l?1:0;let c,u;t.values&&t.values.length>1?(c=gU(t.values[0]),u=gU(t.values.slice(1))):c=t;let h;const g=(r=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||r===void 0?void 0:r.call(o);g&&(h=[{iconClass:g==="right"?Te.asClassName(re.splitHorizontal):Te.asClassName(re.splitVertical),tooltip:g==="right"?p("openToSide","Open to the Side"):p("openToBottom","Open to the Bottom")}]);const f=[];for(let b=0;b<a.length;b++){const v=a[b],C=KZ(v.name),w=`$(${dw.toIcon(v.kind).id}) ${C}`,y=w.length-C.length;let L=v.containerName;i!=null&&i.extraContainerLabel&&(L?L=`${i.extraContainerLabel} • ${L}`:L=i.extraContainerLabel);let x,E,T,W;if(t.original.length>d){let F=!1;if(c!==t&&([x,E]=cO(w,Object.assign(Object.assign({},t),{values:void 0}),d,y),typeof x=="number"&&(F=!0)),typeof x!="number"&&([x,E]=cO(w,c,d,y),typeof x!="number"))continue;if(!F&&u){if(L&&u.original.length>0&&([T,W]=cO(L,u)),typeof T!="number")continue;typeof x=="number"&&(x+=T)}}const U=v.tags&&v.tags.indexOf(1)>=0;f.push({index:b,kind:v.kind,score:x,label:w,ariaLabel:zZ(v.name,v.kind),description:L,highlights:U?void 0:{label:E,description:W},range:{selection:k.collapseToStart(v.selectionRange),decoration:v.range},strikethrough:U,buttons:h})}const m=f.sort((b,v)=>l?this.compareByKindAndScore(b,v):this.compareByScore(b,v));let _=[];if(l){let w=function(){v&&typeof b=="number"&&C>0&&(v.label=nh(gO[b]||hO,C))},b,v,C=0;for(const y of m)b!==y.kind?(w(),b=y.kind,C=1,v={type:"separator"},_.push(v)):C++,_.push(y);w()}else m.length>0&&(_=[{label:p("symbols","symbols ({0})",f.length),type:"separator"},...m]);return _})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=gO[e.kind]||hO,n=gO[t.kind]||hO,o=i.localeCompare(n);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return aC(this,void 0,void 0,function*(){const i=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}};zl.PREFIX="@",zl.SCOPE_PREFIX=":",zl.PREFIX_BY_CATEGORY=`${Km.PREFIX}${Km.SCOPE_PREFIX}`,zl=Km=Kxe([fU(0,ve),fU(1,pk)],zl);const hO=p("property","properties ({0})"),gO={5:p("method","methods ({0})"),11:p("function","functions ({0})"),8:p("_constructor","constructors ({0})"),12:p("variable","variables ({0})"),4:p("class","classes ({0})"),22:p("struct","structs ({0})"),23:p("event","events ({0})"),24:p("operator","operators ({0})"),10:p("interface","interfaces ({0})"),2:p("namespace","namespaces ({0})"),3:p("package","packages ({0})"),25:p("typeParameter","type parameters ({0})"),1:p("modules","modules ({0})"),6:p("property","properties ({0})"),9:p("enum","enumerations ({0})"),21:p("enumMember","enumeration members ({0})"),14:p("string","strings ({0})"),0:p("file","files ({0})"),17:p("array","arrays ({0})"),15:p("number","numbers ({0})"),16:p("boolean","booleans ({0})"),18:p("object","objects ({0})"),19:p("key","keys ({0})"),7:p("field","fields ({0})"),13:p("constant","constants ({0})")};var Gxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},fO=function(s,e){return function(t,i){e(t,i,s)}};let pO=class extends zl{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=ge.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};pO=Gxe([fO(0,xt),fO(1,ve),fO(2,pk)],pO);class lC extends _e{constructor(){super({id:lC.ID,label:hv.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:I.hasDocumentSymbolProvider,kbOpts:{kbExpr:I.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(xa).quickAccess.show(zl.PREFIX,{itemActivation:Sa.NONE})}}lC.ID="editor.action.quickOutline",se(lC),li.as(sg.Quickaccess).registerQuickAccessProvider({ctor:pO,prefix:zl.PREFIX,helpEntries:[{description:hv.quickOutlineActionLabel,prefix:zl.PREFIX,commandId:lC.ID},{description:hv.quickOutlineByCategoryActionLabel,prefix:zl.PREFIX_BY_CATEGORY}]});function mO(s,e){return e&&(s.stack||s.stacktrace)?p("stackTrace.format","{0}: {1}",mU(s),pU(s.stack)||pU(s.stacktrace)):mU(s)}function pU(s){return Array.isArray(s)?s.join(`
1124
- `):s}function mU(s){return s.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${s.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",s.message):s.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function _U(s=null,e=!1){if(!s)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){const t=za(s),i=_U(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(bs(s))return s;if(s.detail){const t=s.detail;if(t.error)return mO(t.error,e);if(t.exception)return mO(t.exception,e)}return s.stack?mO(s,e):s.message?s.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function Zxe(s){var e;const t=new Map;for(const i of s)t.set(i,((e=t.get(i))!==null&&e!==void 0?e:0)+1);return t}class dC{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,n);d>0&&o.push({key:r,score:d})}}return o}static termFrequencies(e){return Zxe(dC.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(n.length>1)for(const o of n)o.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(o)&&(yield t(o))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const n=[];for(const o of i.textChunks){const r=dC.termFrequencies(o);for(const a of r.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);n.push({text:o,tf:r})}this.chunkCount+=n.length,this.documents.set(i.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const o=this.chunkOccurrences.get(n);if(typeof o=="number"){const r=o-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,r]of Object.entries(t)){const a=e.tf.get(o);if(!a)continue;let l=i.get(o);typeof l!="number"&&(l=this.computeIdf(o),i.set(o,l));const d=a*l;n+=d*r}return n}computeEmbedding(e){const t=dC.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const o=this.computeIdf(i);o>0&&(t[i]=n*o)}return t}}function Yxe(s){var e,t;const i=s.slice(0);i.sort((o,r)=>r.score-o.score);const n=(t=(e=i[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(n>0)for(const o of i)o.score/=n;return i}var cC=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Gm;(function(s){s[s.NO_ACTION=0]="NO_ACTION",s[s.CLOSE_PICKER=1]="CLOSE_PICKER",s[s.REFRESH_PICKER=2]="REFRESH_PICKER",s[s.REMOVE_ITEM=3]="REMOVE_ITEM"})(Gm||(Gm={}));function _O(s){const e=s;return Array.isArray(e.items)}function bU(s){const e=s;return!!e.picks&&e.additionalPicks instanceof Promise}class Xxe extends V{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new Q;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const a=o.add(new mn),l=()=>cC(this,void 0,void 0,function*(){const d=a.value=new Q;r==null||r.dispose(!0),e.busy=!1,r=new Ti(t);const c=r.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,d,c,i),g=(m,_)=>{var b;let v,C;if(_O(m)?(v=m.items,C=m.active):v=m,v.length===0){if(_)return!1;(u.length>0||e.hideInput)&&(!((b=this.options)===null||b===void 0)&&b.noResultsPick)&&(g_(this.options.noResultsPick)?v=[this.options.noResultsPick(u)]:v=[this.options.noResultsPick])}return e.items=v,C&&(e.activeItems=[C]),!0},f=m=>cC(this,void 0,void 0,function*(){let _=!1,b=!1;yield Promise.all([cC(this,void 0,void 0,function*(){typeof m.mergeDelay=="number"&&(yield bc(m.mergeDelay),c.isCancellationRequested)||b||(_=g(m.picks,!0))}),cC(this,void 0,void 0,function*(){e.busy=!0;try{const v=yield m.additionalPicks;if(c.isCancellationRequested)return;let C,w;_O(m.picks)?(C=m.picks.items,w=m.picks.active):C=m.picks;let y,L;if(_O(v)?(y=v.items,L=v.active):y=v,y.length>0||!_){let x;if(!w&&!L){const E=e.activeItems[0];E&&C.indexOf(E)!==-1&&(x=E)}g({items:[...C,...y],active:w||L||x})}}finally{c.isCancellationRequested||(e.busy=!1),b=!0}})])});if(h!==null)if(bU(h))yield f(h);else if(!(h instanceof Promise))g(h);else{e.busy=!0;try{const m=yield h;if(c.isCancellationRequested)return;bU(m)?yield f(m):g(m)}finally{c.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(d=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(d.inBackground||e.hide(),c.accept(e.keyMods,d))})),o.add(e.onDidTriggerItemButton(({button:d,item:c})=>cC(this,void 0,void 0,function*(){var u,h;if(typeof c.trigger=="function"){const g=(h=(u=c.buttons)===null||u===void 0?void 0:u.indexOf(d))!==null&&h!==void 0?h:-1;if(g>=0){const f=c.trigger(g,e.keyMods),m=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(m){case Gm.NO_ACTION:break;case Gm.CLOSE_PICKER:e.hide();break;case Gm.REFRESH_PICKER:l();break;case Gm.REMOVE_ITEM:{const _=e.items.indexOf(c);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(y=>y!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),o}}var vU=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},qg=function(s,e){return function(t,i){e(t,i,s)}},bO=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Kg,nn;let Gg=Kg=class extends Xxe{constructor(e,t,i,n,o,r){super(Kg.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(Zg)),this.options=e}_getPicks(e,t,i,n){var o,r,a,l;return bO(this,void 0,void 0,function*(){const d=yield this.getCommandPicks(i);if(i.isCancellationRequested)return[];const c=ac(()=>{const b=new dC;b.updateDocuments(d.map(C=>({key:C.commandId,textChunks:[C.label+(C.commandAlias?` ${C.commandAlias}`:"")]})));const v=b.calculateScores(e,i);return Yxe(v).filter(C=>C.score>Kg.TFIDF_THRESHOLD).slice(0,Kg.TFIDF_MAX_RESULTS)}),u=[];for(const b of d){const v=(o=Kg.WORD_FILTER(e,b.label))!==null&&o!==void 0?o:void 0,C=b.commandAlias&&(r=Kg.WORD_FILTER(e,b.commandAlias))!==null&&r!==void 0?r:void 0;if(v||C)b.highlights={label:v,detail:this.options.showAlias?C:void 0},u.push(b);else if(e===b.commandId)u.push(b);else if(e.length>=3){const w=c();if(i.isCancellationRequested)return[];const y=w.find(L=>L.key===b.commandId);y&&(b.tfIdfScore=y.score,u.push(b))}}const h=new Map;for(const b of u){const v=h.get(b.label);v?(b.description=b.commandId,v.description=v.commandId):h.set(b.label,b)}u.sort((b,v)=>{if(b.tfIdfScore&&v.tfIdfScore)return b.tfIdfScore===v.tfIdfScore?b.label.localeCompare(v.label):v.tfIdfScore-b.tfIdfScore;if(b.tfIdfScore)return 1;if(v.tfIdfScore)return-1;const C=this.commandsHistory.peek(b.commandId),w=this.commandsHistory.peek(v.commandId);if(C&&w)return C>w?-1:1;if(C)return-1;if(w)return 1;if(this.options.suggestedCommandIds){const y=this.options.suggestedCommandIds.has(b.commandId),L=this.options.suggestedCommandIds.has(v.commandId);if(y&&L)return 0;if(y)return-1;if(L)return 1}return b.label.localeCompare(v.label)});const g=[];let f=!1,m=!0,_=!!this.options.suggestedCommandIds;for(let b=0;b<u.length;b++){const v=u[b];b===0&&this.commandsHistory.peek(v.commandId)&&(g.push({type:"separator",label:p("recentlyUsed","recently used")}),f=!0),m&&v.tfIdfScore!==void 0&&(g.push({type:"separator",label:p("suggested","similar commands")}),m=!1),_&&v.tfIdfScore===void 0&&!this.commandsHistory.peek(v.commandId)&&(!((a=this.options.suggestedCommandIds)===null||a===void 0)&&a.has(v.commandId))&&(g.push({type:"separator",label:p("commonlyUsed","commonly used")}),f=!0,_=!1),f&&v.tfIdfScore===void 0&&!this.commandsHistory.peek(v.commandId)&&!(!((l=this.options.suggestedCommandIds)===null||l===void 0)&&l.has(v.commandId))&&(g.push({type:"separator",label:p("morecCommands","other commands")}),f=!1),g.push(this.toCommandPick(v,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:g,additionalPicks:bO(this,void 0,void 0,function*(){var b;const v=yield this.getAdditionalCommandPicks(d,u,e,i);if(i.isCancellationRequested)return[];const C=v.map(w=>this.toCommandPick(w,n));return m&&((b=C[0])===null||b===void 0?void 0:b.type)!=="separator"&&C.unshift({type:"separator",label:p("suggested","similar commands")}),C})}:g})}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?p("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:()=>bO(this,void 0,void 0,function*(){var o,r;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{!((r=e.args)===null||r===void 0)&&r.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(a){ia(a)||this.dialogService.error(p("canNotRun","Command '{0}' resulted in an error",e.label),_U(a))}})})}};Gg.PREFIX=">",Gg.TFIDF_THRESHOLD=.5,Gg.TFIDF_MAX_RESULTS=5,Gg.WORD_FILTER=EN(mv,ede,U9),Gg=Kg=vU([qg(1,Pe),qg(2,Wt),qg(3,pi),qg(4,xo),qg(5,rv)],Gg);let Zg=nn=class extends V{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=nn.getConfiguredCommandHistoryLength(this.configurationService),nn.cache&&nn.cache.limit!==this.configuredCommandsHistoryLength&&(nn.cache.limit=this.configuredCommandsHistoryLength,nn.saveState(this.storageService)))}load(){const e=this.storageService.get(nn.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=nn.cache=new Sc(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,r)=>o.value-r.value),n.forEach(o=>i.set(o.key,o.value))}nn.counter=this.storageService.getNumber(nn.PREF_KEY_COUNTER,0,nn.counter)}push(e){nn.cache&&(nn.cache.set(e,nn.counter++),nn.saveState(this.storageService))}peek(e){var t;return(t=nn.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!nn.cache)return;const t={usesLRU:!0,entries:[]};nn.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(nn.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(nn.PREF_KEY_COUNTER,nn.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const o=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof o=="number"?o:nn.DEFAULT_COMMANDS_HISTORY_LENGTH}};Zg.DEFAULT_COMMANDS_HISTORY_LENGTH=50,Zg.PREF_KEY_CACHE="commandPalette.mru.cache",Zg.PREF_KEY_COUNTER="commandPalette.mru.counter",Zg.counter=1,Zg=nn=vU([qg(0,Fr),qg(1,dt)],Zg);class Qxe extends Gg{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:BN(i.label)||i.id});return t}}var Jxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Zm=function(s,e){return function(t,i){e(t,i,s)}},CU=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let uC=class extends Qxe{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}getCommandPicks(){return CU(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return CU(this,void 0,void 0,function*(){return[]})}};uC=Jxe([Zm(0,Pe),Zm(1,xt),Zm(2,Wt),Zm(3,pi),Zm(4,xo),Zm(5,rv)],uC);class hC extends _e{constructor(){super({id:hC.ID,label:Oy.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(xa).quickAccess.show(uC.PREFIX)}}hC.ID="editor.action.quickCommand",se(hC),li.as(sg.Quickaccess).registerQuickAccessProvider({ctor:uC,prefix:uC.PREFIX,helpEntries:[{description:Oy.quickCommandHelp,commandId:hC.ID}]});var eke=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ym=function(s,e){return function(t,i){e(t,i,s)}};let vO=class extends _u{constructor(e,t,i,n,o,r,a){super(!0,e,t,i,n,o,r,a)}};vO=eke([Ym(1,Be),Ym(2,xt),Ym(3,Pi),Ym(4,Pe),Ym(5,Fr),Ym(6,dt)],vO),wt(_u.ID,vO,4);class tke extends _e{constructor(){super({id:"editor.action.toggleHighContrast",label:xN.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Mo),n=i.getColorTheme();_a(n.type)?(i.setTheme(this._originalThemeName||(sp(n.type)?Xp:Pd)),this._originalThemeName=null):(i.setTheme(sp(n.type)?rg:ag),this._originalThemeName=n.themeName)}}se(tke);function ike(s){return new Worker("/assets/json.worker-tBSBokI0.js",{name:s==null?void 0:s.name})}self.MonacoEnvironment={getWorker(){return new ike}};const nke={name:"PaasCodeEditor",props:{modelValue:{default:""},height:{default:400},config:{}},setup(s,{emit:e}){let t=null;const{proxy:i}=H.getCurrentInstance();return H.watch(()=>s.modelValue,n=>{n!==(t==null?void 0:t.getValue())&&t.setValue(n)}),H.onMounted(()=>{t=PW.create(i.$refs.editContainer,{value:s.modelValue,...s.config}),t.onDidChangeModelContent(()=>{const n=t==null?void 0:t.getValue();e("update:modelValue",n)}),window.addEventListener("resize",function(){t.layout()})}),{}}};function ske(s,e,t,i,n,o){return H.openBlock(),H.createElementBlock("div",{ref:"editContainer",style:H.normalizeStyle("width: 100%;height:"+this.height+"px;")},null,4)}const oke=$i(nke,[["render",ske]]),rke={name:"PaasDate",props:{multiple:{default:!1},disabled:{default:!1},value:"",format:{default:"YYYY-MM-DD"},type:{default:"date"}},data(){return{}},methods:{input(s){this.$emit("input",s)},change(s){this.$emit("change",s)}}};function ake(s,e,t,i,n,o){const r=H.resolveComponent("DatePicker");return H.openBlock(),H.createBlock(r,{value:t.value,format:t.format,onChange:o.change,onInput:o.input,disabled:t.disabled,type:t.type},null,8,["value","format","onChange","onInput","disabled","type"])}const lke=$i(rke,[["render",ake]]),dke={name:"PaasIndexBar",computed:{current(){return this.$store.menus.current},menuCache(){return this.$store.menus.cache}},data(){return{selected:"",opened:!1,titles:[{title:this.$store.menus.title}]}},methods:{refresh(){this.$bus.emit("ReloadData")},upClick(){console.log(this.menuCache);let s=this.menuCache.findIndex(n=>n.url==this.current);var e=this.menuCache[s-1];if(e){var t=e.url,i=e.title;this.$store.setCurrent(t),this.$store.setTitle(i),this.$router.push(t)}},downClick(){let s=this.menuCache.findIndex(n=>n.url==this.current);var e=this.menuCache[s+1];if(e){var t=e.url,i=e.title;this.$store.setCurrent(t),this.$store.setTitle(i),this.$router.push(t)}},rightMenu(){this.opened=!0},tabChange(s){s&&(this.$store.setCurrent(url),this.$store.setTitle(title),this.$router.push(s.url))},closeTab(s){console.log(s)}}},cke={class:"h-panel-bar h-panel-no-border"},uke={class:"h-panel h-panel-no-border"},hke=H.createElementVNode("div",{class:"h-panel-bar"},[H.createElementVNode("span",{class:"h-panel-title"},"历史记录")],-1),gke={class:"h-panel-body"};function fke(s,e,t,i,n,o){const r=H.resolveComponent("Breadcrumb"),a=H.resolveComponent("Tabs"),l=H.resolveComponent("Modal");return H.openBlock(),H.createElementBlock("div",cke,[H.createVNode(r,{datas:n.titles},null,8,["datas"]),H.createVNode(l,{modelValue:n.opened,"onUpdate:modelValue":e[1]||(e[1]=d=>n.opened=d),type:"drawer-right",hasMask:!0},{default:H.withCtx(()=>[H.createElementVNode("div",uke,[hke,H.createElementVNode("div",gke,[H.withDirectives(H.createVNode(a,{datas:o.menuCache,"class-name":"h-tabs-menu",modelValue:n.selected,"onUpdate:modelValue":e[0]||(e[0]=d=>n.selected=d),onChange:o.tabChange,keyName:"url"},null,8,["datas","modelValue","onChange"]),[[H.vShow,o.menuCache.length>0]])])])]),_:1},8,["modelValue"])])}const pke=$i(dke,[["render",fke]]),mke={name:"PaasMenu",props:{url:"",disabled:{default:!1},value:"",format:{default:"YYYY-MM-DD"},type:{default:"date"}},computed:{siderCollapsed(){return this.$store.menus.siderCollapsed},current(){return this.$store.menus.current},data(){return this.$store.menus.data}},mounted(){this.$store.loginFlag&&this.data.length==0&&this.$post(this.url).then(s=>{this.initSearch(s.data.data),this.$store.setSearchData(this.searchData),this.$store.setMenuData(s.data.data)})},updated(){this.$refs.menus.select(this.current)},data(){return{searchData:[]}},watch:{$route(){let s=this.$route.path;this.$store.menus.current==s&&this.$refs.menus.select(s)}},methods:{menuSelect(s){this.$store.setCurrent(s.key),this.$store.setTitle(s.title),this.$store.setMenuId(s.id),this.$router.push(s.key),this.$store.setMenuCache({url:s.key,title:s.title})},initSearch(s){s.forEach(e=>{e.children.length>0?(this.searchData.push({label:e.title,isLabel:!0}),this.initSearch(e.children)):this.searchData.push({value:e.key,label:e.title})})}}};function _ke(s,e,t,i,n,o){const r=H.resolveComponent("Menu");return H.openBlock(),H.createBlock(r,{ref:"menus",className:"h-menu-white",datas:o.data,inlineCollapsed:o.siderCollapsed,onSelect:o.menuSelect},null,8,["datas","inlineCollapsed","onSelect"])}const bke=$i(mke,[["render",_ke]]),vke={name:"PaasPageSelect",props:{multiple:{default:!1},disabled:{default:!1},modelValue:{},url:"",vars:{}},computed:{action(){return this.$store.forms.action}},mounted(){this.modelValue&&(this.modelValue instanceof String&&this.modelValue.indexOf(",")!=-1&&(this.modelValue=this.modelValue.split(",")),this.multiple&&this.modelValue instanceof Array?this.selected=this.modelValue:this.selected=[this.modelValue]),this.action!="edit"&&this.action!="see"&&this.loadData()},watch:{vars:{deep:!0,handler(s){s&&(this.selected=[],this.filter="",this.initFlag=!1,this.loadData())}},modelValue:{deep:!0,handler(s){s&&(s instanceof String&&s.indexOf(",")!=-1&&(s=s.split(",")),this.multiple&&s instanceof Array?this.selected=s:this.selected=[this.modelValue],this.initFlag&&(this.initFlag=!1,this.loadData()))}}},data(){return{initFlag:!0,page:1,size:1e3,data:[],selected:[],filter:""}},methods:{searchInput(s){s.length<1||this.search(s)},search(s){this.current=1,this.loadData()},input(s){this.selected=[],this.multiple&&s instanceof Array&&(this.selected=s),this.$emit("update:modelValue",s),this.$emit("input",s)},change(s){let e=new Array;if(this.multiple)for(let t=0;t<s.length;t++)e.push(s[t].value);else s?e=s.value:e="";this.$emit("update:modelValue",e),this.$emit("change",s)},loadData(){this.selected&&this.selected.length>1&&(this.size=200);let s={page:{current:this.page,size:this.size+this.selected.length},label:this.filter,value:this.filter,vars:this.vars,selected:this.selected};this.$post(this.url,s).then(e=>{let t=e.data.data;t&&(this.data=t.rows)})},up(){this.page>1&&(this.page--,this.loadData())},down(){this.page++,this.loadData()}}},Cke={class:"gray-color"};function wke(s,e,t,i,n,o){const r=H.resolveComponent("h-search"),a=H.resolveComponent("Button"),l=H.resolveComponent("Select");return H.openBlock(),H.createBlock(l,{multiple:t.multiple,disabled:t.disabled,"model-value":t.modelValue,datas:n.data,onChange:o.change,onInput:o.input},{top:H.withCtx(()=>[H.createVNode(r,{onSearch:o.search,onInput:o.searchInput,block:"",modelValue:n.filter,"onUpdate:modelValue":e[0]||(e[0]=d=>n.filter=d),height:30,placeholder:"搜索"},null,8,["onSearch","onInput","modelValue"])]),bottom:H.withCtx(()=>[H.createVNode(a,{icon:"h-icon-left","no-border":!0,onClick:o.up},null,8,["onClick"]),H.createElementVNode("span",Cke,H.toDisplayString(n.page),1),H.createVNode(a,{icon:"h-icon-right","no-border":!0,onClick:o.down},null,8,["onClick"])]),_:1},8,["multiple","disabled","model-value","datas","onChange","onInput"])}const yke=$i(vke,[["render",wke]]),Ske={name:"PaasPageTable",props:{checkbox:{default:!1},height:{default:0},radio:{default:!1},border:{default:!0},stripe:{default:!1},params:{},columns:{default:[]},id:{default:"id"},path:""},computed:{queryData(){return this.$store.queryData},current(){return this.$store.menus.current},menuData(){return this.$store.menus.data},menuId(){return this.$store.menus.menuId},buttonProxy(){return this.$store.buttonProxy}},mounted(){this.columns.forEach((s,e)=>{s.render||(this.searchData.push({value:s.prop,label:s.title}),e==0&&(this.searchKey=s.prop))}),this.path?this.url=this.path:this.url=this.$route.path+"/page",this.getMenuButtons(),this.$bus.on("ReloadData",()=>{this.loadData()}),this.selectData=[],this.loadData()},data(){return{url:"",colors:["primary","blue","green","yellow","dark"],buttons:[],loadingFlag:!0,loading:!1,datas:[],searchData:[],searchKey:"",searchVal:"",selectData:[]}},methods:{getColor(s){if(s<this.colors.length)return this.colors[s];if(s>=this.colors.length*4)return this.colors[s-this.colors.length*4];if(s>=this.colors.length*3)return this.colors[s-this.colors.length*3];if(s>=this.colors.length*2)return this.colors[s-this.colors.length*2];if(s>=this.colors.length)return this.colors[s-this.colors.length]},getMenuButtons(){this.$post(this.buttonProxy+"/sysbuttons/getButtons/"+this.menuId).then(s=>{this.buttons=s.data.data})},loadData(){if(this.loadingFlag)this.loadingFlag=!1,setTimeout(()=>{this.loadingFlag=!0},1e3);else return;this.loading=!0,this.$post(this.url,{page:{current:this.$store.page.page,size:this.$store.page.size},queryData:{...this.$store.queryData[this.current],...this.params}}).then(s=>{if(this.loading=!1,s.data==null){this.datas=[],this.$store.page.total=0;return}if(s.data.code!=this.$success&&s.msg!=null){In.message.error(s.msg);return}if(s.data.data){s.data.data.rows!=null?this.datas=s.data.data.rows:this.datas=[],this.$store.page.total=s.data.data.total;return}else this.datas=[],this.$store.page.total=0})},rowSelect(s){this.checkbox&&(this.selectData=s)},trClick(s){this.checkbox||(this.selectData=s)},handle(s){this.$store.setAction(s),this.$store.setSee(!1);var e=this.$parent[s];if(e&&e instanceof Function){e(this.selectData);return}else this[s]?this[s]():console.error("按钮事件方法未找到:",s)},search(s){let e={};this.selectData=[],e[this.searchKey]=s,this.$store.setQueryData(e),this.loadData()},query(){this.$store.setSee(!1),this.$store.setAction("query"),this.$store.setSubTitle("查询"),this.$router.push(this.current+"/query")},add(){let s=this.getColumnId();this.$store.setSee(!1),this.$store.setSubTitle("创建"),s?this.$router.push({path:this.current+"/form",query:{id:s}}):this.$router.push(this.current+"/form")},edit(){let s=this.getColumnId();s!=null&&(this.$store.setSee(!1),this.$store.setSubTitle("编辑"),this.$router.push({path:this.current+"/form",query:{id:s}}))},del(){let s=this.getColumnId();s!=null&&In.confirm({content:"确定删除?",onConfirm:()=>{this.$delete(this.$store.menus.current+"/"+s).then(e=>{let t=e.data;this.$dyAlert(t,!1)})}})},see(){let s=this.getColumnId();s!=null&&(this.$store.setSubTitle("查看"),this.$store.setSee(!0),this.$router.push({path:this.current+"/form",query:{id:s}}))},getColumnId(){let s=this.selectData;if(this.checkbox&&(s=this.selectData[0]),s==null||s.length==0)return this.$store.forms.action!="add"&&In.message.warn("请选中任意列表数据"),null;let e="";return this.id?this.id instanceof Array?(this.id.forEach(t=>{e+=s[t]+"&"}),e=e.substring(0,e.length-1)):e+=s[this.id]:e=s[this.columns[0].prop],e}}},xke={class:"h-panel-bar h-panel-no-border"},kke={class:"h-panel-right"},Lke={class:"h-input-group"},Dke={class:"h-input-addon"},Eke={class:"h-panel-body h-panel-no-border"},Ike={class:"h-panel-bar"};function Tke(s,e,t,i,n,o){const r=H.resolveComponent("Button"),a=H.resolveComponent("Select"),l=H.resolveComponent("Search"),d=H.resolveComponent("Table"),c=H.resolveComponent("Pagination");return H.openBlock(),H.createElementBlock("div",null,[H.createElementVNode("div",xke,[H.createVNode(r,{icon:"h-icon-search",onClick:o.query},{default:H.withCtx(()=>[H.createTextVNode("查询")]),_:1},8,["onClick"]),(H.openBlock(!0),H.createElementBlock(H.Fragment,null,H.renderList(n.buttons,(u,h)=>(H.openBlock(),H.createBlock(r,{key:h,color:o.getColor(h),icon:u.icon,disabled:n.selectData.length==0&&u.state==0,onClick:g=>o.handle(u.tag,u.title)},{default:H.withCtx(()=>[H.createTextVNode(H.toDisplayString(u.title),1)]),_:2},1032,["color","icon","disabled","onClick"]))),128)),H.createElementVNode("div",kke,[H.createElementVNode("div",Lke,[H.createElementVNode("div",Dke,[H.createVNode(a,{datas:n.searchData,deletable:!1,autosize:!0,modelValue:n.searchKey,"onUpdate:modelValue":e[0]||(e[0]=u=>n.searchKey=u),"no-border":!0},null,8,["datas","modelValue"])]),H.createVNode(l,{onSearch:o.search,modelValue:n.searchVal,"onUpdate:modelValue":e[1]||(e[1]=u=>n.searchVal=u),placeholder:"搜索"},null,8,["onSearch","modelValue"])])])]),H.createElementVNode("div",Eke,[H.createVNode(d,{ref:"table",datas:n.datas,checkbox:t.checkbox,"is-select-row":!t.checkbox,height:t.height,radio:t.radio,stripe:t.stripe,loading:n.loading,"select-when-click-tr":"",columns:t.columns,onSelect:o.rowSelect,onTrClick:o.trClick},null,8,["datas","checkbox","is-select-row","height","radio","stripe","loading","columns","onSelect","onTrClick"])]),H.createElementVNode("div",Ike,[H.createVNode(c,{modelValue:s.$store.page,"onUpdate:modelValue":e[2]||(e[2]=u=>s.$store.page=u),align:"right",onChange:o.loadData},null,8,["modelValue","onChange"])])])}const Nke=$i(Ske,[["render",Tke]]),Ake={name:"PaasSelect",props:{multiple:{default:!1},disabled:{default:!1},modelValue:String,params:""},data(){return{data:[]}},mounted(){this.data=this.$store.dicts[this.params]},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function Rke(s,e,t,i,n,o){const r=H.resolveComponent("Select");return H.openBlock(),H.createBlock(r,{datas:n.data,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input,disabled:t.disabled},null,8,["datas","multiple","model-value","onChange","onInput","disabled"])}const Mke=$i(Ake,[["render",Rke]]),Pke={name:"PaasTitleBar",data(){return{titles:[{title:this.$store.menus.title},{title:this.$store.menus.subTitle}]}},methods:{close(){this.$router.back()}}},Oke={class:"h-panel-bar"},Fke={class:"h-panel-right"},Bke=[H.createElementVNode("i",{class:"h-icon-close"},null,-1)];function Wke(s,e,t,i,n,o){const r=H.resolveComponent("Breadcrumb");return H.openBlock(),H.createElementBlock("div",Oke,[H.createVNode(r,{datas:n.titles},null,8,["datas"]),H.createElementVNode("span",Fke,[H.createElementVNode("button",{onClick:e[0]||(e[0]=(...a)=>o.close&&o.close(...a)),class:"h-btn h-btn-no-border h-btn-text-primary",style:{padding:"0px"}},Bke)])])}const Vke=$i(Pke,[["render",Wke]]),Hke={name:"PaasTree",props:{multiple:{default:!1},disabled:{default:!1},modelValue:{},params:{},url:""},data(){return{param:{keyName:"value",titleName:"label",parentName:"supperId",childrenName:"children",dataMode:"list",getTotalDatas:s=>{this.$post(this.url,{page:{current:1,size:1e6},...this.params}).then(e=>{let t=e.data.data.rows;s(t)})}}}},mounted(){},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function $ke(s,e,t,i,n,o){const r=H.resolveComponent("TreePicker");return H.openBlock(),H.createBlock(r,{option:n.param,"model-value":t.modelValue,filterable:!0,onChange:o.change,onInput:o.input,multiple:t.multiple,disabled:t.disabled},null,8,["option","model-value","onChange","onInput","multiple","disabled"])}const zke=$i(Hke,[["render",$ke]]),Uke={name:"PaasUploadModal",props:{url:"",title:"",accept:"",multiple:{default:!1},name:{default:"file"},template:"",params:{default:null},success:{default:"success"}},data(){return{opend:!1,isLoading:!1,file:[],message:""}},methods:{fileChange(){this.message="",this.$refs.inputFile.click()},add(s){this.message="",this.file=s.target.files},confirm(s){if(s.preventDefault(),this.file.length==0)return this.message="未上传任何文件",!1;this.isLoading=!0;let e=new FormData;for(var t=0;t<this.file.length;t++)e.append(this.name,this.file[t]);if(this.params)for(var i in this.params)e.append(i,this.params[i]||"");this.$upload(this.url,e).then(n=>{this.isLoading=!1,n.data.code==this.$success?(In.message.info("上传成功"),this.file=[],this.$bus.emit(this.success,n.data.msg)):In.message.error(n.data.msg),this.message=n.data.msg}).catch(n=>{this.isLoading=!1,this.message=n})},show(){this.file=[],this.message="",this.opend=!0},tempDown(){location.href="/static/excel/"+this.template}}},jke=[H.createElementVNode("div",null,[H.createElementVNode("p",{class:"text-center"},[H.createElementVNode("i",{class:"h-icon-upload blue-color",style:{"font-size":"30px"}})]),H.createElementVNode("p",{class:"text-center"},"点击这里上传")],-1)],qke=["disabled","accept","multiple"],Kke={class:"link"},Gke=H.createElementVNode("div",null,null,-1),Zke={style:{"font-size":"13px",color:"red",float:"left"}};function Yke(s,e,t,i,n,o){const r=H.resolveComponent("h-button"),a=H.resolveComponent("Modal"),l=H.resolveDirective("width");return H.openBlock(),H.createBlock(a,{modelValue:n.opend,"onUpdate:modelValue":e[4]||(e[4]=d=>n.opend=d),"close-on-mask":!1,"has-divider":!0},{header:H.withCtx(()=>[H.createTextVNode(H.toDisplayString(t.title||t.template.substring(0,t.template.indexOf(".")))+"  ",1),t.template!=null?(H.openBlock(),H.createElementBlock("span",{key:0,class:"link",style:{"font-size":"14px"},onClick:e[0]||(e[0]=(...d)=>o.tempDown&&o.tempDown(...d))},"模板下载")):H.createCommentVNode("",!0)]),footer:H.withCtx(()=>[H.createElementVNode("span",Zke,H.toDisplayString(n.message),1),H.createVNode(r,{color:"primary",icon:"h-icon-error",onClick:e[3]||(e[3]=d=>n.opend=!1)},{default:H.withCtx(()=>[H.createTextVNode("关闭")]),_:1}),H.createVNode(r,{color:"blue",icon:"h-icon-upload",loading:n.isLoading,onClick:o.confirm},{default:H.withCtx(()=>[H.createTextVNode("上传")]),_:1},8,["loading","onClick"])]),default:H.withCtx(()=>[H.withDirectives((H.openBlock(),H.createElementBlock("div",null,[H.createElementVNode("div",{class:"h-uploader-browse-button h-uploader-drop-element",style:{position:"relative","z-index":"1"},onClick:e[1]||(e[1]=(...d)=>o.fileChange&&o.fileChange(...d))},jke),H.withDirectives(H.createElementVNode("input",{disabled:n.isLoading,ref:"inputFile",type:"file",accept:t.accept,onChange:e[2]||(e[2]=d=>o.add(d)),multiple:t.multiple},null,40,qke),[[H.vShow,!1]]),H.createElementVNode("ol",null,[(H.openBlock(!0),H.createElementBlock(H.Fragment,null,H.renderList(n.file,(d,c)=>(H.openBlock(),H.createElementBlock("li",{key:c,style:{border:"solid 2px red","border-bottom-width":"2px"}},[H.createElementVNode("span",Kke,H.toDisplayString(d.name),1)]))),128))]),Gke])),[[l,400]])]),_:1},8,["modelValue"])}const Xke=$i(Uke,[["render",Yke]]),Qke={name:"FormDate",props:{label:"",prop:"",type:{default:"text"},single:{default:!1},icon:{default:""},readonly:{default:!1},disabled:{default:!1},modelValue:String,format:{default:"YYYYMMDD"},type:{default:"date"}},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("input",s)},change(s){this.$emit("change",s)}}};function Jke(s,e,t,i,n,o){const r=H.resolveComponent("paas-date"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{readonly:t.readonly,disabled:t.disabled,type:t.type,value:t.modelValue,format:t.format,onChange:o.change,onInput:o.input},null,8,["readonly","disabled","type","value","format","onChange","onInput"])]),_:1},8,["label","prop","icon","single"])}const eLe=$i(Qke,[["render",Jke]]),tLe={name:"FormInput",props:{label:"",prop:"",type:{default:"text"},modelValue:String,single:{default:!1},icon:{default:""},readonly:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{updateValue(s){this.$emit("update:modelValue",s)}}};function iLe(s,e,t,i,n,o){const r=H.resolveComponent("Input"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{type:t.type,value:t.modelValue,onInput:e[0]||(e[0]=l=>o.updateValue(l.target.value)),readonly:o.see||t.readonly},null,8,["type","value","readonly"])]),_:1},8,["label","prop","icon","single"])}const nLe=$i(tLe,[["render",iLe]]),sLe={name:"FormNumberInput",mounted(){console.log(this.modelValue)},props:{label:"",prop:"",type:{default:"text"},value:{},modelValue:{},single:{default:!1},icon:{default:""},readonly:{default:!1},precision:{default:0},max:{},min:{}},computed:{see(){return this.$store.forms.see}},methods:{updateValue(s){console.log(s,this.modelValue),this.$emit("update:modelValue",s)}}};function oLe(s,e,t,i,n,o){const r=H.resolveComponent("NumberInput"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{type:t.type,precision:t.precision,max:t.max,min:t.min,value:t.modelValue,onInput:o.updateValue,readonly:o.see||t.readonly},null,8,["type","precision","max","min","value","onInput","readonly"])]),_:1},8,["label","prop","icon","single"])}const rLe=$i(sLe,[["render",oLe]]),aLe={name:"FormPageSelect",props:{multiple:{default:!1},url:"",of:{},modelValue:String,single:{default:!1},disabled:{default:!1},label:"",prop:""},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s),this.$emit("input",s)},change(s){let e=new Array;if(this.multiple)for(let t=0;t<s.length;t++)e.push(s[t].value);else e=s.value;this.$emit("update:modelValue",e),this.$emit("change",s)}}};function lLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-page-select"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{multiple:t.multiple,disabled:o.see||t.disabled,url:t.url,of:t.of,"model-value":t.modelValue,onInput:o.input,onChange:o.change},null,8,["multiple","disabled","url","of","model-value","onInput","onChange"])]),_:1},8,["label","prop","single"])}const dLe=$i(aLe,[["render",lLe]]),cLe={name:"FormSelect",props:{multiple:{default:!1},single:{default:!1},modelValue:String,params:"",label:"",prop:"",disabled:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function uLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-select"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{params:t.params,disabled:o.see||t.disabled,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input},null,8,["params","disabled","multiple","model-value","onChange","onInput"])]),_:1},8,["label","prop","single"])}const hLe=$i(cLe,[["render",uLe]]),gLe={name:"FormSwitch",props:{label:"",prop:"",value:"",single:{default:!1},icon:{default:""},readonly:{default:!1},single:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{inputEvent(s){this.$emit("input",s)}}},fLe={slot:"open"},pLe={slot:"close"};function mLe(s,e,t,i,n,o){const r=H.resolveComponent("Switch");return H.openBlock(),H.createBlock(r,{value:t.value,"true-value":"1","false-value":"0"},{default:H.withCtx(()=>[H.createElementVNode("span",fLe,H.toDisplayString(t.label),1),H.createElementVNode("span",pLe,H.toDisplayString(t.label),1)]),_:1},8,["value"])}const _Le=$i(gLe,[["render",mLe]]),bLe={name:"FormTree",props:{multiple:{default:!1},single:{default:!1},modelValue:{},params:{},label:"",prop:"",disabled:{default:!1},url:""},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function vLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-tree"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{params:t.params,disabled:o.see||t.disabled,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input,url:t.url},null,8,["params","disabled","multiple","model-value","onChange","onInput","url"])]),_:1},8,["label","prop","single"])}const CLe=$i(bLe,[["render",vLe]]),wLe={name:"FormUpload",props:{url:"",accept:"",multiple:{default:!1},show:{default:!0},name:{default:"file"},single:{default:!1},params:{default:null},success:{default:"success"},value:"",label:"",prop:""},data(){return{cValue:this.value,isLoading:!1,file:[],message:""}},computed:{see(){return this.$store.forms.see}},methods:{fileChange(){this.$refs.inputFile.click()},add(s){this.file=s.target.files;for(var e=new Array,t=0;t<this.file.length;t++)e.push(this.file[t].name);this.cValue=e.join(",")},confirm(s){s.preventDefault(),this.isLoading=!0;let e=new FormData;for(var t=0;t<this.file.length;t++)e.append(this.name,this.file[t]);if(this.params)for(var i in this.params)e.append(i,this.params[i]||"");this.$upload(this.url,e).then(n=>{this.isLoading=!1,n.data.code==this.$success?(In.message.info("上传成功"),this.file=[],this.cValue=n.data.msg,this.$emit("input",this.cValue),this.$bus.emit(this.success,n.data.msg)):In.message.error(n.data.msg)}).catch(n=>{this.isLoading=!1,In.message.error(n)})},updateVal(s){this.$emit("input",s)}}},yLe=["disabled","accept","multiple"],SLe={class:"h-input-group"},xLe={class:"h-input h-input-suffix-icon"};function kLe(s,e,t,i,n,o){const r=H.resolveComponent("Input"),a=H.resolveComponent("h-button"),l=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(l,{label:t.label,single:t.single,prop:t.prop},{default:H.withCtx(()=>[H.withDirectives(H.createElementVNode("input",{disabled:n.isLoading,ref:"inputFile",type:"file",accept:t.accept,onChange:e[0]||(e[0]=d=>o.add(d)),multiple:t.multiple},null,40,yLe),[[H.vShow,!1]]),H.createElementVNode("div",SLe,[H.createElementVNode("div",xLe,[H.createVNode(r,{type:"text",name:t.name,value:n.cValue,disabled:o.see,onInput:e[1]||(e[1]=d=>o.updateVal(d.target.value)),readonly:""},null,8,["name","value","disabled"]),H.withDirectives(H.createElementVNode("i",{class:"h-icon-upload",onClick:e[2]||(e[2]=(...d)=>o.fileChange&&o.fileChange(...d)),style:{cursor:"pointer","padding-right":"5px"}},null,512),[[H.vShow,!o.see]])]),H.createVNode(a,{color:"blue",icon:"h-icon-completed",loading:n.isLoading,onClick:o.confirm,disabled:n.file.length<=0},{default:H.withCtx(()=>[H.createTextVNode("上传")]),_:1},8,["loading","onClick","disabled"])])]),_:1},8,["label","single","prop"])}const LLe=[GK,oke,lke,pke,bke,yke,Nke,Mke,Vke,zke,Xke,eLe,nLe,rLe,dLe,hLe,_Le,CLe,$i(wLe,[["render",kLe]])],DLe={install(s){LLe.forEach(e=>{s.component(e.name,e)})}};/*!-----------------------------------------------------------------------------
1124
+ `):s}function mU(s){return s.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${s.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",s.message):s.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function _U(s=null,e=!1){if(!s)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){const t=za(s),i=_U(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(bs(s))return s;if(s.detail){const t=s.detail;if(t.error)return mO(t.error,e);if(t.exception)return mO(t.exception,e)}return s.stack?mO(s,e):s.message?s.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function Zxe(s){var e;const t=new Map;for(const i of s)t.set(i,((e=t.get(i))!==null&&e!==void 0?e:0)+1);return t}class dC{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,n);d>0&&o.push({key:r,score:d})}}return o}static termFrequencies(e){return Zxe(dC.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(n.length>1)for(const o of n)o.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(o)&&(yield t(o))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const n=[];for(const o of i.textChunks){const r=dC.termFrequencies(o);for(const a of r.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);n.push({text:o,tf:r})}this.chunkCount+=n.length,this.documents.set(i.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const o=this.chunkOccurrences.get(n);if(typeof o=="number"){const r=o-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,r]of Object.entries(t)){const a=e.tf.get(o);if(!a)continue;let l=i.get(o);typeof l!="number"&&(l=this.computeIdf(o),i.set(o,l));const d=a*l;n+=d*r}return n}computeEmbedding(e){const t=dC.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const o=this.computeIdf(i);o>0&&(t[i]=n*o)}return t}}function Yxe(s){var e,t;const i=s.slice(0);i.sort((o,r)=>r.score-o.score);const n=(t=(e=i[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(n>0)for(const o of i)o.score/=n;return i}var cC=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Gm;(function(s){s[s.NO_ACTION=0]="NO_ACTION",s[s.CLOSE_PICKER=1]="CLOSE_PICKER",s[s.REFRESH_PICKER=2]="REFRESH_PICKER",s[s.REMOVE_ITEM=3]="REMOVE_ITEM"})(Gm||(Gm={}));function _O(s){const e=s;return Array.isArray(e.items)}function bU(s){const e=s;return!!e.picks&&e.additionalPicks instanceof Promise}class Xxe extends V{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new Q;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const a=o.add(new mn),l=()=>cC(this,void 0,void 0,function*(){const d=a.value=new Q;r==null||r.dispose(!0),e.busy=!1,r=new Ti(t);const c=r.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,d,c,i),g=(m,_)=>{var b;let v,C;if(_O(m)?(v=m.items,C=m.active):v=m,v.length===0){if(_)return!1;(u.length>0||e.hideInput)&&(!((b=this.options)===null||b===void 0)&&b.noResultsPick)&&(g_(this.options.noResultsPick)?v=[this.options.noResultsPick(u)]:v=[this.options.noResultsPick])}return e.items=v,C&&(e.activeItems=[C]),!0},f=m=>cC(this,void 0,void 0,function*(){let _=!1,b=!1;yield Promise.all([cC(this,void 0,void 0,function*(){typeof m.mergeDelay=="number"&&(yield bc(m.mergeDelay),c.isCancellationRequested)||b||(_=g(m.picks,!0))}),cC(this,void 0,void 0,function*(){e.busy=!0;try{const v=yield m.additionalPicks;if(c.isCancellationRequested)return;let C,w;_O(m.picks)?(C=m.picks.items,w=m.picks.active):C=m.picks;let y,L;if(_O(v)?(y=v.items,L=v.active):y=v,y.length>0||!_){let x;if(!w&&!L){const E=e.activeItems[0];E&&C.indexOf(E)!==-1&&(x=E)}g({items:[...C,...y],active:w||L||x})}}finally{c.isCancellationRequested||(e.busy=!1),b=!0}})])});if(h!==null)if(bU(h))yield f(h);else if(!(h instanceof Promise))g(h);else{e.busy=!0;try{const m=yield h;if(c.isCancellationRequested)return;bU(m)?yield f(m):g(m)}finally{c.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(d=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(d.inBackground||e.hide(),c.accept(e.keyMods,d))})),o.add(e.onDidTriggerItemButton(({button:d,item:c})=>cC(this,void 0,void 0,function*(){var u,h;if(typeof c.trigger=="function"){const g=(h=(u=c.buttons)===null||u===void 0?void 0:u.indexOf(d))!==null&&h!==void 0?h:-1;if(g>=0){const f=c.trigger(g,e.keyMods),m=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(m){case Gm.NO_ACTION:break;case Gm.CLOSE_PICKER:e.hide();break;case Gm.REFRESH_PICKER:l();break;case Gm.REMOVE_ITEM:{const _=e.items.indexOf(c);if(_!==-1){const b=e.items.slice(),v=b.splice(_,1),C=e.activeItems.filter(y=>y!==v[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}}))),o}}var vU=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},qg=function(s,e){return function(t,i){e(t,i,s)}},bO=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Kg,nn;let Gg=Kg=class extends Xxe{constructor(e,t,i,n,o,r){super(Kg.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(Zg)),this.options=e}_getPicks(e,t,i,n){var o,r,a,l;return bO(this,void 0,void 0,function*(){const d=yield this.getCommandPicks(i);if(i.isCancellationRequested)return[];const c=ac(()=>{const b=new dC;b.updateDocuments(d.map(C=>({key:C.commandId,textChunks:[C.label+(C.commandAlias?` ${C.commandAlias}`:"")]})));const v=b.calculateScores(e,i);return Yxe(v).filter(C=>C.score>Kg.TFIDF_THRESHOLD).slice(0,Kg.TFIDF_MAX_RESULTS)}),u=[];for(const b of d){const v=(o=Kg.WORD_FILTER(e,b.label))!==null&&o!==void 0?o:void 0,C=b.commandAlias&&(r=Kg.WORD_FILTER(e,b.commandAlias))!==null&&r!==void 0?r:void 0;if(v||C)b.highlights={label:v,detail:this.options.showAlias?C:void 0},u.push(b);else if(e===b.commandId)u.push(b);else if(e.length>=3){const w=c();if(i.isCancellationRequested)return[];const y=w.find(L=>L.key===b.commandId);y&&(b.tfIdfScore=y.score,u.push(b))}}const h=new Map;for(const b of u){const v=h.get(b.label);v?(b.description=b.commandId,v.description=v.commandId):h.set(b.label,b)}u.sort((b,v)=>{if(b.tfIdfScore&&v.tfIdfScore)return b.tfIdfScore===v.tfIdfScore?b.label.localeCompare(v.label):v.tfIdfScore-b.tfIdfScore;if(b.tfIdfScore)return 1;if(v.tfIdfScore)return-1;const C=this.commandsHistory.peek(b.commandId),w=this.commandsHistory.peek(v.commandId);if(C&&w)return C>w?-1:1;if(C)return-1;if(w)return 1;if(this.options.suggestedCommandIds){const y=this.options.suggestedCommandIds.has(b.commandId),L=this.options.suggestedCommandIds.has(v.commandId);if(y&&L)return 0;if(y)return-1;if(L)return 1}return b.label.localeCompare(v.label)});const g=[];let f=!1,m=!0,_=!!this.options.suggestedCommandIds;for(let b=0;b<u.length;b++){const v=u[b];b===0&&this.commandsHistory.peek(v.commandId)&&(g.push({type:"separator",label:p("recentlyUsed","recently used")}),f=!0),m&&v.tfIdfScore!==void 0&&(g.push({type:"separator",label:p("suggested","similar commands")}),m=!1),_&&v.tfIdfScore===void 0&&!this.commandsHistory.peek(v.commandId)&&(!((a=this.options.suggestedCommandIds)===null||a===void 0)&&a.has(v.commandId))&&(g.push({type:"separator",label:p("commonlyUsed","commonly used")}),f=!0,_=!1),f&&v.tfIdfScore===void 0&&!this.commandsHistory.peek(v.commandId)&&!(!((l=this.options.suggestedCommandIds)===null||l===void 0)&&l.has(v.commandId))&&(g.push({type:"separator",label:p("morecCommands","other commands")}),f=!1),g.push(this.toCommandPick(v,n))}return this.hasAdditionalCommandPicks(e,i)?{picks:g,additionalPicks:bO(this,void 0,void 0,function*(){var b;const v=yield this.getAdditionalCommandPicks(d,u,e,i);if(i.isCancellationRequested)return[];const C=v.map(w=>this.toCommandPick(w,n));return m&&((b=C[0])===null||b===void 0?void 0:b.type)!=="separator"&&C.unshift({type:"separator",label:p("suggested","similar commands")}),C})}:g})}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?p("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:()=>bO(this,void 0,void 0,function*(){var o,r;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{!((r=e.args)===null||r===void 0)&&r.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(a){ia(a)||this.dialogService.error(p("canNotRun","Command '{0}' resulted in an error",e.label),_U(a))}})})}};Gg.PREFIX=">",Gg.TFIDF_THRESHOLD=.5,Gg.TFIDF_MAX_RESULTS=5,Gg.WORD_FILTER=EN(mv,ede,U9),Gg=Kg=vU([qg(1,Pe),qg(2,Wt),qg(3,pi),qg(4,xo),qg(5,rv)],Gg);let Zg=nn=class extends V{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=nn.getConfiguredCommandHistoryLength(this.configurationService),nn.cache&&nn.cache.limit!==this.configuredCommandsHistoryLength&&(nn.cache.limit=this.configuredCommandsHistoryLength,nn.saveState(this.storageService)))}load(){const e=this.storageService.get(nn.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=nn.cache=new Sc(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,r)=>o.value-r.value),n.forEach(o=>i.set(o.key,o.value))}nn.counter=this.storageService.getNumber(nn.PREF_KEY_COUNTER,0,nn.counter)}push(e){nn.cache&&(nn.cache.set(e,nn.counter++),nn.saveState(this.storageService))}peek(e){var t;return(t=nn.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!nn.cache)return;const t={usesLRU:!0,entries:[]};nn.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(nn.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(nn.PREF_KEY_COUNTER,nn.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const o=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof o=="number"?o:nn.DEFAULT_COMMANDS_HISTORY_LENGTH}};Zg.DEFAULT_COMMANDS_HISTORY_LENGTH=50,Zg.PREF_KEY_CACHE="commandPalette.mru.cache",Zg.PREF_KEY_COUNTER="commandPalette.mru.counter",Zg.counter=1,Zg=nn=vU([qg(0,Fr),qg(1,dt)],Zg);class Qxe extends Gg{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:BN(i.label)||i.id});return t}}var Jxe=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Zm=function(s,e){return function(t,i){e(t,i,s)}},CU=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(c){try{d(i.next(c))}catch(u){r(u)}}function l(c){try{d(i.throw(c))}catch(u){r(u)}}function d(c){c.done?o(c.value):n(c.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let uC=class extends Qxe{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}getCommandPicks(){return CU(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return CU(this,void 0,void 0,function*(){return[]})}};uC=Jxe([Zm(0,Pe),Zm(1,xt),Zm(2,Wt),Zm(3,pi),Zm(4,xo),Zm(5,rv)],uC);class hC extends _e{constructor(){super({id:hC.ID,label:Oy.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(xa).quickAccess.show(uC.PREFIX)}}hC.ID="editor.action.quickCommand",se(hC),li.as(sg.Quickaccess).registerQuickAccessProvider({ctor:uC,prefix:uC.PREFIX,helpEntries:[{description:Oy.quickCommandHelp,commandId:hC.ID}]});var eke=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ym=function(s,e){return function(t,i){e(t,i,s)}};let vO=class extends _u{constructor(e,t,i,n,o,r,a){super(!0,e,t,i,n,o,r,a)}};vO=eke([Ym(1,Be),Ym(2,xt),Ym(3,Pi),Ym(4,Pe),Ym(5,Fr),Ym(6,dt)],vO),wt(_u.ID,vO,4);class tke extends _e{constructor(){super({id:"editor.action.toggleHighContrast",label:xN.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Mo),n=i.getColorTheme();_a(n.type)?(i.setTheme(this._originalThemeName||(sp(n.type)?Xp:Pd)),this._originalThemeName=null):(i.setTheme(sp(n.type)?rg:ag),this._originalThemeName=n.themeName)}}se(tke);function ike(s){return new Worker("/assets/json.worker-tBSBokI0.js",{name:s==null?void 0:s.name})}self.MonacoEnvironment={getWorker(){return new ike}};const nke={name:"PaasCodeEditor",props:{modelValue:{default:""},height:{default:400},config:{}},setup(s,{emit:e}){let t=null;const{proxy:i}=H.getCurrentInstance();return H.watch(()=>s.modelValue,n=>{n!==(t==null?void 0:t.getValue())&&t.setValue(n)}),H.onMounted(()=>{t=PW.create(i.$refs.editContainer,{value:s.modelValue,...s.config}),t.onDidChangeModelContent(()=>{const n=t==null?void 0:t.getValue();e("update:modelValue",n)}),window.addEventListener("resize",function(){t.layout()})}),{}},methods:{rollingBottom(){var s=monacoEditor.getModel(),e=s.getLineCount();editor.revealLine(e)}}};function ske(s,e,t,i,n,o){return H.openBlock(),H.createElementBlock("div",{ref:"editContainer",style:H.normalizeStyle("width: 100%;height:"+this.height+"px;")},null,4)}const oke=$i(nke,[["render",ske]]),rke={name:"PaasDate",props:{multiple:{default:!1},disabled:{default:!1},value:"",format:{default:"YYYY-MM-DD"},type:{default:"date"}},data(){return{}},methods:{input(s){this.$emit("input",s)},change(s){this.$emit("change",s)}}};function ake(s,e,t,i,n,o){const r=H.resolveComponent("DatePicker");return H.openBlock(),H.createBlock(r,{value:t.value,format:t.format,onChange:o.change,onInput:o.input,disabled:t.disabled,type:t.type},null,8,["value","format","onChange","onInput","disabled","type"])}const lke=$i(rke,[["render",ake]]),dke={name:"PaasIndexBar",computed:{current(){return this.$store.menus.current},menuCache(){return this.$store.menus.cache}},data(){return{selected:"",opened:!1,titles:[{title:this.$store.menus.title}]}},methods:{refresh(){this.$bus.emit("ReloadData")},upClick(){console.log(this.menuCache);let s=this.menuCache.findIndex(n=>n.url==this.current);var e=this.menuCache[s-1];if(e){var t=e.url,i=e.title;this.$store.setCurrent(t),this.$store.setTitle(i),this.$router.push(t)}},downClick(){let s=this.menuCache.findIndex(n=>n.url==this.current);var e=this.menuCache[s+1];if(e){var t=e.url,i=e.title;this.$store.setCurrent(t),this.$store.setTitle(i),this.$router.push(t)}},rightMenu(){this.opened=!0},tabChange(s){s&&(this.$store.setCurrent(url),this.$store.setTitle(title),this.$router.push(s.url))},closeTab(s){console.log(s)}}},cke={class:"h-panel-bar h-panel-no-border"},uke={class:"h-panel h-panel-no-border"},hke=H.createElementVNode("div",{class:"h-panel-bar"},[H.createElementVNode("span",{class:"h-panel-title"},"历史记录")],-1),gke={class:"h-panel-body"};function fke(s,e,t,i,n,o){const r=H.resolveComponent("Breadcrumb"),a=H.resolveComponent("Tabs"),l=H.resolveComponent("Modal");return H.openBlock(),H.createElementBlock("div",cke,[H.createVNode(r,{datas:n.titles},null,8,["datas"]),H.createVNode(l,{modelValue:n.opened,"onUpdate:modelValue":e[1]||(e[1]=d=>n.opened=d),type:"drawer-right",hasMask:!0},{default:H.withCtx(()=>[H.createElementVNode("div",uke,[hke,H.createElementVNode("div",gke,[H.withDirectives(H.createVNode(a,{datas:o.menuCache,"class-name":"h-tabs-menu",modelValue:n.selected,"onUpdate:modelValue":e[0]||(e[0]=d=>n.selected=d),onChange:o.tabChange,keyName:"url"},null,8,["datas","modelValue","onChange"]),[[H.vShow,o.menuCache.length>0]])])])]),_:1},8,["modelValue"])])}const pke=$i(dke,[["render",fke]]),mke={name:"PaasMenu",props:{url:"",disabled:{default:!1},value:"",format:{default:"YYYY-MM-DD"},type:{default:"date"}},computed:{siderCollapsed(){return this.$store.menus.siderCollapsed},current(){return this.$store.menus.current},data(){return this.$store.menus.data}},mounted(){this.$store.loginFlag&&this.data.length==0&&this.$post(this.url).then(s=>{this.initSearch(s.data.data),this.$store.setSearchData(this.searchData),this.$store.setMenuData(s.data.data)})},updated(){this.$refs.menus.select(this.current)},data(){return{searchData:[]}},watch:{$route(){let s=this.$route.path;this.$store.menus.current==s&&this.$refs.menus.select(s)}},methods:{menuSelect(s){this.$store.setCurrent(s.key),this.$store.setTitle(s.title),this.$store.setMenuId(s.id),this.$router.push(s.key),this.$store.setMenuCache({url:s.key,title:s.title})},initSearch(s){s.forEach(e=>{e.children.length>0?(this.searchData.push({label:e.title,isLabel:!0}),this.initSearch(e.children)):this.searchData.push({value:e.key,label:e.title})})}}};function _ke(s,e,t,i,n,o){const r=H.resolveComponent("Menu");return H.openBlock(),H.createBlock(r,{ref:"menus",className:"h-menu-white",datas:o.data,inlineCollapsed:o.siderCollapsed,onSelect:o.menuSelect},null,8,["datas","inlineCollapsed","onSelect"])}const bke=$i(mke,[["render",_ke]]),vke={name:"PaasPageSelect",props:{multiple:{default:!1},disabled:{default:!1},modelValue:{},url:"",vars:{}},computed:{action(){return this.$store.forms.action}},mounted(){this.modelValue&&(this.modelValue instanceof String&&this.modelValue.indexOf(",")!=-1&&(this.modelValue=this.modelValue.split(",")),this.multiple&&this.modelValue instanceof Array?this.selected=this.modelValue:this.selected=[this.modelValue]),this.action!="edit"&&this.action!="see"&&this.loadData()},watch:{vars:{deep:!0,handler(s){s&&(this.selected=[],this.filter="",this.initFlag=!1,this.loadData())}},modelValue:{deep:!0,handler(s){s&&(s instanceof String&&s.indexOf(",")!=-1&&(s=s.split(",")),this.multiple&&s instanceof Array?this.selected=s:this.selected=[this.modelValue],this.initFlag&&(this.initFlag=!1,this.loadData()))}}},data(){return{initFlag:!0,page:1,size:1e3,data:[],selected:[],filter:""}},methods:{searchInput(s){s.length<1||this.search(s)},search(s){this.current=1,this.loadData()},input(s){this.selected=[],this.multiple&&s instanceof Array&&(this.selected=s),this.$emit("update:modelValue",s),this.$emit("input",s)},change(s){let e=new Array;if(this.multiple)for(let t=0;t<s.length;t++)e.push(s[t].value);else s?e=s.value:e="";this.$emit("update:modelValue",e),this.$emit("change",s)},loadData(){this.selected&&this.selected.length>1&&(this.size=200);let s={page:{current:this.page,size:this.size+this.selected.length},label:this.filter,value:this.filter,vars:this.vars,selected:this.selected};this.$post(this.url,s).then(e=>{let t=e.data.data;t&&(this.data=t.rows)})},up(){this.page>1&&(this.page--,this.loadData())},down(){this.page++,this.loadData()}}},Cke={class:"gray-color"};function wke(s,e,t,i,n,o){const r=H.resolveComponent("h-search"),a=H.resolveComponent("Button"),l=H.resolveComponent("Select");return H.openBlock(),H.createBlock(l,{multiple:t.multiple,disabled:t.disabled,"model-value":t.modelValue,datas:n.data,onChange:o.change,onInput:o.input},{top:H.withCtx(()=>[H.createVNode(r,{onSearch:o.search,onInput:o.searchInput,block:"",modelValue:n.filter,"onUpdate:modelValue":e[0]||(e[0]=d=>n.filter=d),height:30,placeholder:"搜索"},null,8,["onSearch","onInput","modelValue"])]),bottom:H.withCtx(()=>[H.createVNode(a,{icon:"h-icon-left","no-border":!0,onClick:o.up},null,8,["onClick"]),H.createElementVNode("span",Cke,H.toDisplayString(n.page),1),H.createVNode(a,{icon:"h-icon-right","no-border":!0,onClick:o.down},null,8,["onClick"])]),_:1},8,["multiple","disabled","model-value","datas","onChange","onInput"])}const yke=$i(vke,[["render",wke]]),Ske={name:"PaasPageTable",props:{checkbox:{default:!1},height:{default:0},radio:{default:!1},border:{default:!0},stripe:{default:!1},params:{},columns:{default:[]},id:{default:"id"},path:""},computed:{queryData(){return this.$store.queryData},current(){return this.$store.menus.current},menuData(){return this.$store.menus.data},menuId(){return this.$store.menus.menuId},buttonProxy(){return this.$store.buttonProxy}},mounted(){this.columns.forEach((s,e)=>{s.render||(this.searchData.push({value:s.prop,label:s.title}),e==0&&(this.searchKey=s.prop))}),this.path?this.url=this.path:this.url=this.$route.path+"/page",this.getMenuButtons(),this.$bus.on("ReloadData",()=>{this.loadData()}),this.selectData=[],this.loadData()},data(){return{url:"",colors:["primary","blue","green","yellow","dark"],buttons:[],loadingFlag:!0,loading:!1,datas:[],searchData:[],searchKey:"",searchVal:"",selectData:[]}},methods:{getColor(s){if(s<this.colors.length)return this.colors[s];if(s>=this.colors.length*4)return this.colors[s-this.colors.length*4];if(s>=this.colors.length*3)return this.colors[s-this.colors.length*3];if(s>=this.colors.length*2)return this.colors[s-this.colors.length*2];if(s>=this.colors.length)return this.colors[s-this.colors.length]},getMenuButtons(){this.$post(this.buttonProxy+"/sysbuttons/getButtons/"+this.menuId).then(s=>{this.buttons=s.data.data})},loadData(){if(this.loadingFlag)this.loadingFlag=!1,setTimeout(()=>{this.loadingFlag=!0},1e3);else return;this.loading=!0,this.$post(this.url,{page:{current:this.$store.page.page,size:this.$store.page.size},queryData:{...this.$store.queryData[this.current],...this.params}}).then(s=>{if(this.loading=!1,s.data==null){this.datas=[],this.$store.page.total=0;return}if(s.data.code!=this.$success&&s.msg!=null){In.message.error(s.msg);return}if(s.data.data){s.data.data.rows!=null?this.datas=s.data.data.rows:this.datas=[],this.$store.page.total=s.data.data.total;return}else this.datas=[],this.$store.page.total=0})},rowSelect(s){this.checkbox&&(this.selectData=s)},trClick(s){this.checkbox||(this.selectData=s)},handle(s){this.$store.setAction(s),this.$store.setSee(!1);var e=this.$parent[s];if(e&&e instanceof Function){e(this.selectData);return}else this[s]?this[s]():console.error("按钮事件方法未找到:",s)},search(s){let e={};this.selectData=[],e[this.searchKey]=s,this.$store.setQueryData(e),this.loadData()},query(){this.$store.setSee(!1),this.$store.setAction("query"),this.$store.setSubTitle("查询"),this.$router.push(this.current+"/query")},add(){let s=this.getColumnId();this.$store.setSee(!1),this.$store.setSubTitle("创建"),s?this.$router.push({path:this.current+"/form",query:{id:s}}):this.$router.push(this.current+"/form")},edit(){let s=this.getColumnId();s!=null&&(this.$store.setSee(!1),this.$store.setSubTitle("编辑"),this.$router.push({path:this.current+"/form",query:{id:s}}))},del(){let s=this.getColumnId();s!=null&&In.confirm({content:"确定删除?",onConfirm:()=>{this.$delete(this.$store.menus.current+"/"+s).then(e=>{let t=e.data;this.$dyAlert(t,!1)})}})},see(){let s=this.getColumnId();s!=null&&(this.$store.setSubTitle("查看"),this.$store.setSee(!0),this.$router.push({path:this.current+"/form",query:{id:s}}))},getColumnId(){let s=this.selectData;if(this.checkbox&&(s=this.selectData[0]),s==null||s.length==0)return this.$store.forms.action!="add"&&In.message.warn("请选中任意列表数据"),null;let e="";return this.id?this.id instanceof Array?(this.id.forEach(t=>{e+=s[t]+"&"}),e=e.substring(0,e.length-1)):e+=s[this.id]:e=s[this.columns[0].prop],e}}},xke={class:"h-panel-bar h-panel-no-border"},kke={class:"h-panel-right"},Lke={class:"h-input-group"},Dke={class:"h-input-addon"},Eke={class:"h-panel-body h-panel-no-border"},Ike={class:"h-panel-bar"};function Tke(s,e,t,i,n,o){const r=H.resolveComponent("Button"),a=H.resolveComponent("Select"),l=H.resolveComponent("Search"),d=H.resolveComponent("Table"),c=H.resolveComponent("Pagination");return H.openBlock(),H.createElementBlock("div",null,[H.createElementVNode("div",xke,[H.createVNode(r,{icon:"h-icon-search",onClick:o.query},{default:H.withCtx(()=>[H.createTextVNode("查询")]),_:1},8,["onClick"]),(H.openBlock(!0),H.createElementBlock(H.Fragment,null,H.renderList(n.buttons,(u,h)=>(H.openBlock(),H.createBlock(r,{key:h,color:o.getColor(h),icon:u.icon,disabled:n.selectData.length==0&&u.state==0,onClick:g=>o.handle(u.tag,u.title)},{default:H.withCtx(()=>[H.createTextVNode(H.toDisplayString(u.title),1)]),_:2},1032,["color","icon","disabled","onClick"]))),128)),H.createElementVNode("div",kke,[H.createElementVNode("div",Lke,[H.createElementVNode("div",Dke,[H.createVNode(a,{datas:n.searchData,deletable:!1,autosize:!0,modelValue:n.searchKey,"onUpdate:modelValue":e[0]||(e[0]=u=>n.searchKey=u),"no-border":!0},null,8,["datas","modelValue"])]),H.createVNode(l,{onSearch:o.search,modelValue:n.searchVal,"onUpdate:modelValue":e[1]||(e[1]=u=>n.searchVal=u),placeholder:"搜索"},null,8,["onSearch","modelValue"])])])]),H.createElementVNode("div",Eke,[H.createVNode(d,{ref:"table",datas:n.datas,checkbox:t.checkbox,"is-select-row":!t.checkbox,height:t.height,radio:t.radio,stripe:t.stripe,loading:n.loading,"select-when-click-tr":"",columns:t.columns,onSelect:o.rowSelect,onTrClick:o.trClick},null,8,["datas","checkbox","is-select-row","height","radio","stripe","loading","columns","onSelect","onTrClick"])]),H.createElementVNode("div",Ike,[H.createVNode(c,{modelValue:s.$store.page,"onUpdate:modelValue":e[2]||(e[2]=u=>s.$store.page=u),align:"right",onChange:o.loadData},null,8,["modelValue","onChange"])])])}const Nke=$i(Ske,[["render",Tke]]),Ake={name:"PaasSelect",props:{multiple:{default:!1},disabled:{default:!1},modelValue:String,params:""},data(){return{data:[]}},mounted(){this.data=this.$store.dicts[this.params]},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function Rke(s,e,t,i,n,o){const r=H.resolveComponent("Select");return H.openBlock(),H.createBlock(r,{datas:n.data,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input,disabled:t.disabled},null,8,["datas","multiple","model-value","onChange","onInput","disabled"])}const Mke=$i(Ake,[["render",Rke]]),Pke={name:"PaasTitleBar",data(){return{titles:[{title:this.$store.menus.title},{title:this.$store.menus.subTitle}]}},methods:{close(){this.$router.back()}}},Oke={class:"h-panel-bar"},Fke={class:"h-panel-right"},Bke=[H.createElementVNode("i",{class:"h-icon-close"},null,-1)];function Wke(s,e,t,i,n,o){const r=H.resolveComponent("Breadcrumb");return H.openBlock(),H.createElementBlock("div",Oke,[H.createVNode(r,{datas:n.titles},null,8,["datas"]),H.createElementVNode("span",Fke,[H.createElementVNode("button",{onClick:e[0]||(e[0]=(...a)=>o.close&&o.close(...a)),class:"h-btn h-btn-no-border h-btn-text-primary",style:{padding:"0px"}},Bke)])])}const Vke=$i(Pke,[["render",Wke]]),Hke={name:"PaasTree",props:{multiple:{default:!1},disabled:{default:!1},modelValue:{},params:{},url:""},data(){return{param:{keyName:"value",titleName:"label",parentName:"supperId",childrenName:"children",dataMode:"list",getTotalDatas:s=>{this.$post(this.url,{page:{current:1,size:1e6},...this.params}).then(e=>{let t=e.data.data.rows;s(t)})}}}},mounted(){},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function $ke(s,e,t,i,n,o){const r=H.resolveComponent("TreePicker");return H.openBlock(),H.createBlock(r,{option:n.param,"model-value":t.modelValue,filterable:!0,onChange:o.change,onInput:o.input,multiple:t.multiple,disabled:t.disabled},null,8,["option","model-value","onChange","onInput","multiple","disabled"])}const zke=$i(Hke,[["render",$ke]]),Uke={name:"PaasUploadModal",props:{url:"",title:"",accept:"",multiple:{default:!1},name:{default:"file"},template:"",params:{default:null},success:{default:"success"}},data(){return{opend:!1,isLoading:!1,file:[],message:""}},methods:{fileChange(){this.message="",this.$refs.inputFile.click()},add(s){this.message="",this.file=s.target.files},confirm(s){if(s.preventDefault(),this.file.length==0)return this.message="未上传任何文件",!1;this.isLoading=!0;let e=new FormData;for(var t=0;t<this.file.length;t++)e.append(this.name,this.file[t]);if(this.params)for(var i in this.params)e.append(i,this.params[i]||"");this.$upload(this.url,e).then(n=>{this.isLoading=!1,n.data.code==this.$success?(In.message.info("上传成功"),this.file=[],this.$bus.emit(this.success,n.data.msg)):In.message.error(n.data.msg),this.message=n.data.msg}).catch(n=>{this.isLoading=!1,this.message=n})},show(){this.file=[],this.message="",this.opend=!0},tempDown(){location.href="/static/excel/"+this.template}}},jke=[H.createElementVNode("div",null,[H.createElementVNode("p",{class:"text-center"},[H.createElementVNode("i",{class:"h-icon-upload blue-color",style:{"font-size":"30px"}})]),H.createElementVNode("p",{class:"text-center"},"点击这里上传")],-1)],qke=["disabled","accept","multiple"],Kke={class:"link"},Gke=H.createElementVNode("div",null,null,-1),Zke={style:{"font-size":"13px",color:"red",float:"left"}};function Yke(s,e,t,i,n,o){const r=H.resolveComponent("h-button"),a=H.resolveComponent("Modal"),l=H.resolveDirective("width");return H.openBlock(),H.createBlock(a,{modelValue:n.opend,"onUpdate:modelValue":e[4]||(e[4]=d=>n.opend=d),"close-on-mask":!1,"has-divider":!0},{header:H.withCtx(()=>[H.createTextVNode(H.toDisplayString(t.title||t.template.substring(0,t.template.indexOf(".")))+"  ",1),t.template!=null?(H.openBlock(),H.createElementBlock("span",{key:0,class:"link",style:{"font-size":"14px"},onClick:e[0]||(e[0]=(...d)=>o.tempDown&&o.tempDown(...d))},"模板下载")):H.createCommentVNode("",!0)]),footer:H.withCtx(()=>[H.createElementVNode("span",Zke,H.toDisplayString(n.message),1),H.createVNode(r,{color:"primary",icon:"h-icon-error",onClick:e[3]||(e[3]=d=>n.opend=!1)},{default:H.withCtx(()=>[H.createTextVNode("关闭")]),_:1}),H.createVNode(r,{color:"blue",icon:"h-icon-upload",loading:n.isLoading,onClick:o.confirm},{default:H.withCtx(()=>[H.createTextVNode("上传")]),_:1},8,["loading","onClick"])]),default:H.withCtx(()=>[H.withDirectives((H.openBlock(),H.createElementBlock("div",null,[H.createElementVNode("div",{class:"h-uploader-browse-button h-uploader-drop-element",style:{position:"relative","z-index":"1"},onClick:e[1]||(e[1]=(...d)=>o.fileChange&&o.fileChange(...d))},jke),H.withDirectives(H.createElementVNode("input",{disabled:n.isLoading,ref:"inputFile",type:"file",accept:t.accept,onChange:e[2]||(e[2]=d=>o.add(d)),multiple:t.multiple},null,40,qke),[[H.vShow,!1]]),H.createElementVNode("ol",null,[(H.openBlock(!0),H.createElementBlock(H.Fragment,null,H.renderList(n.file,(d,c)=>(H.openBlock(),H.createElementBlock("li",{key:c,style:{border:"solid 2px red","border-bottom-width":"2px"}},[H.createElementVNode("span",Kke,H.toDisplayString(d.name),1)]))),128))]),Gke])),[[l,400]])]),_:1},8,["modelValue"])}const Xke=$i(Uke,[["render",Yke]]),Qke={name:"FormDate",props:{label:"",prop:"",type:{default:"text"},single:{default:!1},icon:{default:""},readonly:{default:!1},disabled:{default:!1},modelValue:String,format:{default:"YYYYMMDD"},type:{default:"date"}},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("input",s)},change(s){this.$emit("change",s)}}};function Jke(s,e,t,i,n,o){const r=H.resolveComponent("paas-date"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{readonly:t.readonly,disabled:t.disabled,type:t.type,value:t.modelValue,format:t.format,onChange:o.change,onInput:o.input},null,8,["readonly","disabled","type","value","format","onChange","onInput"])]),_:1},8,["label","prop","icon","single"])}const eLe=$i(Qke,[["render",Jke]]),tLe={name:"FormInput",props:{label:"",prop:"",type:{default:"text"},modelValue:String,single:{default:!1},icon:{default:""},readonly:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{updateValue(s){this.$emit("update:modelValue",s)}}};function iLe(s,e,t,i,n,o){const r=H.resolveComponent("Input"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{type:t.type,value:t.modelValue,onInput:e[0]||(e[0]=l=>o.updateValue(l.target.value)),readonly:o.see||t.readonly},null,8,["type","value","readonly"])]),_:1},8,["label","prop","icon","single"])}const nLe=$i(tLe,[["render",iLe]]),sLe={name:"FormNumberInput",mounted(){console.log(this.modelValue)},props:{label:"",prop:"",type:{default:"text"},value:{},modelValue:{},single:{default:!1},icon:{default:""},readonly:{default:!1},precision:{default:0},max:{},min:{}},computed:{see(){return this.$store.forms.see}},methods:{updateValue(s){console.log(s,this.modelValue),this.$emit("update:modelValue",s)}}};function oLe(s,e,t,i,n,o){const r=H.resolveComponent("NumberInput"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,icon:t.icon,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{type:t.type,precision:t.precision,max:t.max,min:t.min,value:t.modelValue,onInput:o.updateValue,readonly:o.see||t.readonly},null,8,["type","precision","max","min","value","onInput","readonly"])]),_:1},8,["label","prop","icon","single"])}const rLe=$i(sLe,[["render",oLe]]),aLe={name:"FormPageSelect",props:{multiple:{default:!1},url:"",of:{},modelValue:String,single:{default:!1},disabled:{default:!1},label:"",prop:""},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s),this.$emit("input",s)},change(s){let e=new Array;if(this.multiple)for(let t=0;t<s.length;t++)e.push(s[t].value);else e=s.value;this.$emit("update:modelValue",e),this.$emit("change",s)}}};function lLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-page-select"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{multiple:t.multiple,disabled:o.see||t.disabled,url:t.url,of:t.of,"model-value":t.modelValue,onInput:o.input,onChange:o.change},null,8,["multiple","disabled","url","of","model-value","onInput","onChange"])]),_:1},8,["label","prop","single"])}const dLe=$i(aLe,[["render",lLe]]),cLe={name:"FormSelect",props:{multiple:{default:!1},single:{default:!1},modelValue:String,params:"",label:"",prop:"",disabled:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function uLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-select"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{params:t.params,disabled:o.see||t.disabled,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input},null,8,["params","disabled","multiple","model-value","onChange","onInput"])]),_:1},8,["label","prop","single"])}const hLe=$i(cLe,[["render",uLe]]),gLe={name:"FormSwitch",props:{label:"",prop:"",value:"",single:{default:!1},icon:{default:""},readonly:{default:!1},single:{default:!1}},computed:{see(){return this.$store.forms.see}},methods:{inputEvent(s){this.$emit("input",s)}}},fLe={slot:"open"},pLe={slot:"close"};function mLe(s,e,t,i,n,o){const r=H.resolveComponent("Switch");return H.openBlock(),H.createBlock(r,{value:t.value,"true-value":"1","false-value":"0"},{default:H.withCtx(()=>[H.createElementVNode("span",fLe,H.toDisplayString(t.label),1),H.createElementVNode("span",pLe,H.toDisplayString(t.label),1)]),_:1},8,["value"])}const _Le=$i(gLe,[["render",mLe]]),bLe={name:"FormTree",props:{multiple:{default:!1},single:{default:!1},modelValue:{},params:{},label:"",prop:"",disabled:{default:!1},url:""},computed:{see(){return this.$store.forms.see}},methods:{input(s){this.$emit("update:modelValue",s.value),this.$emit("input",s)},change(s){this.$emit("update:modelValue",s.value),this.$emit("change",s)}}};function vLe(s,e,t,i,n,o){const r=H.resolveComponent("paas-tree"),a=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(a,{label:t.label,prop:t.prop,single:t.single},{default:H.withCtx(()=>[H.createVNode(r,{params:t.params,disabled:o.see||t.disabled,multiple:t.multiple,"model-value":t.modelValue,onChange:o.change,onInput:o.input,url:t.url},null,8,["params","disabled","multiple","model-value","onChange","onInput","url"])]),_:1},8,["label","prop","single"])}const CLe=$i(bLe,[["render",vLe]]),wLe={name:"FormUpload",props:{url:"",accept:"",multiple:{default:!1},show:{default:!0},name:{default:"file"},single:{default:!1},params:{default:null},success:{default:"success"},value:"",label:"",prop:""},data(){return{cValue:this.value,isLoading:!1,file:[],message:""}},computed:{see(){return this.$store.forms.see}},methods:{fileChange(){this.$refs.inputFile.click()},add(s){this.file=s.target.files;for(var e=new Array,t=0;t<this.file.length;t++)e.push(this.file[t].name);this.cValue=e.join(",")},confirm(s){s.preventDefault(),this.isLoading=!0;let e=new FormData;for(var t=0;t<this.file.length;t++)e.append(this.name,this.file[t]);if(this.params)for(var i in this.params)e.append(i,this.params[i]||"");this.$upload(this.url,e).then(n=>{this.isLoading=!1,n.data.code==this.$success?(In.message.info("上传成功"),this.file=[],this.cValue=n.data.msg,this.$emit("input",this.cValue),this.$bus.emit(this.success,n.data.msg)):In.message.error(n.data.msg)}).catch(n=>{this.isLoading=!1,In.message.error(n)})},updateVal(s){this.$emit("input",s)}}},yLe=["disabled","accept","multiple"],SLe={class:"h-input-group"},xLe={class:"h-input h-input-suffix-icon"};function kLe(s,e,t,i,n,o){const r=H.resolveComponent("Input"),a=H.resolveComponent("h-button"),l=H.resolveComponent("FormItem");return H.openBlock(),H.createBlock(l,{label:t.label,single:t.single,prop:t.prop},{default:H.withCtx(()=>[H.withDirectives(H.createElementVNode("input",{disabled:n.isLoading,ref:"inputFile",type:"file",accept:t.accept,onChange:e[0]||(e[0]=d=>o.add(d)),multiple:t.multiple},null,40,yLe),[[H.vShow,!1]]),H.createElementVNode("div",SLe,[H.createElementVNode("div",xLe,[H.createVNode(r,{type:"text",name:t.name,value:n.cValue,disabled:o.see,onInput:e[1]||(e[1]=d=>o.updateVal(d.target.value)),readonly:""},null,8,["name","value","disabled"]),H.withDirectives(H.createElementVNode("i",{class:"h-icon-upload",onClick:e[2]||(e[2]=(...d)=>o.fileChange&&o.fileChange(...d)),style:{cursor:"pointer","padding-right":"5px"}},null,512),[[H.vShow,!o.see]])]),H.createVNode(a,{color:"blue",icon:"h-icon-completed",loading:n.isLoading,onClick:o.confirm,disabled:n.file.length<=0},{default:H.withCtx(()=>[H.createTextVNode("上传")]),_:1},8,["loading","onClick","disabled"])])]),_:1},8,["label","single","prop"])}const LLe=[GK,oke,lke,pke,bke,yke,Nke,Mke,Vke,zke,Xke,eLe,nLe,rLe,dLe,hLe,_Le,CLe,$i(wLe,[["render",kLe]])],DLe={install(s){LLe.forEach(e=>{s.component(e.name,e)})}};/*!-----------------------------------------------------------------------------
1125
1125
  * Copyright (c) Microsoft Corporation. All rights reserved.
1126
1126
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
1127
1127
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import { m as a } from "./index-KE2muaV4.js";
1
+ import { m as a } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-KE2muaV4.js";
1
+ import { m as s } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  var M = Object.defineProperty;
2
2
  var R = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var _ = (e, t, r) => (R(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { t as K, m as E } from "./index-KE2muaV4.js";
4
+ import { t as K, m as E } from "./index-BTjmbdqK.js";
5
5
  import "vue";
6
6
  import "heyui";
7
7
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as a } from "./index-KE2muaV4.js";
1
+ import { m as a } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m } from "./index-KE2muaV4.js";
1
+ import { m } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- import { m as i } from "./index-KE2muaV4.js";
1
+ import { m as i } from "./index-BTjmbdqK.js";
2
2
  import "vue";
3
3
  import "heyui";
4
4
  /*!-----------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paas-component-library",
3
3
  "private": false,
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",