form-imagining 0.0.78-2 → 0.0.78-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/{App-4c27455e.js → App-3363b785.js} +1 -1
  2. package/dist/Code-03c4399b.js +5 -0
  3. package/dist/Col-6a33575c.js +5 -0
  4. package/dist/Collapse-c8b36d14.js +5 -0
  5. package/dist/{Demo-312101f8.js → Demo-05139f8d.js} +1 -1
  6. package/dist/FX-4eab57a1.js +5 -0
  7. package/dist/{FormGridCopy-e00b8d40.js → FormGridCopy-04c8645d.js} +1 -1
  8. package/dist/GenerateForm-10523459.js +5 -0
  9. package/dist/{GenerateReport-86997fc7.js → GenerateReport-4a108164.js} +1 -1
  10. package/dist/{HelloWorld-da99c487.js → HelloWorld-63ff7bf5.js} +1 -1
  11. package/dist/Input-/345/210/240/351/231/{244-6703c77d.js → 244-5cf360e1.js} +1 -1
  12. package/dist/Label-/345/210/240/351/231/{244-5067b81c.js → 244-4a1ad1a0.js} +1 -1
  13. package/dist/{Login-ec0e0432.js → Login-1758e448.js} +1 -1
  14. package/dist/ReportModule-5651d6f0.js +5 -0
  15. package/dist/SqlModule-bd506427.js +5 -0
  16. package/dist/Table-439a4d8a.js +5 -0
  17. package/dist/TableBtnModal-d4857e84.js +5 -0
  18. package/dist/cTable-f7aa933d.js +5 -0
  19. package/dist/childForm-a7082265.js +5 -0
  20. package/dist/{cssMode-88f4f528.js → cssMode-00957fc9.js} +1 -1
  21. package/dist/form-imagining.js +1 -1
  22. package/dist/form-imagining.umd.cjs +3 -3
  23. package/dist/{formTest-430456c6.js → formTest-2bf9f66a.js} +1 -1
  24. package/dist/{freemarker2-6a0560ba.js → freemarker2-bf632a04.js} +1 -1
  25. package/dist/{handlebars-b23683a4.js → handlebars-38c17cc7.js} +1 -1
  26. package/dist/{html-4a2b77ed.js → html-fa210287.js} +1 -1
  27. package/dist/{htmlMode-94297110.js → htmlMode-7ec33494.js} +1 -1
  28. package/dist/{index-d4e73680.js → index-5b0424f6.js} +1 -1
  29. package/dist/{index-03644c5a.js → index-f86681be.js} +34 -33
  30. package/dist/{javascript-cba44cb5.js → javascript-a813c965.js} +2 -2
  31. package/dist/{jsonMode-a40317cc.js → jsonMode-c0df8209.js} +1 -1
  32. package/dist/{liquid-c015127f.js → liquid-375b89ae.js} +1 -1
  33. package/dist/{mdx-fa08baab.js → mdx-22a415bc.js} +1 -1
  34. package/dist/{python-45dcec07.js → python-255a2d7a.js} +1 -1
  35. package/dist/{razor-5dc4b0ba.js → razor-e8402349.js} +1 -1
  36. package/dist/{tableSelectDemo-a3eadca4.js → tableSelectDemo-ba956d89.js} +1 -1
  37. package/dist/{tableSelectDemo2-1e27f050.js → tableSelectDemo2-6ae468b7.js} +1 -1
  38. package/dist/{tsMode-678c5b5a.js → tsMode-4201a73f.js} +1 -1
  39. package/dist/{typescript-d6d265d2.js → typescript-8120561c.js} +1 -1
  40. package/dist/{xml-c31c3f95.js → xml-cc5864f1.js} +1 -1
  41. package/dist/{yaml-4edb5b4a.js → yaml-592796e7.js} +1 -1
  42. package/package.json +1 -1
  43. package/dist/Code-c59f1270.js +0 -5
  44. package/dist/Col-6a9eae9e.js +0 -5
  45. package/dist/Collapse-621bcab1.js +0 -5
  46. package/dist/FX-df2bd669.js +0 -5
  47. package/dist/GenerateForm-124fc354.js +0 -5
  48. package/dist/ReportModule-b2e563dd.js +0 -5
  49. package/dist/SqlModule-122b9988.js +0 -5
  50. package/dist/Table-3a36d4e7.js +0 -5
  51. package/dist/TableBtnModal-db606c00.js +0 -5
  52. package/dist/cTable-8fe9ca3f.js +0 -5
  53. package/dist/childForm-7fc0d0f2.js +0 -5
@@ -488,9 +488,9 @@ summary tabindex target title type usemap value width wmode wrap`,eventsName=`on
488
488
  </a-form-item>`;break;case"header":K+=`
489
489
  <div class="${H.classname} title-${H.align}" ${H.extended}>
490
490
  <span>${H.name}</span>
491
- </div>`;break;default:let fe="",ge="";const pe=H.disabled==!0?" disabled ":"",me=H.clearable==!0?" allowClear ":"",ve=H.hidden==!0?'v-show="false"':"",be=H.bordered==!0?"":':bordered="false"',ye=H.placeholder==null||H.placeholder==""?"":`placeholder="${H.placeholder}"`,Ce=H.width=="100%"?"":` style="width: ${H.width}"`,ke=H.prefix==""||H.prefix==null?"":` prefix="${H.prefix}" `,Se=H.suffix==""||H.suffix==null?"":` suffix="${H.suffix}" `,De=H.dateType==null?"":` picker="${H.dateType}"`,Ne=` value-format="${getDateType(H.dateType)}"`;switch(G){case"input":const Ie=H.bordered==!0?':bordered="false"':"";fe=`<a-input ${de+Q} ${oe} ${ye} ${Ce+ke+Se+pe+me+Ie} ${le} ${ce} ${H.extended} />`;break;case"fx":debugger;const Ee=H.accountField;let Te="";if(Ee!=null&&Ee.length>0){let Lt="";for(let kt=0;kt<Ee.length;kt++)Lt+=Ee[kt]+",";Lt=Lt.substring(0,Lt.length-1),Te=` :value="getAccount('${H.account}','${Lt}',viewData)" `}fe=`<a-input ${de+Te+te} ${oe} ${ye} ${Ce+ke+Se+pe+be} ${H.extended} />`;break;case"inputnumber":const we=H.minCheck||H.min==null?"":` :min="${H.min}"`,xe=H.maxCheck||H.max==null?"":` :max="${H.max}"`,Me=H.addonBefore==""||H.addonBefore==null?"":` addonBefore="${H.addonBefore}" `,Le=H.addonAfter==""||H.addonAfter==null?"":` addonAfter="${H.addonAfter}" `,We=H.step==null?"":` :step="${H.step}"`,ze=H.precision==null?"":` :precision="${H.precision}"`;fe=`<a-input-number ${de+Q} ${we+xe+We+ze} ${oe} ${ye} ${Me} ${Le} style='${se}' ${pe+me} ${le} ${ce} ${H.extended} />`;break;case"textarea":fe=` <a-textarea ${de+Q} ${oe} ${pe} ${ye} ${me} :rows="${H.rows}" ${le} ${ce} ${H.extended}/>`;break;case"select":ge=H.multiple?'mode="multiple"':"";const $e=selectSyncHtml(ge,H,X),je=selectSlotHtml(ge,H,X),Ae=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let Pe=H.multiple?`${Ae}`:`${ne}`,Ve=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",Qe=H.multiple?Ve:ie;const qe=H.dic==""?"":`:options="getDictItemsByCode(${H.dictType=="dynamic"?`viewData.${H.dic}`:`'${H.dic}'`})"`;fe=`<a-select ${de} ${Pe} ${Qe} ${te} ${le} ${ce} ${ge} ${pe+ye} allow-clear show-search optionFilterProp="label" style='${se}' ${qe} ${H.extended+$e} >${je}</a-select>`;break;case"treeselect":const Ze=selectSyncHtml(ge,H,X),nt=H.multiple?"tree-checkable treeCheckStrictly":"",it=H.punctuation&&H.multiple?`,${H.punctuation}`:"",lt=X==null?"":`:value="formatMultipleTreeSelectValue(viewData.${X},'${H.treedic}'${it})"`;let ot=H.multiple?`${lt}`:`${ne}`,ct=H.model?`:data-value="JSON.stringify(formatMultipleTreeSelectValue(viewData.${X},'${H.treedic}'${it}))"`:"",Ge=H.multiple?ct:ie,Ke=H.punctuation&&H.multiple?`:punctuation="${H.punctuation}"`:"";fe+=`
491
+ </div>`;break;default:let fe="",ge="";const pe=H.disabled==!0?" disabled ":"",me=H.clearable==!0?" allowClear ":"",ve=H.hidden==!0?'v-show="false"':"",be=H.bordered==!0?"":':bordered="false"',ye=H.placeholder==null||H.placeholder==""?"":`placeholder="${H.placeholder}"`,Ce=H.width=="100%"?"":` style="width: ${H.width}"`,ke=H.prefix==""||H.prefix==null?"":` prefix="${H.prefix}" `,Se=H.suffix==""||H.suffix==null?"":` suffix="${H.suffix}" `,De=H.dateType==null?"":` picker="${H.dateType}"`,Ne=` value-format="${getDateType(H.dateType)}"`;switch(G){case"input":const Ie=H.bordered==!0?':bordered="false"':"";fe=`<a-input ${de} ${Q} ${oe} ${ye} ${Ce+ke+Se+pe+me+Ie} ${le} ${ce} ${H.extended} />`;break;case"fx":debugger;const Ee=H.accountField;let Te="";if(Ee!=null&&Ee.length>0){let Lt="";for(let kt=0;kt<Ee.length;kt++)Lt+=Ee[kt]+",";Lt=Lt.substring(0,Lt.length-1),Te=` :value="getAccount('${H.account}','${Lt}',viewData)" `}fe=`<a-input ${de} ${Te+te} ${oe} ${ye} ${Ce+ke+Se+pe+be} ${H.extended} />`;break;case"inputnumber":const we=H.minCheck||H.min==null?"":` :min="${H.min}"`,xe=H.maxCheck||H.max==null?"":` :max="${H.max}"`,Me=H.addonBefore==""||H.addonBefore==null?"":` addonBefore="${H.addonBefore}" `,Le=H.addonAfter==""||H.addonAfter==null?"":` addonAfter="${H.addonAfter}" `,We=H.step==null?"":` :step="${H.step}"`,ze=H.precision==null?"":` :precision="${H.precision}"`;fe=`<a-input-number ${de} ${Q} ${we+xe+We+ze} ${oe} ${ye} ${Me} ${Le} style='${se}' ${pe+me} ${le} ${ce} ${H.extended} />`;break;case"textarea":fe=` <a-textarea ${de} ${Q} ${oe} ${pe} ${ye} ${me} :rows="${H.rows}" ${le} ${ce} ${H.extended}/>`;break;case"select":ge=H.multiple?'mode="multiple"':"";const $e=selectSyncHtml(ge,H,X),je=selectSlotHtml(ge,H,X),Ae=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let Pe=H.multiple?`${Ae}`:`${ne}`,Ve=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",Qe=H.multiple?Ve:ie;const qe=H.dic==""?"":`:options="getDictItemsByCode(${H.dictType=="dynamic"?`viewData.${H.dic}`:`'${H.dic}'`})"`;fe=`<a-select ${de} ${Pe} ${Qe} ${te} ${le} ${ce} ${ge} ${pe+ye} allow-clear show-search optionFilterProp="label" style='${se}' ${qe} ${H.extended+$e} >${je}</a-select>`;break;case"treeselect":const Ze=selectSyncHtml(ge,H,X),nt=H.multiple?"tree-checkable treeCheckStrictly":"",it=H.punctuation&&H.multiple?`,${H.punctuation}`:"",lt=X==null?"":`:value="formatMultipleTreeSelectValue(viewData.${X},'${H.treedic}'${it})"`;let ot=H.multiple?`${lt}`:`${ne}`,ct=H.model?`:data-value="JSON.stringify(formatMultipleTreeSelectValue(viewData.${X},'${H.treedic}'${it}))"`:"",Ge=H.multiple?ct:ie,Ke=H.punctuation&&H.multiple?`:punctuation="${H.punctuation}"`:"";fe+=`
492
492
  <a-tree-select ${ot} ${Ge} ${te} ${le} ${ce} ${nt} ${Ke} style='${se}' ${ye} ${pe} allow-clear show-search treeNodeFilterProp="label" :tree-data="getTreeDictItemsByCode('${H.treedic}')" ${H.extended+Ze}/>
493
- `;break;case"cascader":fe=`<a-cascader ${Q} ${le} ${ce} style='${se}' ${ye} ${pe} allow-clear :options="getCasDictItemsByCode('${H.casdic}')" ${H.extended}/>`;break;case"tableselect":ge=H.multiple?'mode="multiple"':"";const He=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let Re=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",Fe=H.multiple?Re:ie;const Be=H.dropMenuWidth?`dropMenuWidth="${H.dropMenuWidth}"`:"",Oe=H.dropMenuHeight?`dropMenuHeight="${H.dropMenuHeight}"`:"",Ue=H.tableKeyName?`bindKeyName="${H.tableKeyName}"`:"",Ye=H.tableLabelName?`bindLabelName="${H.tableLabelName}"`:"",tt=H.tableSource?`filePath="${H.tableSource}"`:"",at=X==null?"":`@clear="onTableSelectClear(viewData, '${X}')"`,Je=H.syncField?H.syncField:"";let Xe=`value, viewData, '${X}', '${H.tableKeyName}'`,rt=H.rowChangeEvent?","+H.rowChangeEvent:"";Xe=Je?Xe+`,'${Je}' , '${H.tableLabelName}'`:rt?Xe+",'',''":Xe;const ut=X==null?"":`@rowChange="(value) => onTableSelectRowChange(${Xe}${rt})"`;fe=`<c-table-select ${He} ${Fe} ${te} ${le} ${ce} ${ge} ${Be} ${Oe} ${tt} ${Ue} ${Ye} ${ye} ${pe} ${me} ${H.extended} ${at} ${ut} style='${se}'></c-table-select>`;break;case"datepicker":fe=`<div class="ant-picker-custom" ${de+te} ${le}><a-date-picker ${ne} ${oe} ${ce} ${pe} ${me} style='${se}' ${ye} ${De+Ne} ${H.extended}/></div>`;break;case"rangepicker":fe=`<div class="ant-picker-range-custom" ${de+te} ${le}><a-range-picker ${ne} ${oe} ${ce} ${pe} ${me} style='${se}' ${De+Ne} ${H.extended}/></div>`;break;case"switch":fe=`<a-switch v-model:checked="${re}" />`;break;case"radio":let dt=getOptionsHtml(H,"radio"),gt=H.optionsType=="data"?`:options="getDictItemsByCode('${H.dic}')"`:"";fe=`<a-radio-group ${de+Q} ${H.extended} ${gt} >${dt}</a-radio-group>`;break;case"checkbox":let pt=getOptionsHtml(H,"checkbox");const xt=selectSyncHtml(ge,H,X),mt=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let bt=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",wt=H.optionsType=="data"?`:options="getDictItemsByCode('${H.dic}')"`:"";fe=`<a-checkbox-group ${de+mt} ${bt} ${te} ${H.extended} ${xt} ${wt}>${pt} </a-checkbox-group>`;break;case"image":let Et=H.model?`:src="${H.model}"`:H.static?`src="${H.static}"`:"";const Dt=H.width?`width: ${H.width};`:"",Nt=H.height?`height: ${H.height};`:"";fe=`<img ${Et} style="${Dt}${Nt}"/>`;break}K+=`<a-form-item ${ue} ${ve} label="${H.name}" ${ae}>${fe}</a-form-item>`;break}return K}function selectSyncHtml(H,C,W){var Z;H=C.multiple?'mode="multiple"':"";const U=C.syncField?C.syncField:"";let K="",G=C.multiple&&C.punctuation?C.punctuation:"','",Q=C.changeEvent==null||((Z=C.changeEvent)==null?void 0:Z.trim())==""?"":","+C.changeEvent;return U!=""?K=` label-in-value @change="(value) => syncChange(value, viewData, ${G}, '${W}', '${U}'${Q})" `:H&&(Q=Q==""?"":`, null${Q}`,K=` label-in-value @change="(value) => syncChange(value, viewData, ${G}, '${W}'${Q})" `),K}function selectSlotHtml(H,C,W){let U="";if(C.multiple&&W&&C.dic){let K=`getDictItemsByCode(${C.dictType=="dynamic"?`viewData.${C.dic}`:`'${C.dic}'`})`;U=`
493
+ `;break;case"cascader":fe=`<a-cascader ${Q} ${le} ${ce} style='${se}' ${ye} ${pe} allow-clear :options="getCasDictItemsByCode('${H.casdic}')" ${H.extended}/>`;break;case"tableselect":ge=H.multiple?'mode="multiple"':"";const He=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let Re=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",Fe=H.multiple?Re:ie;const Be=H.dropMenuWidth?`dropMenuWidth="${H.dropMenuWidth}"`:"",Oe=H.dropMenuHeight?`dropMenuHeight="${H.dropMenuHeight}"`:"",Ue=H.tableKeyName?`bindKeyName="${H.tableKeyName}"`:"",Ye=H.tableLabelName?`bindLabelName="${H.tableLabelName}"`:"",tt=H.tableSource?`filePath="${H.tableSource}"`:"",at=X==null?"":`@clear="onTableSelectClear(viewData, '${X}')"`,Je=H.syncField?H.syncField:"";let Xe=`value, viewData, '${X}', '${H.tableKeyName}'`,rt=H.rowChangeEvent?","+H.rowChangeEvent:"";Xe=Je?Xe+`,'${Je}' , '${H.tableLabelName}'`:rt?Xe+",'',''":Xe;const ut=X==null?"":`@rowChange="(value) => onTableSelectRowChange(${Xe}${rt})"`;fe=`<c-table-select ${He} ${Fe} ${te} ${le} ${ce} ${ge} ${Be} ${Oe} ${tt} ${Ue} ${Ye} ${ye} ${pe} ${me} ${H.extended} ${at} ${ut} style='${se}'></c-table-select>`;break;case"datepicker":fe=`<div class="ant-picker-custom" ${de} ${te} ${le}><a-date-picker ${ne} ${oe} ${ce} ${pe} ${me} style='${se}' ${ye} ${De+Ne} ${H.extended}/></div>`;break;case"rangepicker":fe=`<div class="ant-picker-range-custom" ${de} ${te} ${le}><a-range-picker ${ne} ${oe} ${ce} ${pe} ${me} style='${se}' ${De+Ne} ${H.extended}/></div>`;break;case"switch":fe=`<a-switch v-model:checked="${re}" />`;break;case"radio":let dt=getOptionsHtml(H,"radio"),gt=H.optionsType=="data"?`:options="getDictItemsByCode('${H.dic}')"`:"";fe=`<a-radio-group ${de} ${Q} ${H.extended} ${gt} >${dt}</a-radio-group>`;break;case"checkbox":let pt=getOptionsHtml(H,"checkbox");const xt=selectSyncHtml(ge,H,X),mt=X==null?"":`:value="formatMultipleSelectValue(viewData.${X})"`;let bt=H.model?`:data-value="JSON.stringify(formatMultipleSelectValue(viewData.${X}))"`:"",wt=H.optionsType=="data"?`:options="getDictItemsByCode('${H.dic}')"`:"";fe=`<a-checkbox-group ${de} ${mt} ${bt} ${te} ${H.extended} ${xt} ${wt}>${pt} </a-checkbox-group>`;break;case"image":let Et=H.model?`:src="${H.model}"`:H.static?`src="${H.static}"`:"";const Dt=H.width?`width: ${H.width};`:"",Nt=H.height?`height: ${H.height};`:"";fe=`<img ${Et} style="${Dt}${Nt}"/>`;break}K+=`<a-form-item ${ue} ${ve} label="${H.name}" ${ae}>${fe}</a-form-item>`;break}return K}function selectSyncHtml(H,C,W){var Z;H=C.multiple?'mode="multiple"':"";const U=C.syncField?C.syncField:"";let K="",G=C.multiple&&C.punctuation?C.punctuation:"','",Q=C.changeEvent==null||((Z=C.changeEvent)==null?void 0:Z.trim())==""?"":","+C.changeEvent;return U!=""?K=` label-in-value @change="(value) => syncChange(value, viewData, ${G}, '${W}', '${U}'${Q})" `:H&&(Q=Q==""?"":`, null${Q}`,K=` label-in-value @change="(value) => syncChange(value, viewData, ${G}, '${W}'${Q})" `),K}function selectSlotHtml(H,C,W){let U="";if(C.multiple&&W&&C.dic){let K=`getDictItemsByCode(${C.dictType=="dynamic"?`viewData.${C.dic}`:`'${C.dic}'`})`;U=`
494
494
  <template #dropdownRender="{ menuNode: menu }">
495
495
  <a-checkbox style="padding: 2px 12px"
496
496
  :checked="getSelectAllCheck(viewData.${W}, ${K})"
@@ -1844,7 +1844,7 @@ The flag will not be saved for the future.
1844
1844
  `):void 0}:{range:Range$5.fromPositions(this.position),text:"",rejectReason:W.length>0?W.join(`
1845
1845
  `):void 0}})}provideRenameEdits(C,W){return __awaiter$e(this,void 0,void 0,function*(){return this._provideRenameEdits(C,this._providerRenameIdx,[],W)})}_provideRenameEdits(C,W,U,K){return __awaiter$e(this,void 0,void 0,function*(){const G=this._providers[W];if(!G)return{edits:[],rejectReason:U.join(`
1846
1846
  `)};const Q=yield G.provideRenameEdits(this.model,this.position,C,K);if(Q){if(Q.rejectReason)return this._provideRenameEdits(C,W+1,U.concat(Q.rejectReason),K)}else return this._provideRenameEdits(C,W+1,U.concat(localize("no result","No result.")),K);return Q})}}function rename(H,C,W,U){return __awaiter$e(this,void 0,void 0,function*(){const K=new RenameSkeleton(C,W,H),G=yield K.resolveRenameLocation(CancellationToken.None);return G!=null&&G.rejectReason?{edits:[],rejectReason:G.rejectReason}:K.provideRenameEdits(U,CancellationToken.None)})}let RenameController=RenameController_1=class{static get(C){return C.getContribution(RenameController_1.ID)}constructor(C,W,U,K,G,Q,Z,X){this.editor=C,this._instaService=W,this._notificationService=U,this._bulkEditService=K,this._progressService=G,this._logService=Q,this._configService=Z,this._languageFeaturesService=X,this._disposableStore=new DisposableStore,this._cts=new CancellationTokenSource$1,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var C,W;return __awaiter$e(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new CancellationTokenSource$1,!this.editor.hasModel())return;const U=this.editor.getPosition(),K=new RenameSkeleton(this.editor.getModel(),U,this._languageFeaturesService.renameProvider);if(!K.hasProvider())return;const G=new EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let Q;try{const re=K.resolveRenameLocation(G.token);this._progressService.showWhile(re,250),Q=yield re}catch(re){(C=MessageController.get(this.editor))===null||C===void 0||C.showMessage(re||localize("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),U);return}finally{G.dispose()}if(!Q)return;if(Q.rejectReason){(W=MessageController.get(this.editor))===null||W===void 0||W.showMessage(Q.rejectReason,U);return}if(G.token.isCancellationRequested)return;const Z=new EditorStateCancellationTokenSource(this.editor,5,Q.range,this._cts.token),X=this.editor.getSelection();let ee=0,te=Q.text.length;!Range$5.isEmpty(X)&&!Range$5.spansMultipleLines(X)&&Range$5.containsRange(Q.range,X)&&(ee=Math.max(0,X.startColumn-Q.range.startColumn),te=Math.min(Q.range.endColumn,X.endColumn)-Q.range.startColumn);const ne=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ie=yield this._renameInputField.getInput(Q.range,Q.text,ee,te,ne,Z.token);if(typeof ie=="boolean"){ie&&this.editor.focus(),Z.dispose();return}this.editor.focus();const oe=raceCancellation(K.provideRenameEdits(ie.newName,Z.token),Z.token).then(re=>__awaiter$e(this,void 0,void 0,function*(){if(!(!re||!this.editor.hasModel())){if(re.rejectReason){this._notificationService.info(re.rejectReason);return}this.editor.setSelection(Range$5.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(re,{editor:this.editor,showPreview:ie.wantsPreview,label:localize("label","Renaming '{0}' to '{1}'",Q==null?void 0:Q.text,ie.newName),code:"undoredo.rename",quotableLabel:localize("quotableLabel","Renaming {0} to {1}",Q==null?void 0:Q.text,ie.newName),respectAutoSaveConfig:!0}).then(se=>{se.ariaSummary&&alert(localize("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",Q.text,ie.newName,se.ariaSummary))}).catch(se=>{this._notificationService.error(localize("rename.failedApply","Rename failed to apply edits")),this._logService.error(se)})}}),re=>{this._notificationService.error(localize("rename.failed","Rename failed to compute edits")),this._logService.error(re)}).finally(()=>{Z.dispose()});return this._progressService.showWhile(oe,250),oe})}acceptRenameInput(C){this._renameInputField.acceptInput(C)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};RenameController.ID="editor.contrib.renameController",RenameController=RenameController_1=__decorate$k([__param$k(1,IInstantiationService),__param$k(2,INotificationService),__param$k(3,IBulkEditService),__param$k(4,IEditorProgressService),__param$k(5,ILogService),__param$k(6,ITextResourceConfigurationService),__param$k(7,ILanguageFeaturesService)],RenameController);class RenameAction extends EditorAction{constructor(){super({id:"editor.action.rename",label:localize("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ContextKeyExpr.and(EditorContextKeys.writable,EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(C,W){const U=C.get(ICodeEditorService),[K,G]=Array.isArray(W)&&W||[void 0,void 0];return URI.isUri(K)&&Position$4.isIPosition(G)?U.openCodeEditor({resource:K},U.getActiveCodeEditor()).then(Q=>{Q&&(Q.setPosition(G),Q.invokeWithinContext(Z=>(this.reportTelemetry(Z,Q),this.run(Z,Q))))},onUnexpectedError):super.runCommand(C,W)}run(C,W){const U=RenameController.get(W);return U?U.run():Promise.resolve()}}registerEditorContribution(RenameController.ID,RenameController,4),registerEditorAction(RenameAction);const RenameCommand=EditorCommand.bindToContribution(RenameController.get);registerEditorCommand(new RenameCommand({id:"acceptRenameInput",precondition:CONTEXT_RENAME_INPUT_VISIBLE,handler:H=>H.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:ContextKeyExpr.and(EditorContextKeys.focus,ContextKeyExpr.not("isComposing")),primary:3}})),registerEditorCommand(new RenameCommand({id:"acceptRenameInputWithPreview",precondition:ContextKeyExpr.and(CONTEXT_RENAME_INPUT_VISIBLE,ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:H=>H.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:ContextKeyExpr.and(EditorContextKeys.focus,ContextKeyExpr.not("isComposing")),primary:1024+3}})),registerEditorCommand(new RenameCommand({id:"cancelRenameInput",precondition:CONTEXT_RENAME_INPUT_VISIBLE,handler:H=>H.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:EditorContextKeys.focus,primary:9,secondary:[1033]}})),registerModelAndPositionCommand("_executeDocumentRenameProvider",function(H,C,W,...U){const[K]=U;assertType(typeof K=="string");const{renameProvider:G}=H.get(ILanguageFeaturesService);return rename(G,C,W,K)}),registerModelAndPositionCommand("_executePrepareRename",function(H,C,W){return __awaiter$e(this,void 0,void 0,function*(){const{renameProvider:U}=H.get(ILanguageFeaturesService),G=yield new RenameSkeleton(C,W,U).resolveRenameLocation(CancellationToken.None);if(G!=null&&G.rejectReason)throw new Error(G.rejectReason);return G})}),Registry.as(Extensions$6.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:localize("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function reverseEndianness(H){for(let C=0,W=H.length;C<W;C+=4){const U=H[C+0],K=H[C+1],G=H[C+2],Q=H[C+3];H[C+0]=Q,H[C+1]=G,H[C+2]=K,H[C+3]=U}}function toLittleEndianBuffer(H){const C=new Uint8Array(H.buffer,H.byteOffset,H.length*4);return isLittleEndian()||reverseEndianness(C),VSBuffer.wrap(C)}function encodeSemanticTokensDto(H){const C=new Uint32Array(encodeSemanticTokensDtoSize(H));let W=0;if(C[W++]=H.id,H.type==="full")C[W++]=1,C[W++]=H.data.length,C.set(H.data,W),W+=H.data.length;else{C[W++]=2,C[W++]=H.deltas.length;for(const U of H.deltas)C[W++]=U.start,C[W++]=U.deleteCount,U.data?(C[W++]=U.data.length,C.set(U.data,W),W+=U.data.length):C[W++]=0}return toLittleEndianBuffer(C)}function encodeSemanticTokensDtoSize(H){let C=0;if(C+=1+1,H.type==="full")C+=1+H.data.length;else{C+=1,C+=(1+1+1)*H.deltas.length;for(const W of H.deltas)W.data&&(C+=W.data.length)}return C}var __awaiter$d=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};function isSemanticTokens(H){return H&&!!H.data}function isSemanticTokensEdits(H){return H&&Array.isArray(H.edits)}class DocumentSemanticTokensResult{constructor(C,W,U){this.provider=C,this.tokens=W,this.error=U}}function hasDocumentSemanticTokensProvider(H,C){return H.has(C)}function getDocumentSemanticTokensProviders(H,C){const W=H.orderedGroups(C);return W.length>0?W[0]:[]}function getDocumentSemanticTokens(H,C,W,U,K){return __awaiter$d(this,void 0,void 0,function*(){const G=getDocumentSemanticTokensProviders(H,C),Q=yield Promise.all(G.map(Z=>__awaiter$d(this,void 0,void 0,function*(){let X,ee=null;try{X=yield Z.provideDocumentSemanticTokens(C,Z===W?U:null,K)}catch(te){ee=te,X=null}return(!X||!isSemanticTokens(X)&&!isSemanticTokensEdits(X))&&(X=null),new DocumentSemanticTokensResult(Z,X,ee)})));for(const Z of Q){if(Z.error)throw Z.error;if(Z.tokens)return Z}return Q.length>0?Q[0]:null})}function _getDocumentSemanticTokensProviderHighestGroup(H,C){const W=H.orderedGroups(C);return W.length>0?W[0]:null}class DocumentRangeSemanticTokensResult{constructor(C,W){this.provider=C,this.tokens=W}}function hasDocumentRangeSemanticTokensProvider(H,C){return H.has(C)}function getDocumentRangeSemanticTokensProviders(H,C){const W=H.orderedGroups(C);return W.length>0?W[0]:[]}function getDocumentRangeSemanticTokens(H,C,W,U){return __awaiter$d(this,void 0,void 0,function*(){const K=getDocumentRangeSemanticTokensProviders(H,C),G=yield Promise.all(K.map(Q=>__awaiter$d(this,void 0,void 0,function*(){let Z;try{Z=yield Q.provideDocumentRangeSemanticTokens(C,W,U)}catch(X){onUnexpectedExternalError(X),Z=null}return(!Z||!isSemanticTokens(Z))&&(Z=null),new DocumentRangeSemanticTokensResult(Q,Z)})));for(const Q of G)if(Q.tokens)return Q;return G.length>0?G[0]:null})}CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(H,...C)=>__awaiter$d(void 0,void 0,void 0,function*(){const[W]=C;assertType(W instanceof URI);const U=H.get(IModelService).getModel(W);if(!U)return;const{documentSemanticTokensProvider:K}=H.get(ILanguageFeaturesService),G=_getDocumentSemanticTokensProviderHighestGroup(K,U);return G?G[0].getLegend():H.get(ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",W)})),CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(H,...C)=>__awaiter$d(void 0,void 0,void 0,function*(){const[W]=C;assertType(W instanceof URI);const U=H.get(IModelService).getModel(W);if(!U)return;const{documentSemanticTokensProvider:K}=H.get(ILanguageFeaturesService);if(!hasDocumentSemanticTokensProvider(K,U))return H.get(ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",W,U.getFullModelRange());const G=yield getDocumentSemanticTokens(K,U,null,null,CancellationToken.None);if(!G)return;const{provider:Q,tokens:Z}=G;if(!Z||!isSemanticTokens(Z))return;const X=encodeSemanticTokensDto({id:0,type:"full",data:Z.data});return Z.resultId&&Q.releaseDocumentSemanticTokens(Z.resultId),X})),CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(H,...C)=>__awaiter$d(void 0,void 0,void 0,function*(){const[W,U]=C;assertType(W instanceof URI);const K=H.get(IModelService).getModel(W);if(!K)return;const{documentRangeSemanticTokensProvider:G}=H.get(ILanguageFeaturesService),Q=getDocumentRangeSemanticTokensProviders(G,K);if(Q.length===0)return;if(Q.length===1)return Q[0].getLegend();if(!U||!Range$5.isIRange(U))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),Q[0].getLegend();const Z=yield getDocumentRangeSemanticTokens(G,K,Range$5.lift(U),CancellationToken.None);if(Z)return Z.provider.getLegend()})),CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(H,...C)=>__awaiter$d(void 0,void 0,void 0,function*(){const[W,U]=C;assertType(W instanceof URI),assertType(Range$5.isIRange(U));const K=H.get(IModelService).getModel(W);if(!K)return;const{documentRangeSemanticTokensProvider:G}=H.get(ILanguageFeaturesService),Q=yield getDocumentRangeSemanticTokens(G,K,Range$5.lift(U),CancellationToken.None);if(!(!Q||!Q.tokens))return encodeSemanticTokensDto({id:0,type:"full",data:Q.tokens.data})}));const SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function isSemanticColoringEnabled(H,C,W){var U;const K=(U=W.getValue(SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:H.getLanguageId(),resource:H.uri}))===null||U===void 0?void 0:U.enabled;return typeof K=="boolean"?K:C.getColorTheme().semanticHighlighting}var __decorate$j=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$j=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},ModelSemanticColoring_1;let DocumentSemanticTokensFeature=class extends Disposable{constructor(C,W,U,K,G,Q){super(),this._watchers=Object.create(null);const Z=te=>{this._watchers[te.uri.toString()]=new ModelSemanticColoring(te,C,U,G,Q)},X=(te,ne)=>{ne.dispose(),delete this._watchers[te.uri.toString()]},ee=()=>{for(const te of W.getModels()){const ne=this._watchers[te.uri.toString()];isSemanticColoringEnabled(te,U,K)?ne||Z(te):ne&&X(te,ne)}};this._register(W.onModelAdded(te=>{isSemanticColoringEnabled(te,U,K)&&Z(te)})),this._register(W.onModelRemoved(te=>{const ne=this._watchers[te.uri.toString()];ne&&X(te,ne)})),this._register(K.onDidChangeConfiguration(te=>{te.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)&&ee()})),this._register(U.onDidColorThemeChange(ee))}dispose(){for(const C of Object.values(this._watchers))C.dispose();super.dispose()}};DocumentSemanticTokensFeature=__decorate$j([__param$j(0,ISemanticTokensStylingService),__param$j(1,IModelService),__param$j(2,IThemeService),__param$j(3,IConfigurationService),__param$j(4,ILanguageFeatureDebounceService),__param$j(5,ILanguageFeaturesService)],DocumentSemanticTokensFeature);let ModelSemanticColoring=ModelSemanticColoring_1=class extends Disposable{constructor(C,W,U,K,G){super(),this._semanticTokensStylingService=W,this._isDisposed=!1,this._model=C,this._provider=G.documentSemanticTokensProvider,this._debounceInformation=K.for(this._provider,"DocumentSemanticTokens",{min:ModelSemanticColoring_1.REQUEST_MIN_DELAY,max:ModelSemanticColoring_1.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),ModelSemanticColoring_1.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 Q=()=>{dispose(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const Z of this._provider.all(C))typeof Z.onDidChange=="function"&&this._documentProvidersChangeListeners.push(Z.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};Q(),this._register(this._provider.onDidChange(()=>{Q(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(U.onDidColorThemeChange(Z=>{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),dispose(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!hasDocumentSemanticTokensProvider(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const C=new CancellationTokenSource$1,W=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,U=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,K=getDocumentSemanticTokens(this._provider,this._model,W,U,C.token);this._currentDocumentRequestCancellationTokenSource=C,this._providersChangedDuringRequest=!1;const G=[],Q=this._model.onDidChangeContent(X=>{G.push(X)}),Z=new StopWatch(!1);K.then(X=>{if(this._debounceInformation.update(this._model,Z.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,Q.dispose(),!X)this._setDocumentSemanticTokens(null,null,null,G);else{const{provider:ee,tokens:te}=X,ne=this._semanticTokensStylingService.getStyling(ee);this._setDocumentSemanticTokens(ee,te||null,ne,G)}},X=>{X&&(isCancellationError(X)||typeof X.message=="string"&&X.message.indexOf("busy")!==-1)||onUnexpectedError(X),this._currentDocumentRequestCancellationTokenSource=null,Q.dispose(),(G.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(C,W,U,K,G){G=Math.min(G,U.length-K,C.length-W);for(let Q=0;Q<G;Q++)U[K+Q]=C[W+Q]}_setDocumentSemanticTokens(C,W,U,K){const G=this._currentDocumentResponse,Q=()=>{(K.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){C&&W&&C.releaseDocumentSemanticTokens(W.resultId);return}if(!C||!U){this._model.tokenization.setSemanticTokens(null,!1);return}if(!W){this._model.tokenization.setSemanticTokens(null,!0),Q();return}if(isSemanticTokensEdits(W)){if(!G){this._model.tokenization.setSemanticTokens(null,!0);return}if(W.edits.length===0)W={resultId:W.resultId,data:G.data};else{let Z=0;for(const ie of W.edits)Z+=(ie.data?ie.data.length:0)-ie.deleteCount;const X=G.data,ee=new Uint32Array(X.length+Z);let te=X.length,ne=ee.length;for(let ie=W.edits.length-1;ie>=0;ie--){const oe=W.edits[ie];if(oe.start>X.length){U.warnInvalidEditStart(G.resultId,W.resultId,ie,oe.start,X.length),this._model.tokenization.setSemanticTokens(null,!0);return}const re=te-(oe.start+oe.deleteCount);re>0&&(ModelSemanticColoring_1._copy(X,te-re,ee,ne-re,re),ne-=re),oe.data&&(ModelSemanticColoring_1._copy(oe.data,0,ee,ne-oe.data.length,oe.data.length),ne-=oe.data.length),te=oe.start}te>0&&ModelSemanticColoring_1._copy(X,0,ee,0,te),W={resultId:W.resultId,data:ee}}}if(isSemanticTokens(W)){this._currentDocumentResponse=new SemanticTokensResponse(C,W.resultId,W.data);const Z=toMultilineTokens2(W,U,this._model.getLanguageId());if(K.length>0)for(const X of K)for(const ee of Z)for(const te of X.changes)ee.applyEdit(te.range,te.text);this._model.tokenization.setSemanticTokens(Z,!0)}else this._model.tokenization.setSemanticTokens(null,!0);Q()}};ModelSemanticColoring.REQUEST_MIN_DELAY=300,ModelSemanticColoring.REQUEST_MAX_DELAY=2e3,ModelSemanticColoring=ModelSemanticColoring_1=__decorate$j([__param$j(1,ISemanticTokensStylingService),__param$j(2,IThemeService),__param$j(3,ILanguageFeatureDebounceService),__param$j(4,ILanguageFeaturesService)],ModelSemanticColoring);class SemanticTokensResponse{constructor(C,W,U){this.provider=C,this.resultId=W,this.data=U}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}registerEditorFeature(DocumentSemanticTokensFeature);var __decorate$i=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$i=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let ViewportSemanticTokensContribution=class extends Disposable{constructor(C,W,U,K,G,Q){super(),this._semanticTokensStylingService=W,this._themeService=U,this._configurationService=K,this._editor=C,this._provider=Q.documentRangeSemanticTokensProvider,this._debounceInformation=G.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const Z=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{Z()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),Z()})),this._register(this._editor.onDidChangeModelContent(X=>{this._cancelAll(),Z()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),Z()})),this._register(this._configurationService.onDidChangeConfiguration(X=>{X.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),Z())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),Z()})),Z()}_cancelAll(){for(const C of this._outstandingRequests)C.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(C){for(let W=0,U=this._outstandingRequests.length;W<U;W++)if(this._outstandingRequests[W]===C){this._outstandingRequests.splice(W,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const C=this._editor.getModel();if(C.tokenization.hasCompleteSemanticTokens())return;if(!isSemanticColoringEnabled(C,this._themeService,this._configurationService)){C.tokenization.hasSomeSemanticTokens()&&C.tokenization.setSemanticTokens(null,!1);return}if(!hasDocumentRangeSemanticTokensProvider(this._provider,C)){C.tokenization.hasSomeSemanticTokens()&&C.tokenization.setSemanticTokens(null,!1);return}const W=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(W.map(U=>this._requestRange(C,U)))}_requestRange(C,W){const U=C.getVersionId(),K=createCancelablePromise(Q=>Promise.resolve(getDocumentRangeSemanticTokens(this._provider,C,W,Q))),G=new StopWatch(!1);return K.then(Q=>{if(this._debounceInformation.update(C,G.elapsed()),!Q||!Q.tokens||C.isDisposed()||C.getVersionId()!==U)return;const{provider:Z,tokens:X}=Q,ee=this._semanticTokensStylingService.getStyling(Z);C.tokenization.setPartialSemanticTokens(W,toMultilineTokens2(X,ee,C.getLanguageId()))}).then(()=>this._removeOutstandingRequest(K),()=>this._removeOutstandingRequest(K)),K}};ViewportSemanticTokensContribution.ID="editor.contrib.viewportSemanticTokens",ViewportSemanticTokensContribution=__decorate$i([__param$i(1,ISemanticTokensStylingService),__param$i(2,IThemeService),__param$i(3,IConfigurationService),__param$i(4,ILanguageFeatureDebounceService),__param$i(5,ILanguageFeaturesService)],ViewportSemanticTokensContribution),registerEditorContribution(ViewportSemanticTokensContribution.ID,ViewportSemanticTokensContribution,1);class WordSelectionRangeProvider{constructor(C=!0){this.selectSubwords=C}provideSelectionRanges(C,W){const U=[];for(const K of W){const G=[];U.push(G),this.selectSubwords&&this._addInWordRanges(G,C,K),this._addWordRanges(G,C,K),this._addWhitespaceLine(G,C,K),G.push({range:C.getFullModelRange()})}return U}_addInWordRanges(C,W,U){const K=W.getWordAtPosition(U);if(!K)return;const{word:G,startColumn:Q}=K,Z=U.column-Q;let X=Z,ee=Z,te=0;for(;X>=0;X--){const ne=G.charCodeAt(X);if(X!==Z&&(ne===95||ne===45))break;if(isLowerAsciiLetter(ne)&&isUpperAsciiLetter(te))break;te=ne}for(X+=1;ee<G.length;ee++){const ne=G.charCodeAt(ee);if(isUpperAsciiLetter(ne)&&isLowerAsciiLetter(te))break;if(ne===95||ne===45)break;te=ne}X<ee&&C.push({range:new Range$5(U.lineNumber,Q+X,U.lineNumber,Q+ee)})}_addWordRanges(C,W,U){const K=W.getWordAtPosition(U);K&&C.push({range:new Range$5(U.lineNumber,K.startColumn,U.lineNumber,K.endColumn)})}_addWhitespaceLine(C,W,U){W.getLineLength(U.lineNumber)>0&&W.getLineFirstNonWhitespaceColumn(U.lineNumber)===0&&W.getLineLastNonWhitespaceColumn(U.lineNumber)===0&&C.push({range:new Range$5(U.lineNumber,1,U.lineNumber,W.getLineMaxColumn(U.lineNumber))})}}var __decorate$h=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$h=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$c=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},SmartSelectController_1;class SelectionRanges{constructor(C,W){this.index=C,this.ranges=W}mov(C){const W=this.index+(C?1:-1);if(W<0||W>=this.ranges.length)return this;const U=new SelectionRanges(W,this.ranges);return U.ranges[W].equalsRange(this.ranges[this.index])?U.mov(C):U}}let SmartSelectController=SmartSelectController_1=class{static get(C){return C.getContribution(SmartSelectController_1.ID)}constructor(C,W){this._editor=C,this._languageFeaturesService=W,this._ignoreSelection=!1}dispose(){var C;(C=this._selectionListener)===null||C===void 0||C.dispose()}run(C){return __awaiter$c(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const W=this._editor.getSelections(),U=this._editor.getModel();if(this._state||(yield provideSelectionRanges(this._languageFeaturesService.selectionRangeProvider,U,W.map(G=>G.getPosition()),this._editor.getOption(112),CancellationToken.None).then(G=>{var Q;if(!(!isNonEmptyArray(G)||G.length!==W.length)&&!(!this._editor.hasModel()||!equals$2(this._editor.getSelections(),W,(Z,X)=>Z.equalsSelection(X)))){for(let Z=0;Z<G.length;Z++)G[Z]=G[Z].filter(X=>X.containsPosition(W[Z].getStartPosition())&&X.containsPosition(W[Z].getEndPosition())),G[Z].unshift(W[Z]);this._state=G.map(Z=>new SelectionRanges(0,Z)),(Q=this._selectionListener)===null||Q===void 0||Q.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var Z;this._ignoreSelection||((Z=this._selectionListener)===null||Z===void 0||Z.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(G=>G.mov(C));const K=this._state.map(G=>Selection$1.fromPositions(G.ranges[G.index].getStartPosition(),G.ranges[G.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(K)}finally{this._ignoreSelection=!1}})}};SmartSelectController.ID="editor.contrib.smartSelectController",SmartSelectController=SmartSelectController_1=__decorate$h([__param$h(1,ILanguageFeaturesService)],SmartSelectController);class AbstractSmartSelect extends EditorAction{constructor(C,W){super(W),this._forward=C}run(C,W){return __awaiter$c(this,void 0,void 0,function*(){const U=SmartSelectController.get(W);U&&(yield U.run(this._forward))})}}class GrowSelectionAction extends AbstractSmartSelect{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:localize("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:MenuId.MenubarSelectionMenu,group:"1_basic",title:localize({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class ShrinkSelectionAction extends AbstractSmartSelect{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:localize("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:MenuId.MenubarSelectionMenu,group:"1_basic",title:localize({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}registerEditorContribution(SmartSelectController.ID,SmartSelectController,4),registerEditorAction(GrowSelectionAction),registerEditorAction(ShrinkSelectionAction);function provideSelectionRanges(H,C,W,U,K){return __awaiter$c(this,void 0,void 0,function*(){const G=H.all(C).concat(new WordSelectionRangeProvider(U.selectSubwords));G.length===1&&G.unshift(new BracketSelectionRangeProvider);const Q=[],Z=[];for(const X of G)Q.push(Promise.resolve(X.provideSelectionRanges(C,W,K)).then(ee=>{if(isNonEmptyArray(ee)&&ee.length===W.length)for(let te=0;te<W.length;te++){Z[te]||(Z[te]=[]);for(const ne of ee[te])Range$5.isIRange(ne.range)&&Range$5.containsPosition(ne.range,W[te])&&Z[te].push(Range$5.lift(ne.range))}},onUnexpectedExternalError));return yield Promise.all(Q),Z.map(X=>{if(X.length===0)return[];X.sort((ie,oe)=>Position$4.isBefore(ie.getStartPosition(),oe.getStartPosition())?1:Position$4.isBefore(oe.getStartPosition(),ie.getStartPosition())||Position$4.isBefore(ie.getEndPosition(),oe.getEndPosition())?-1:Position$4.isBefore(oe.getEndPosition(),ie.getEndPosition())?1:0);const ee=[];let te;for(const ie of X)(!te||Range$5.containsRange(ie,te)&&!Range$5.equalsRange(ie,te))&&(ee.push(ie),te=ie);if(!U.selectLeadingAndTrailingWhitespace)return ee;const ne=[ee[0]];for(let ie=1;ie<ee.length;ie++){const oe=ee[ie-1],re=ee[ie];if(re.startLineNumber!==oe.startLineNumber||re.endLineNumber!==oe.endLineNumber){const se=new Range$5(oe.startLineNumber,C.getLineFirstNonWhitespaceColumn(oe.startLineNumber),oe.endLineNumber,C.getLineLastNonWhitespaceColumn(oe.endLineNumber));se.containsRange(oe)&&!se.equalsRange(oe)&&re.containsRange(se)&&!re.equalsRange(se)&&ne.push(se);const ae=new Range$5(oe.startLineNumber,1,oe.endLineNumber,C.getLineMaxColumn(oe.endLineNumber));ae.containsRange(oe)&&!ae.equalsRange(se)&&re.containsRange(ae)&&!re.equalsRange(ae)&&ne.push(ae)}ne.push(re)}return ne})})}CommandsRegistry.registerCommand("_executeSelectionRangeProvider",function(H,...C){return __awaiter$c(this,void 0,void 0,function*(){const[W,U]=C;assertType(URI.isUri(W));const K=H.get(ILanguageFeaturesService).selectionRangeProvider,G=yield H.get(ITextModelService).createModelReference(W);try{return provideSelectionRanges(K,G.object.textEditorModel,U,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},CancellationToken.None)}finally{G.dispose()}})});const Categories=Object.freeze({View:{value:localize("view","View"),original:"View"},Help:{value:localize("help","Help"),original:"Help"},Test:{value:localize("test","Test"),original:"Test"},File:{value:localize("file","File"),original:"File"},Preferences:{value:localize("preferences","Preferences"),original:"Preferences"},Developer:{value:localize({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}}),stickyScroll="";var __awaiter$b=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};class StickyScrollWidgetState{constructor(C,W,U,K=null){this.startLineNumbers=C,this.endLineNumbers=W,this.lastLineRelativePosition=U,this.showEndForLine=K}equals(C){return!!C&&this.lastLineRelativePosition===C.lastLineRelativePosition&&this.showEndForLine===C.showEndForLine&&equals$2(this.startLineNumbers,C.startLineNumbers)&&equals$2(this.endLineNumbers,C.endLineNumbers)}}const _ttPolicy=createTrustedTypesPolicy("stickyScrollViewLayer",{createHTML:H=>H}),STICKY_INDEX_ATTR="data-sticky-line-index",STICKY_IS_LINE_ATTR="data-sticky-is-line",STICKY_IS_LINE_NUMBER_ATTR="data-sticky-is-line-number",STICKY_IS_FOLDING_ICON_ATTR="data-sticky-is-folding-icon";class StickyScrollWidget extends Disposable{constructor(C){super(),this._editor=C,this._foldingIconStore=new DisposableStore,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",C instanceof EmbeddedCodeEditorWidget),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const W=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(U=>{U.hasChanged(114)&&W(),U.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(U=>{U.scrollLeftChanged&&W(),U.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{W(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),W(),this._register(this._editor.onDidLayoutChange(U=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(C){return this._stickyLines.find(W=>W.lineNumber===C)}getCurrentLines(){return this._lineNumbers}setState(C,W,U=1/0){if((!this._previousState&&!C||this._previousState&&this._previousState.equals(C))&&U===1/0)return;this._previousState=C;const K=this._stickyLines;if(this._clearStickyWidget(),!C||!this._editor._getViewModel())return;if(C.startLineNumbers.length*this._lineHeight+C.lastLineRelativePosition>0){this._lastLineRelativePosition=C.lastLineRelativePosition;const Q=[...C.startLineNumbers];C.showEndForLine!==null&&(Q[C.showEndForLine]=C.endLineNumbers[C.showEndForLine]),this._lineNumbers=Q}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(K,W,U)}_updateWidgetWidth(){const C=this._editor.getLayoutInfo(),W=C.contentLeft;this._lineNumbersDomNode.style.width=`${W}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-C.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${C.width-C.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),clearNode(this._lineNumbersDomNode),clearNode(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(C){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${C?.5:0}s`)}_setFoldingIconsVisibility(C){for(const W of this._stickyLines){const U=W.foldingIcon;U&&U.setVisible(C?!0:U.isCollapsed)}}_renderRootNode(C,W,U=1/0){return __awaiter$b(this,void 0,void 0,function*(){const K=this._editor.getLayoutInfo();for(const[Q,Z]of this._lineNumbers.entries()){const X=C[Q],ee=Z>=U||(X==null?void 0:X.lineNumber)!==Z?this._renderChildNode(Q,Z,W,K):this._updateTopAndZIndexOfStickyLine(X);ee&&(this._linesDomNode.appendChild(ee.lineDomNode),this._lineNumbersDomNode.appendChild(ee.lineNumberDomNode),this._stickyLines.push(ee))}W&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const G=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(G===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${G}px`,this._linesDomNodeScrollable.style.height=`${G}px`,this._rootDomNode.style.height=`${G}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(addDisposableListener(this._lineNumbersDomNode,EventType$1.MOUSE_ENTER,W=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(addDisposableListener(this._lineNumbersDomNode,EventType$1.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(C,W,U,K){const G=this._editor._getViewModel();if(!G)return;const Q=G.coordinatesConverter.convertModelPositionToViewPosition(new Position$4(W,1)).lineNumber,Z=G.getViewLineRenderingData(Q),X=this._editor.getOption(67);let ee;try{ee=LineDecoration.filter(Z.inlineDecorations,Q,Z.minColumn,Z.maxColumn)}catch{ee=[]}const te=new RenderLineInput(!0,!0,Z.content,Z.continuesWithWrappedLine,Z.isBasicASCII,Z.containsRTL,0,Z.tokens,ee,Z.tabSize,Z.startVisibleColumn,1,1,1,500,"none",!0,!0,null),ne=new StringBuilder(2e3),ie=renderViewLine(te,ne);let oe;_ttPolicy?oe=_ttPolicy.createHTML(ne.build()):oe=ne.build();const re=document.createElement("span");re.setAttribute(STICKY_INDEX_ATTR,String(C)),re.setAttribute(STICKY_IS_LINE_ATTR,""),re.setAttribute("role","listitem"),re.tabIndex=0,re.className="sticky-line-content",re.classList.add(`stickyLine${W}`),re.style.lineHeight=`${this._lineHeight}px`,re.innerHTML=oe;const se=document.createElement("span");se.setAttribute(STICKY_INDEX_ATTR,String(C)),se.setAttribute(STICKY_IS_LINE_NUMBER_ATTR,""),se.className="sticky-line-number",se.style.lineHeight=`${this._lineHeight}px`;const ae=K.contentLeft;se.style.width=`${ae}px`;const le=document.createElement("span");X.renderType===1||X.renderType===3&&W%10===0?le.innerText=W.toString():X.renderType===2&&(le.innerText=Math.abs(W-this._editor.getPosition().lineNumber).toString()),le.className="sticky-line-number-inner",le.style.lineHeight=`${this._lineHeight}px`,le.style.width=`${K.lineNumbersWidth}px`,le.style.paddingLeft=`${K.lineNumbersLeft}px`,se.appendChild(le);const ce=this._renderFoldingIconForLine(U,W);ce&&se.appendChild(ce.domNode),this._editor.applyFontInfo(re),this._editor.applyFontInfo(le),se.style.lineHeight=`${this._lineHeight}px`,re.style.lineHeight=`${this._lineHeight}px`,se.style.height=`${this._lineHeight}px`,re.style.height=`${this._lineHeight}px`;const de=new RenderedStickyLine(C,W,re,se,ce,ie.characterMapping);return this._updateTopAndZIndexOfStickyLine(de)}_updateTopAndZIndexOfStickyLine(C){var W;const U=C.index,K=C.lineDomNode,G=C.lineNumberDomNode,Q=U===this._lineNumbers.length-1,Z="0",X="1";K.style.zIndex=Q?Z:X,G.style.zIndex=Q?Z:X;const ee=`${U*this._lineHeight+this._lastLineRelativePosition+(!((W=C.foldingIcon)===null||W===void 0)&&W.isCollapsed?1:0)}px`,te=`${U*this._lineHeight}px`;return K.style.top=Q?ee:te,G.style.top=Q?ee:te,C}_renderFoldingIconForLine(C,W){const U=this._editor.getOption(109);if(!C||U==="never")return;const K=C.regions,G=K.findRange(W),Q=K.getStartLineNumber(G);if(!(W===Q))return;const X=K.isCollapsed(G),ee=new StickyFoldingIcon(X,Q,K.getEndLineNumber(G),this._lineHeight);return ee.setVisible(this._isOnGlyphMargin?!0:X||U==="always"),ee.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR,""),ee}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const C of this._stickyLines)C.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=C.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(C){0<=C&&C<this._stickyLines.length&&this._stickyLines[C].lineDomNode.focus()}getEditorPositionFromNode(C){if(!C||C.children.length>0)return null;const W=this._getRenderedStickyLineFromChildDomNode(C);if(!W)return null;const U=getColumnOfNodeOffset(W.characterMapping,C,0);return new Position$4(W.lineNumber,U)}getLineNumberFromChildDomNode(C){var W,U;return(U=(W=this._getRenderedStickyLineFromChildDomNode(C))===null||W===void 0?void 0:W.lineNumber)!==null&&U!==void 0?U:null}_getRenderedStickyLineFromChildDomNode(C){const W=this.getLineIndexFromChildDomNode(C);return W===null||W<0||W>=this._stickyLines.length?null:this._stickyLines[W]}getLineIndexFromChildDomNode(C){const W=this._getAttributeValue(C,STICKY_INDEX_ATTR);return W?parseInt(W,10):null}isInStickyLine(C){return this._getAttributeValue(C,STICKY_IS_LINE_ATTR)!==void 0}isInFoldingIconDomNode(C){return this._getAttributeValue(C,STICKY_IS_FOLDING_ICON_ATTR)!==void 0}_getAttributeValue(C,W){for(;C&&C!==this._rootDomNode;){const U=C.getAttribute(W);if(U!==null)return U;C=C.parentElement}}}class RenderedStickyLine{constructor(C,W,U,K,G,Q){this.index=C,this.lineNumber=W,this.lineDomNode=U,this.lineNumberDomNode=K,this.foldingIcon=G,this.characterMapping=Q}}class StickyFoldingIcon{constructor(C,W,U,K){this.isCollapsed=C,this.foldingStartLine=W,this.foldingEndLine=U,this.dimension=K,this.domNode=document.createElement("div"),this.domNode.style.width=`${K}px`,this.domNode.style.height=`${K}px`,this.domNode.className=ThemeIcon.asClassName(C?foldingCollapsedIcon:foldingExpandedIcon)}setVisible(C){this.domNode.style.cursor=C?"pointer":"default",this.domNode.style.opacity=C?"1":"0"}}class StickyRange{constructor(C,W){this.startLineNumber=C,this.endLineNumber=W}}class StickyElement{constructor(C,W,U){this.range=C,this.children=W,this.parent=U}}class StickyModel{constructor(C,W,U,K){this.uri=C,this.version=W,this.element=U,this.outlineProviderId=K}}var __decorate$g=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$g=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$a=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},ModelProvider;(function(H){H.OUTLINE_MODEL="outlineModel",H.FOLDING_PROVIDER_MODEL="foldingProviderModel",H.INDENTATION_MODEL="indentationModel"})(ModelProvider||(ModelProvider={}));var Status;(function(H){H[H.VALID=0]="VALID",H[H.INVALID=1]="INVALID",H[H.CANCELED=2]="CANCELED"})(Status||(Status={}));let StickyModelProvider=class extends Disposable{constructor(C,W,U,K){super(),this._editor=C,this._languageConfigurationService=W,this._languageFeaturesService=U,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Delayer(300)),this._updateOperation=this._register(new DisposableStore);const G=new StickyModelFromCandidateOutlineProvider(U),Q=new StickyModelFromCandidateSyntaxFoldingProvider(this._editor,U),Z=new StickyModelFromCandidateIndentationFoldingProvider(this._editor,W);switch(K){case ModelProvider.OUTLINE_MODEL:this._modelProviders.push(G),this._modelProviders.push(Q),this._modelProviders.push(Z);break;case ModelProvider.FOLDING_PROVIDER_MODEL:this._modelProviders.push(Q),this._modelProviders.push(Z);break;case ModelProvider.INDENTATION_MODEL:this._modelProviders.push(Z);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(C,W,U){return __awaiter$a(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(()=>__awaiter$a(this,void 0,void 0,function*(){for(const K of this._modelProviders){const{statusPromise:G,modelPromise:Q}=K.computeStickyModel(C,W,U);this._modelPromise=Q;const Z=yield G;if(this._modelPromise!==Q)return null;switch(Z){case Status.CANCELED:return this._updateOperation.clear(),null;case Status.VALID:return K.stickyModel}}return null})).catch(K=>(onUnexpectedError(K),null))})}};StickyModelProvider=__decorate$g([__param$g(1,ILanguageConfigurationService),__param$g(2,ILanguageFeaturesService)],StickyModelProvider);class StickyModelCandidateProvider{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Status.INVALID}computeStickyModel(C,W,U){if(U.isCancellationRequested||!this.isProviderValid(C))return{statusPromise:this._invalid(),modelPromise:null};const K=createCancelablePromise(G=>this.createModelFromProvider(C,W,G));return{statusPromise:K.then(G=>this.isModelValid(G)?U.isCancellationRequested?Status.CANCELED:(this._stickyModel=this.createStickyModel(C,W,U,G),Status.VALID):this._invalid()).then(void 0,G=>(onUnexpectedError(G),Status.CANCELED)),modelPromise:K}}isModelValid(C){return!0}isProviderValid(C){return!0}}let StickyModelFromCandidateOutlineProvider=class extends StickyModelCandidateProvider{constructor(C){super(),this._languageFeaturesService=C}createModelFromProvider(C,W,U){return OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,C,U)}createStickyModel(C,W,U,K){var G;const{stickyOutlineElement:Q,providerID:Z}=this._stickyModelFromOutlineModel(K,(G=this._stickyModel)===null||G===void 0?void 0:G.outlineProviderId);return new StickyModel(C.uri,W,Q,Z)}isModelValid(C){return C&&C.children.size>0}_stickyModelFromOutlineModel(C,W){let U;if(Iterable.first(C.children.values())instanceof OutlineGroup){const Z=Iterable.find(C.children.values(),X=>X.id===W);if(Z)U=Z.children;else{let X="",ee=-1,te;for(const[ne,ie]of C.children.entries()){const oe=this._findSumOfRangesOfGroup(ie);oe>ee&&(te=ie,ee=oe,X=ie.id)}W=X,U=te.children}}else U=C.children;const K=[],G=Array.from(U.values()).sort((Z,X)=>{const ee=new StickyRange(Z.symbol.range.startLineNumber,Z.symbol.range.endLineNumber),te=new StickyRange(X.symbol.range.startLineNumber,X.symbol.range.endLineNumber);return this._comparator(ee,te)});for(const Z of G)K.push(this._stickyModelFromOutlineElement(Z,Z.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new StickyElement(void 0,K,void 0),providerID:W}}_stickyModelFromOutlineElement(C,W){const U=[];for(const G of C.children.values())if(G.symbol.selectionRange.startLineNumber!==G.symbol.range.endLineNumber)if(G.symbol.selectionRange.startLineNumber!==W)U.push(this._stickyModelFromOutlineElement(G,G.symbol.selectionRange.startLineNumber));else for(const Q of G.children.values())U.push(this._stickyModelFromOutlineElement(Q,G.symbol.selectionRange.startLineNumber));U.sort((G,Q)=>this._comparator(G.range,Q.range));const K=new StickyRange(C.symbol.selectionRange.startLineNumber,C.symbol.range.endLineNumber);return new StickyElement(K,U,void 0)}_comparator(C,W){return C.startLineNumber!==W.startLineNumber?C.startLineNumber-W.startLineNumber:W.endLineNumber-C.endLineNumber}_findSumOfRangesOfGroup(C){let W=0;for(const U of C.children.values())W+=this._findSumOfRangesOfGroup(U);return C instanceof OutlineElement?W+C.symbol.range.endLineNumber-C.symbol.selectionRange.startLineNumber:W}};StickyModelFromCandidateOutlineProvider=__decorate$g([__param$g(0,ILanguageFeaturesService)],StickyModelFromCandidateOutlineProvider);class StickyModelFromCandidateFoldingProvider extends StickyModelCandidateProvider{constructor(C){super(),this._foldingLimitReporter=new RangesLimitReporter(C)}createStickyModel(C,W,U,K){const G=this._fromFoldingRegions(K);return new StickyModel(C.uri,W,G,void 0)}isModelValid(C){return C!==null}_fromFoldingRegions(C){const W=C.length,U=[],K=new StickyElement(void 0,[],void 0);for(let G=0;G<W;G++){const Q=C.getParentIndex(G);let Z;Q!==-1?Z=U[Q]:Z=K;const X=new StickyElement(new StickyRange(C.getStartLineNumber(G),C.getEndLineNumber(G)+1),[],Z);Z.children.push(X),U.push(X)}return K}}let StickyModelFromCandidateIndentationFoldingProvider=class extends StickyModelFromCandidateFoldingProvider{constructor(C,W){super(C),this._languageConfigurationService=W}createModelFromProvider(C,W,U){return new IndentRangeProvider(C,this._languageConfigurationService,this._foldingLimitReporter).compute(U)}};StickyModelFromCandidateIndentationFoldingProvider=__decorate$g([__param$g(1,ILanguageConfigurationService)],StickyModelFromCandidateIndentationFoldingProvider);let StickyModelFromCandidateSyntaxFoldingProvider=class extends StickyModelFromCandidateFoldingProvider{constructor(C,W){super(C),this._languageFeaturesService=W}isProviderValid(C){return FoldingController.getFoldingRangeProviders(this._languageFeaturesService,C).length>0}createModelFromProvider(C,W,U){const K=FoldingController.getFoldingRangeProviders(this._languageFeaturesService,C);return new SyntaxRangeProvider(C,K,()=>this.createModelFromProvider(C,W,U),this._foldingLimitReporter,void 0).compute(U)}};StickyModelFromCandidateSyntaxFoldingProvider=__decorate$g([__param$g(1,ILanguageFeaturesService)],StickyModelFromCandidateSyntaxFoldingProvider);var __decorate$f=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$f=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$9=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};class StickyLineCandidate{constructor(C,W,U){this.startLineNumber=C,this.endLineNumber=W,this.nestingDepth=U}}let StickyLineCandidateProvider=class extends Disposable{constructor(C,W,U){super(),this._languageFeaturesService=W,this._languageConfigurationService=U,this._onDidChangeStickyScroll=this._register(new Emitter$1),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=C,this._sessionStore=this._register(new DisposableStore),this._updateSoon=this._register(new RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(K=>{K.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 StickyModelProvider(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 C;return(C=this._model)===null||C===void 0?void 0:C.version}update(){var C;return __awaiter$9(this,void 0,void 0,function*(){(C=this._cts)===null||C===void 0||C.dispose(!0),this._cts=new CancellationTokenSource$1,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(C){return __awaiter$9(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const W=this._editor.getModel(),U=W.getVersionId(),K=yield this._stickyModelProvider.update(W,U,C);C.isCancellationRequested||(this._model=K)})}updateIndex(C){return C===-1?C=0:C<0&&(C=-C-2),C}getCandidateStickyLinesIntersectingFromStickyModel(C,W,U,K,G){if(W.children.length===0)return;let Q=G;const Z=[];for(let te=0;te<W.children.length;te++){const ne=W.children[te];ne.range&&Z.push(ne.range.startLineNumber)}const X=this.updateIndex(binarySearch(Z,C.startLineNumber,(te,ne)=>te-ne)),ee=this.updateIndex(binarySearch(Z,C.startLineNumber+K,(te,ne)=>te-ne));for(let te=X;te<=ee;te++){const ne=W.children[te];if(!ne)return;if(ne.range){const ie=ne.range.startLineNumber,oe=ne.range.endLineNumber;C.startLineNumber<=oe+1&&ie-1<=C.endLineNumber&&ie!==Q&&(Q=ie,U.push(new StickyLineCandidate(ie,oe-1,K+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(C,ne,U,K+1,ie))}else this.getCandidateStickyLinesIntersectingFromStickyModel(C,ne,U,K,G)}}getCandidateStickyLinesIntersecting(C){var W,U;if(!(!((W=this._model)===null||W===void 0)&&W.element))return[];let K=[];this.getCandidateStickyLinesIntersectingFromStickyModel(C,this._model.element,K,0,-1);const G=(U=this._editor._getViewModel())===null||U===void 0?void 0:U.getHiddenAreas();if(G)for(const Q of G)K=K.filter(Z=>!(Z.startLineNumber>=Q.startLineNumber&&Z.endLineNumber<=Q.endLineNumber+1));return K}};StickyLineCandidateProvider=__decorate$f([__param$f(1,ILanguageFeaturesService),__param$f(2,ILanguageConfigurationService)],StickyLineCandidateProvider);var __decorate$e=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$e=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$8=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},StickyScrollController_1;let StickyScrollController=StickyScrollController_1=class extends Disposable{constructor(C,W,U,K,G,Q,Z){super(),this._editor=C,this._contextMenuService=W,this._languageFeaturesService=U,this._instaService=K,this._contextKeyService=Z,this._sessionStore=new DisposableStore,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 StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new StickyLineCandidateProvider(this._editor,U,G),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new StickyScrollWidgetState([],[],0),this._readConfiguration();const X=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(te=>{(te.hasChanged(114)||te.hasChanged(72)||te.hasChanged(66)||te.hasChanged(109))&&this._readConfiguration()})),this._register(addDisposableListener(X,EventType$1.CONTEXT_MENU,te=>__awaiter$8(this,void 0,void 0,function*(){this._onContextMenu(te)}))),this._stickyScrollFocusedContextKey=EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const ee=this._register(trackFocus(X));this._register(ee.onDidBlur(te=>{this._positionRevealed===!1&&X.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(ee.onDidFocus(te=>{this.focus()})),this._registerMouseListeners(),this._register(addDisposableListener(X,EventType$1.MOUSE_DOWN,te=>{this._onMouseDown=!0}))}static get(C){return C.getContribution(StickyScrollController_1.ID)}_disposeFocusStickyScrollStore(){var C;this._stickyScrollFocusedContextKey.set(!1),(C=this._focusDisposableStore)===null||C===void 0||C.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 DisposableStore,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(C){this._focusedStickyElementIndex=C?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const C=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:C[this._focusedStickyElementIndex],column:1})}_revealPosition(C){this._reveaInEditor(C,()=>this._editor.revealPosition(C))}_revealLineInCenterIfOutsideViewport(C){this._reveaInEditor(C,()=>this._editor.revealLineInCenterIfOutsideViewport(C.lineNumber,0))}_reveaInEditor(C,W){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,W(),this._editor.setSelection(Range$5.fromPositions(C)),this._editor.focus()}_registerMouseListeners(){const C=this._register(new DisposableStore),W=this._register(new ClickLinkGesture(this._editor,{extractLineNumberFromMouseEvent:G=>{const Q=this._stickyScrollWidget.getEditorPositionFromNode(G.target.element);return Q?Q.lineNumber:0}})),U=G=>{if(!this._editor.hasModel()||G.target.type!==12||G.target.detail!==this._stickyScrollWidget.getId())return null;const Q=G.target.element;if(!Q||Q.innerText!==Q.innerHTML)return null;const Z=this._stickyScrollWidget.getEditorPositionFromNode(Q);return Z?{range:new Range$5(Z.lineNumber,Z.column,Z.lineNumber,Z.column+Q.innerText.length),textElement:Q}:null},K=this._stickyScrollWidget.getDomNode();this._register(addStandardDisposableListener(K,EventType$1.CLICK,G=>{if(G.ctrlKey||G.altKey||G.metaKey||!G.leftButton)return;if(G.shiftKey){const ee=this._stickyScrollWidget.getLineIndexFromChildDomNode(G.target);if(ee===null)return;const te=new Position$4(this._endLineNumbers[ee],1);this._revealLineInCenterIfOutsideViewport(te);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(G.target)){const ee=this._stickyScrollWidget.getLineNumberFromChildDomNode(G.target);this._toggleFoldingRegionForLine(ee);return}if(!this._stickyScrollWidget.isInStickyLine(G.target))return;let X=this._stickyScrollWidget.getEditorPositionFromNode(G.target);if(!X){const ee=this._stickyScrollWidget.getLineNumberFromChildDomNode(G.target);if(ee===null)return;X=new Position$4(ee,1)}this._revealPosition(X)})),this._register(addStandardDisposableListener(K,EventType$1.MOUSE_MOVE,G=>{if(G.shiftKey){const Q=this._stickyScrollWidget.getLineIndexFromChildDomNode(G.target);if(Q===null||this._showEndForLine!==null&&this._showEndForLine===Q)return;this._showEndForLine=Q,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(addDisposableListener(K,EventType$1.MOUSE_LEAVE,G=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(W.onMouseMoveOrRelevantKeyDown(([G,Q])=>{const Z=U(G);if(!Z||!G.hasTriggerModifier||!this._editor.hasModel()){C.clear();return}const{range:X,textElement:ee}=Z;if(!X.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=X,C.clear();else if(ee.style.textDecoration==="underline")return;const te=new CancellationTokenSource$1;C.add(toDisposable(()=>te.dispose(!0)));let ne;getDefinitionsAtPosition(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Position$4(X.startLineNumber,X.startColumn+1),te.token).then(ie=>{if(!te.token.isCancellationRequested)if(ie.length!==0){this._candidateDefinitionsLength=ie.length;const oe=ee;ne!==oe?(C.clear(),ne=oe,ne.style.textDecoration="underline",C.add(toDisposable(()=>{ne.style.textDecoration="none"}))):ne||(ne=oe,ne.style.textDecoration="underline",C.add(toDisposable(()=>{ne.style.textDecoration="none"})))}else C.clear()})})),this._register(W.onCancel(()=>{C.clear()})),this._register(W.onExecute(G=>__awaiter$8(this,void 0,void 0,function*(){if(G.target.type!==12||G.target.detail!==this._stickyScrollWidget.getId())return;const Q=this._stickyScrollWidget.getEditorPositionFromNode(G.target.element);Q&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:Q.lineNumber,column:1})),this._instaService.invokeFunction(goToDefinitionWithLocation,G,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(C){const W=new StandardMouseEvent(C);this._contextMenuService.showContextMenu({menuId:MenuId.StickyScrollContext,getAnchor:()=>W})}_toggleFoldingRegionForLine(C){if(!this._foldingModel||C===null)return;const W=this._stickyScrollWidget.getStickyLineForLine(C),U=W==null?void 0:W.foldingIcon;if(!U)return;toggleCollapseState(this._foldingModel,Number.MAX_VALUE,[C]),U.isCollapsed=!U.isCollapsed;const K=(U.isCollapsed?this._editor.getTopForLineNumber(U.foldingEndLine):this._editor.getTopForLineNumber(U.foldingStartLine))-this._editor.getOption(66)*W.index+1;this._editor.setScrollTop(K),this._renderStickyScroll(C)}_readConfiguration(){const C=this._editor.getOption(114);if(C.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else C.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(U=>{U.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(U=>this._onTokensChange(U))),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(C){const W=this._stickyScrollWidget.getCurrentLines();for(const U of W)for(const K of C.ranges)if(U>=K.fromLineNumber&&U<=K.toLineNumber)return!0;return!1}_onTokensChange(C){this._needsUpdate(C)&&this._renderStickyScroll(-1)}_onDidResize(){const W=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(W*.25)}_renderStickyScroll(C=1/0){var W,U;return __awaiter$8(this,void 0,void 0,function*(){const K=this._editor.getModel();if(!K||K.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,C);return}const G=this._stickyLineCandidateProvider.getVersionId();if(G===void 0||G===K.getVersionId())if(this._foldingModel=(U=yield(W=FoldingController.get(this._editor))===null||W===void 0?void 0:W.getFoldingModel())!==null&&U!==void 0?U:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,C);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,C),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const Q=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,C),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(Q)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}})}findScrollWidgetState(){const C=this._editor.getOption(66),W=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),U=this._editor.getScrollTop();let K=0;const G=[],Q=[],Z=this._editor.getVisibleRanges();if(Z.length!==0){const X=new StickyRange(Z[0].startLineNumber,Z[Z.length-1].endLineNumber),ee=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(X);for(const te of ee){const ne=te.startLineNumber,ie=te.endLineNumber,oe=te.nestingDepth;if(ie-ne>0){const re=(oe-1)*C,se=oe*C,ae=this._editor.getBottomForLineNumber(ne)-U,le=this._editor.getTopForLineNumber(ie)-U,ce=this._editor.getBottomForLineNumber(ie)-U;if(re>le&&re<=ce){G.push(ne),Q.push(ie+1),K=ce-se;break}else se>ae&&se<=ce&&(G.push(ne),Q.push(ie+1));if(G.length===W)break}}}return this._endLineNumbers=Q,new StickyScrollWidgetState(G,Q,K,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};StickyScrollController.ID="store.contrib.stickyScrollController",StickyScrollController=StickyScrollController_1=__decorate$e([__param$e(1,IContextMenuService),__param$e(2,ILanguageFeaturesService),__param$e(3,IInstantiationService),__param$e(4,ILanguageConfigurationService),__param$e(5,ILanguageFeatureDebounceService),__param$e(6,IContextKeyService)],StickyScrollController);var __awaiter$7=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};class ToggleStickyScroll extends Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:localize("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:localize({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:Categories.View,toggled:{condition:ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:localize("stickyScroll","Sticky Scroll"),mnemonicTitle:localize({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:MenuId.CommandPalette},{id:MenuId.MenubarAppearanceMenu,group:"4_editor",order:3},{id:MenuId.StickyScrollContext}]})}run(C){return __awaiter$7(this,void 0,void 0,function*(){const W=C.get(IConfigurationService),U=!W.getValue("editor.stickyScroll.enabled");return W.updateValue("editor.stickyScroll.enabled",U)})}}const weight=100;class FocusStickyScroll extends EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:localize("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:localize({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ContextKeyExpr.and(ContextKeyExpr.has("config.editor.stickyScroll.enabled"),EditorContextKeys.stickyScrollVisible),menu:[{id:MenuId.CommandPalette}]})}runEditorCommand(C,W){var U;(U=StickyScrollController.get(W))===null||U===void 0||U.focus()}}class SelectNextStickyScrollLine extends EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:localize("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight,primary:18}})}runEditorCommand(C,W){var U;(U=StickyScrollController.get(W))===null||U===void 0||U.focusNext()}}class SelectPreviousStickyScrollLine extends EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:localize("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight,primary:16}})}runEditorCommand(C,W){var U;(U=StickyScrollController.get(W))===null||U===void 0||U.focusPrevious()}}class GoToStickyScrollLine extends EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:localize("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight,primary:3}})}runEditorCommand(C,W){var U;(U=StickyScrollController.get(W))===null||U===void 0||U.goToFocused()}}class SelectEditor extends EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:localize("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight,primary:9}})}runEditorCommand(C,W){var U;(U=StickyScrollController.get(W))===null||U===void 0||U.selectEditor()}}registerEditorContribution(StickyScrollController.ID,StickyScrollController,1),registerAction2(ToggleStickyScroll),registerAction2(FocusStickyScroll),registerAction2(SelectPreviousStickyScrollLine),registerAction2(SelectNextStickyScrollLine),registerAction2(GoToStickyScrollLine),registerAction2(SelectEditor);var __decorate$d=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$d=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$6=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},EditorContribution_1;class SuggestInlineCompletion{constructor(C,W,U,K,G,Q){this.range=C,this.insertText=W,this.filterText=U,this.additionalTextEdits=K,this.command=G,this.completion=Q}}let InlineCompletionResults=class extends RefCountedDisposable{constructor(C,W,U,K,G,Q){super(G.disposable),this.model=C,this.line=W,this.word=U,this.completionModel=K,this._suggestMemoryService=Q}canBeReused(C,W,U){return this.model===C&&this.line===W&&this.word.word.length>0&&this.word.startColumn===U.startColumn&&this.word.endColumn<U.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var C;const W=[],{items:U}=this.completionModel,K=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},U),G=Iterable.slice(U,K),Q=Iterable.slice(U,0,K);let Z=5;for(const X of Iterable.concat(G,Q)){if(X.score===FuzzyScore.Default)continue;const ee=new Range$5(X.editStart.lineNumber,X.editStart.column,X.editInsertEnd.lineNumber,X.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),te=X.completion.insertTextRules&&X.completion.insertTextRules&4?{snippet:X.completion.insertText}:X.completion.insertText;W.push(new SuggestInlineCompletion(ee,te,(C=X.filterTextLow)!==null&&C!==void 0?C:X.labelLow,X.completion.additionalTextEdits,X.completion.command,X)),Z-->=0&&X.resolve(CancellationToken.None)}return W}};InlineCompletionResults=__decorate$d([__param$d(5,ISuggestMemoryService)],InlineCompletionResults);let SuggestInlineCompletions=class{constructor(C,W,U,K){this._getEditorOption=C,this._languageFeatureService=W,this._clipboardService=U,this._suggestMemoryService=K}provideInlineCompletions(C,W,U,K){var G;return __awaiter$6(this,void 0,void 0,function*(){if(U.selectedSuggestionInfo)return;const Q=this._getEditorOption(88,C);if(QuickSuggestionsOptions.isAllOff(Q))return;C.tokenization.tokenizeIfCheap(W.lineNumber);const Z=C.tokenization.getLineTokens(W.lineNumber),X=Z.getStandardTokenType(Z.findTokenIndexAtOffset(Math.max(W.column-1-1,0)));if(QuickSuggestionsOptions.valueFor(Q,X)!=="inline")return;let ee=C.getWordAtPosition(W),te;if(ee!=null&&ee.word||(te=this._getTriggerCharacterInfo(C,W)),!(ee!=null&&ee.word)&&!te||(ee||(ee=C.getWordUntilPosition(W)),ee.endColumn!==W.column))return;let ne;const ie=C.getValueInRange(new Range$5(W.lineNumber,1,W.lineNumber,W.column));if(!te&&(!((G=this._lastResult)===null||G===void 0)&&G.canBeReused(C,W.lineNumber,ee))){const oe=new LineContext$1(ie,W.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=oe,this._lastResult.acquire(),ne=this._lastResult}else{const oe=yield provideSuggestionItems(this._languageFeatureService.completionProvider,C,W,new CompletionOptions(void 0,void 0,te==null?void 0:te.providers),te&&{triggerKind:1,triggerCharacter:te.ch},K);let re;oe.needsClipboard&&(re=yield this._clipboardService.readText());const se=new CompletionModel(oe.items,W.column,new LineContext$1(ie,0),WordDistance.None,this._getEditorOption(117,C),this._getEditorOption(111,C),{boostFullMatch:!1,firstMatchCanBeWeak:!1},re);ne=new InlineCompletionResults(C,W.lineNumber,ee,se,oe,this._suggestMemoryService)}return this._lastResult=ne,ne})}handleItemDidShow(C,W){W.completion.resolve(CancellationToken.None)}freeInlineCompletions(C){C.release()}_getTriggerCharacterInfo(C,W){var U;const K=C.getValueInRange(Range$5.fromPositions({lineNumber:W.lineNumber,column:W.column-1},W)),G=new Set;for(const Q of this._languageFeatureService.completionProvider.all(C))!((U=Q.triggerCharacters)===null||U===void 0)&&U.includes(K)&&G.add(Q);if(G.size!==0)return{providers:G,ch:K}}};SuggestInlineCompletions=__decorate$d([__param$d(1,ILanguageFeaturesService),__param$d(2,IClipboardService),__param$d(3,ISuggestMemoryService)],SuggestInlineCompletions);let EditorContribution=EditorContribution_1=class{constructor(C,W,U,K){if(++EditorContribution_1._counter===1){const G=K.createInstance(SuggestInlineCompletions,(Q,Z)=>{var X;return((X=U.listCodeEditors().find(te=>te.getModel()===Z))!==null&&X!==void 0?X:C).getOption(Q)});EditorContribution_1._disposable=W.inlineCompletionsProvider.register("*",G)}}dispose(){var C;--EditorContribution_1._counter===0&&((C=EditorContribution_1._disposable)===null||C===void 0||C.dispose(),EditorContribution_1._disposable=void 0)}};EditorContribution._counter=0,EditorContribution=EditorContribution_1=__decorate$d([__param$d(1,ILanguageFeaturesService),__param$d(2,ICodeEditorService),__param$d(3,IInstantiationService)],EditorContribution),registerEditorContribution("suggest.inlineCompletionsProvider",EditorContribution,0);class ForceRetokenizeAction extends EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:localize("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(C,W){if(!W.hasModel())return;const U=W.getModel();U.tokenization.resetTokenization();const K=new StopWatch;U.tokenization.forceTokenization(U.getLineCount()),K.stop(),console.log(`tokenization took ${K.elapsed()}`)}}registerEditorAction(ForceRetokenizeAction);class ToggleTabFocusModeAction extends Action2{constructor(){super({id:ToggleTabFocusModeAction.ID,title:{value:localize({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 W=!TabFocus.getTabFocusMode();TabFocus.setTabFocusMode(W),alert(W?localize("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):localize("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}ToggleTabFocusModeAction.ID="editor.action.toggleTabFocusMode",registerAction2(ToggleTabFocusModeAction);const unicodeHighlighter="",bannerController="",link="";var __decorate$c=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$c=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let Link=class extends Disposable{get enabled(){return this._enabled}set enabled(C){C?(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=C}constructor(C,W,U={},K){var G;super(),this._link=W,this._enabled=!0,this.el=append$1(C,$$d("a.monaco-link",{tabIndex:(G=W.tabIndex)!==null&&G!==void 0?G:0,href:W.href,title:W.title},W.label)),this.el.setAttribute("role","button");const Q=this._register(new DomEmitter(this.el,"click")),Z=this._register(new DomEmitter(this.el,"keypress")),X=Event.chain(Z.event,ne=>ne.map(ie=>new StandardKeyboardEvent(ie)).filter(ie=>ie.keyCode===3)),ee=this._register(new DomEmitter(this.el,EventType.Tap)).event;this._register(Gesture.addTarget(this.el));const te=Event.any(Q.event,X,ee);this._register(te(ne=>{this.enabled&&(EventHelper.stop(ne,!0),U!=null&&U.opener?U.opener(this._link.href):K.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};Link=__decorate$c([__param$c(3,IOpenerService)],Link);var __decorate$b=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$b=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};const BANNER_ELEMENT_HEIGHT=26;let BannerController=class extends Disposable{constructor(C,W){super(),this._editor=C,this.instantiationService=W,this.banner=this._register(this.instantiationService.createInstance(Banner))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(C){this.banner.show(Object.assign(Object.assign({},C),{onClose:()=>{var W;this.hide(),(W=C.onClose)===null||W===void 0||W.call(C)}})),this._editor.setBanner(this.banner.element,BANNER_ELEMENT_HEIGHT)}};BannerController=__decorate$b([__param$b(1,IInstantiationService)],BannerController);let Banner=class extends Disposable{constructor(C){super(),this.instantiationService=C,this.markdownRenderer=this.instantiationService.createInstance(MarkdownRenderer,{}),this.element=$$d("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(C){if(C.ariaLabel)return C.ariaLabel;if(typeof C.message=="string")return C.message}getBannerMessage(C){if(typeof C=="string"){const W=$$d("span");return W.innerText=C,W}return this.markdownRenderer.render(C).element}clear(){clearNode(this.element)}show(C){clearNode(this.element);const W=this.getAriaLabel(C);W&&this.element.setAttribute("aria-label",W);const U=append$1(this.element,$$d("div.icon-container"));U.setAttribute("aria-hidden","true"),C.icon&&U.appendChild($$d(`div${ThemeIcon.asCSSSelector(C.icon)}`));const K=append$1(this.element,$$d("div.message-container"));if(K.setAttribute("aria-hidden","true"),K.appendChild(this.getBannerMessage(C.message)),this.messageActionsContainer=append$1(this.element,$$d("div.message-actions-container")),C.actions)for(const Q of C.actions)this._register(this.instantiationService.createInstance(Link,this.messageActionsContainer,Object.assign(Object.assign({},Q),{tabIndex:-1}),{}));const G=append$1(this.element,$$d("div.action-container"));this.actionBar=this._register(new ActionBar(G)),this.actionBar.push(this._register(new Action("banner.close","Close Banner",ThemeIcon.asClassName(widgetClose),!0,()=>{typeof C.onClose=="function"&&C.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Banner=__decorate$b([__param$b(0,IInstantiationService)],Banner);var __decorate$a=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$a=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$5=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};const warningIcon=registerIcon("extensions-warning-message",Codicon.warning,localize("warningIcon","Icon shown with a warning message in the extensions editor."));let UnicodeHighlighter=class extends Disposable{constructor(C,W,U,K){super(),this._editor=C,this._editorWorkerService=W,this._workspaceTrustService=U,this._highlighter=null,this._bannerClosed=!1,this._updateState=G=>{if(G&&G.hasMore){if(this._bannerClosed)return;const Q=Math.max(G.ambiguousCharacterCount,G.nonBasicAsciiCharacterCount,G.invisibleCharacterCount);let Z;if(G.nonBasicAsciiCharacterCount>=Q)Z={message:localize("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new DisableHighlightingOfNonBasicAsciiCharactersAction};else if(G.ambiguousCharacterCount>=Q)Z={message:localize("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new DisableHighlightingOfAmbiguousCharactersAction};else if(G.invisibleCharacterCount>=Q)Z={message:localize("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new DisableHighlightingOfInvisibleCharactersAction};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:Z.message,icon:warningIcon,actions:[{label:Z.command.shortLabel,href:`command:${Z.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(K.createInstance(BannerController,C)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=C.getOption(124),this._register(U.onDidChangeTrust(G=>{this._updateHighlighter()})),this._register(C.onDidChangeConfiguration(G=>{G.hasChanged(124)&&(this._options=C.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 C=resolveOptions(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([C.nonBasicASCII,C.ambiguousCharacters,C.invisibleCharacters].every(U=>U===!1))return;const W={nonBasicASCII:C.nonBasicASCII,ambiguousCharacters:C.ambiguousCharacters,invisibleCharacters:C.invisibleCharacters,includeComments:C.includeComments,includeStrings:C.includeStrings,allowedCodePoints:Object.keys(C.allowedCharacters).map(U=>U.codePointAt(0)),allowedLocales:Object.keys(C.allowedLocales).map(U=>U==="_os"?new Intl.NumberFormat().resolvedOptions().locale:U==="_vscode"?language$1f:U)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new DocumentUnicodeHighlighter(this._editor,W,this._updateState,this._editorWorkerService):this._highlighter=new ViewportUnicodeHighlighter(this._editor,W,this._updateState)}getDecorationInfo(C){return this._highlighter?this._highlighter.getDecorationInfo(C):null}};UnicodeHighlighter.ID="editor.contrib.unicodeHighlighter",UnicodeHighlighter=__decorate$a([__param$a(1,IEditorWorkerService),__param$a(2,IWorkspaceTrustManagementService),__param$a(3,IInstantiationService)],UnicodeHighlighter);function resolveOptions(H,C){return{nonBasicASCII:C.nonBasicASCII===inUntrustedWorkspace?!H:C.nonBasicASCII,ambiguousCharacters:C.ambiguousCharacters,invisibleCharacters:C.invisibleCharacters,includeComments:C.includeComments===inUntrustedWorkspace?!H:C.includeComments,includeStrings:C.includeStrings===inUntrustedWorkspace?!H:C.includeStrings,allowedCharacters:C.allowedCharacters,allowedLocales:C.allowedLocales}}let DocumentUnicodeHighlighter=class extends Disposable{constructor(C,W,U,K){super(),this._editor=C,this._options=W,this._updateState=U,this._editorWorkerService=K,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new RunOnceScheduler(()=>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 C=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(W=>{if(this._model.isDisposed()||this._model.getVersionId()!==C)return;this._updateState(W);const U=[];if(!W.hasMore)for(const K of W.ranges)U.push({range:K,options:Decorations.instance.getDecorationFromOptions(this._options)});this._decorations.set(U)})}getDecorationInfo(C){if(!this._decorations.has(C))return null;const W=this._editor.getModel();if(!isModelDecorationVisible(W,C))return null;const U=W.getValueInRange(C.range);return{reason:computeReason(U,this._options),inComment:isModelDecorationInComment(W,C),inString:isModelDecorationInString(W,C)}}};DocumentUnicodeHighlighter=__decorate$a([__param$a(3,IEditorWorkerService)],DocumentUnicodeHighlighter);class ViewportUnicodeHighlighter extends Disposable{constructor(C,W,U){super(),this._editor=C,this._options=W,this._updateState=U,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new RunOnceScheduler(()=>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 C=this._editor.getVisibleRanges(),W=[],U={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const K of C){const G=UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,K);for(const Q of G.ranges)U.ranges.push(Q);U.ambiguousCharacterCount+=U.ambiguousCharacterCount,U.invisibleCharacterCount+=U.invisibleCharacterCount,U.nonBasicAsciiCharacterCount+=U.nonBasicAsciiCharacterCount,U.hasMore=U.hasMore||G.hasMore}if(!U.hasMore)for(const K of U.ranges)W.push({range:K,options:Decorations.instance.getDecorationFromOptions(this._options)});this._updateState(U),this._decorations.set(W)}getDecorationInfo(C){if(!this._decorations.has(C))return null;const W=this._editor.getModel(),U=W.getValueInRange(C.range);return isModelDecorationVisible(W,C)?{reason:computeReason(U,this._options),inComment:isModelDecorationInComment(W,C),inString:isModelDecorationInString(W,C)}:null}}let UnicodeHighlighterHoverParticipant=class{constructor(C,W,U){this._editor=C,this._languageService=W,this._openerService=U,this.hoverOrdinal=5}computeSync(C,W){if(!this._editor.hasModel()||C.type!==1)return[];const U=this._editor.getModel(),K=this._editor.getContribution(UnicodeHighlighter.ID);if(!K)return[];const G=[],Q=new Set;let Z=300;for(const X of W){const ee=K.getDecorationInfo(X);if(!ee)continue;const ne=U.getValueInRange(X.range).codePointAt(0),ie=formatCodePointMarkdown(ne);let oe;switch(ee.reason.kind){case 0:{isBasicASCII(ee.reason.confusableWith)?oe=localize("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",ie,formatCodePointMarkdown(ee.reason.confusableWith.codePointAt(0))):oe=localize("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",ie,formatCodePointMarkdown(ee.reason.confusableWith.codePointAt(0)));break}case 1:oe=localize("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",ie);break;case 2:oe=localize("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",ie);break}if(Q.has(oe))continue;Q.add(oe);const re={codePoint:ne,reason:ee.reason,inComment:ee.inComment,inString:ee.inString},se=localize("unicodeHighlight.adjustSettings","Adjust settings"),ae=`command:${ShowExcludeOptions.ID}?${encodeURIComponent(JSON.stringify(re))}`,le=new MarkdownString("",!0).appendMarkdown(oe).appendText(" ").appendLink(ae,se);G.push(new MarkdownHover(this,X.range,[le],!1,Z++))}return G}renderHoverParts(C,W){return renderMarkdownHovers(C,W,this._editor,this._languageService,this._openerService)}};UnicodeHighlighterHoverParticipant=__decorate$a([__param$a(1,ILanguageService),__param$a(2,IOpenerService)],UnicodeHighlighterHoverParticipant);function codePointToHex(H){return`U+${H.toString(16).padStart(4,"0")}`}function formatCodePointMarkdown(H){let C=`\`${codePointToHex(H)}\``;return InvisibleCharacters.isInvisibleCharacter(H)||(C+=` "${`${renderCodePointAsInlineCode(H)}`}"`),C}function renderCodePointAsInlineCode(H){return H===96?"`` ` ``":"`"+String.fromCodePoint(H)+"`"}function computeReason(H,C){return UnicodeTextModelHighlighter.computeUnicodeHighlightReason(H,C)}class Decorations{constructor(){this.map=new Map}getDecorationFromOptions(C){return this.getDecoration(!C.includeComments,!C.includeStrings)}getDecoration(C,W){const U=`${C}${W}`;let K=this.map.get(U);return K||(K=ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:C,hideInStringTokens:W}),this.map.set(U,K)),K}}Decorations.instance=new Decorations;class DisableHighlightingInCommentsAction extends EditorAction{constructor(){super({id:DisableHighlightingOfAmbiguousCharactersAction.ID,label:localize("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=localize("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const K=C==null?void 0:C.get(IConfigurationService);K&&this.runAction(K)})}runAction(C){return __awaiter$5(this,void 0,void 0,function*(){yield C.updateValue(unicodeHighlightConfigKeys.includeComments,!1,2)})}}class DisableHighlightingInStringsAction extends EditorAction{constructor(){super({id:DisableHighlightingOfAmbiguousCharactersAction.ID,label:localize("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=localize("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const K=C==null?void 0:C.get(IConfigurationService);K&&this.runAction(K)})}runAction(C){return __awaiter$5(this,void 0,void 0,function*(){yield C.updateValue(unicodeHighlightConfigKeys.includeStrings,!1,2)})}}class DisableHighlightingOfAmbiguousCharactersAction extends EditorAction{constructor(){super({id:DisableHighlightingOfAmbiguousCharactersAction.ID,label:localize("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=localize("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const K=C==null?void 0:C.get(IConfigurationService);K&&this.runAction(K)})}runAction(C){return __awaiter$5(this,void 0,void 0,function*(){yield C.updateValue(unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)})}}DisableHighlightingOfAmbiguousCharactersAction.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class DisableHighlightingOfInvisibleCharactersAction extends EditorAction{constructor(){super({id:DisableHighlightingOfInvisibleCharactersAction.ID,label:localize("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=localize("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const K=C==null?void 0:C.get(IConfigurationService);K&&this.runAction(K)})}runAction(C){return __awaiter$5(this,void 0,void 0,function*(){yield C.updateValue(unicodeHighlightConfigKeys.invisibleCharacters,!1,2)})}}DisableHighlightingOfInvisibleCharactersAction.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class DisableHighlightingOfNonBasicAsciiCharactersAction extends EditorAction{constructor(){super({id:DisableHighlightingOfNonBasicAsciiCharactersAction.ID,label:localize("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=localize("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const K=C==null?void 0:C.get(IConfigurationService);K&&this.runAction(K)})}runAction(C){return __awaiter$5(this,void 0,void 0,function*(){yield C.updateValue(unicodeHighlightConfigKeys.nonBasicASCII,!1,2)})}}DisableHighlightingOfNonBasicAsciiCharactersAction.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class ShowExcludeOptions extends EditorAction{constructor(){super({id:ShowExcludeOptions.ID,label:localize("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(C,W,U){return __awaiter$5(this,void 0,void 0,function*(){const{codePoint:K,reason:G,inString:Q,inComment:Z}=U,X=String.fromCodePoint(K),ee=C.get(IQuickInputService),te=C.get(IConfigurationService);function ne(re){return InvisibleCharacters.isInvisibleCharacter(re)?localize("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",codePointToHex(re)):localize("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${codePointToHex(re)} "${X}"`)}const ie=[];if(G.kind===0)for(const re of G.notAmbiguousInLocales)ie.push({label:localize("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',re),run:()=>__awaiter$5(this,void 0,void 0,function*(){excludeLocaleFromBeingHighlighted(te,[re])})});if(ie.push({label:ne(K),run:()=>excludeCharFromBeingHighlighted(te,[K])}),Z){const re=new DisableHighlightingInCommentsAction;ie.push({label:re.label,run:()=>__awaiter$5(this,void 0,void 0,function*(){return re.runAction(te)})})}else if(Q){const re=new DisableHighlightingInStringsAction;ie.push({label:re.label,run:()=>__awaiter$5(this,void 0,void 0,function*(){return re.runAction(te)})})}if(G.kind===0){const re=new DisableHighlightingOfAmbiguousCharactersAction;ie.push({label:re.label,run:()=>__awaiter$5(this,void 0,void 0,function*(){return re.runAction(te)})})}else if(G.kind===1){const re=new DisableHighlightingOfInvisibleCharactersAction;ie.push({label:re.label,run:()=>__awaiter$5(this,void 0,void 0,function*(){return re.runAction(te)})})}else if(G.kind===2){const re=new DisableHighlightingOfNonBasicAsciiCharactersAction;ie.push({label:re.label,run:()=>__awaiter$5(this,void 0,void 0,function*(){return re.runAction(te)})})}else expectNever(G);const oe=yield ee.pick(ie,{title:localize("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});oe&&(yield oe.run())})}}ShowExcludeOptions.ID="editor.action.unicodeHighlight.showExcludeOptions";function excludeCharFromBeingHighlighted(H,C){return __awaiter$5(this,void 0,void 0,function*(){const W=H.getValue(unicodeHighlightConfigKeys.allowedCharacters);let U;typeof W=="object"&&W?U=W:U={};for(const K of C)U[String.fromCodePoint(K)]=!0;yield H.updateValue(unicodeHighlightConfigKeys.allowedCharacters,U,2)})}function excludeLocaleFromBeingHighlighted(H,C){var W;return __awaiter$5(this,void 0,void 0,function*(){const U=(W=H.inspect(unicodeHighlightConfigKeys.allowedLocales).user)===null||W===void 0?void 0:W.value;let K;typeof U=="object"&&U?K=Object.assign({},U):K={};for(const G of C)K[G]=!0;yield H.updateValue(unicodeHighlightConfigKeys.allowedLocales,K,2)})}function expectNever(H){throw new Error(`Unexpected value: ${H}`)}registerEditorAction(DisableHighlightingOfAmbiguousCharactersAction),registerEditorAction(DisableHighlightingOfInvisibleCharactersAction),registerEditorAction(DisableHighlightingOfNonBasicAsciiCharactersAction),registerEditorAction(ShowExcludeOptions),registerEditorContribution(UnicodeHighlighter.ID,UnicodeHighlighter,1),HoverParticipantRegistry.register(UnicodeHighlighterHoverParticipant);var __decorate$9=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$9=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$4=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};const ignoreUnusualLineTerminators="ignoreUnusualLineTerminators";function writeIgnoreState(H,C,W){H.setModelProperty(C.uri,ignoreUnusualLineTerminators,W)}function readIgnoreState(H,C){return H.getModelProperty(C.uri,ignoreUnusualLineTerminators)}let UnusualLineTerminatorsDetector=class extends Disposable{constructor(C,W,U){super(),this._editor=C,this._dialogService=W,this._codeEditorService=U,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(K=>{K.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(K=>{K.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return __awaiter$4(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const C=this._editor.getModel();if(!C.mightContainUnusualLineTerminators()||readIgnoreState(this._codeEditorService,C)===!0||this._editor.getOption(90))return;if(this._config==="auto"){C.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let U;try{this._isPresentingDialog=!0,U=yield this._dialogService.confirm({title:localize("unusualLineTerminators.title","Unusual Line Terminators"),message:localize("unusualLineTerminators.message","Detected unusual line terminators"),detail:localize("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`.",basename(C.uri)),primaryButton:localize({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:localize("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!U.confirmed){writeIgnoreState(this._codeEditorService,C,!0);return}C.removeUnusualLineTerminators(this._editor.getSelections())})}};UnusualLineTerminatorsDetector.ID="editor.contrib.unusualLineTerminatorsDetector",UnusualLineTerminatorsDetector=__decorate$9([__param$9(1,IDialogService),__param$9(2,ICodeEditorService)],UnusualLineTerminatorsDetector),registerEditorContribution(UnusualLineTerminatorsDetector.ID,UnusualLineTerminatorsDetector,1);var __decorate$8=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$8=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},WordHighlighterContribution_1;const ctxHasWordHighlights=new RawContextKey("hasWordHighlights",!1);function getOccurrencesAtPosition(H,C,W,U){const K=H.ordered(C);return first(K.map(G=>()=>Promise.resolve(G.provideDocumentHighlights(C,W,U)).then(void 0,onUnexpectedExternalError)),isNonEmptyArray)}class OccurenceAtPositionRequest{constructor(C,W,U){this._model=C,this._selection=W,this._wordSeparators=U,this._wordRange=this._getCurrentWordRange(C,W),this._result=null}get result(){return this._result||(this._result=createCancelablePromise(C=>this._compute(this._model,this._selection,this._wordSeparators,C))),this._result}_getCurrentWordRange(C,W){const U=C.getWordAtPosition(W.getPosition());return U?new Range$5(W.startLineNumber,U.startColumn,W.startLineNumber,U.endColumn):null}isValid(C,W,U){const K=W.startLineNumber,G=W.startColumn,Q=W.endColumn,Z=this._getCurrentWordRange(C,W);let X=!!(this._wordRange&&this._wordRange.equalsRange(Z));for(let ee=0,te=U.length;!X&&ee<te;ee++){const ne=U.getRange(ee);ne&&ne.startLineNumber===K&&ne.startColumn<=G&&ne.endColumn>=Q&&(X=!0)}return X}cancel(){this.result.cancel()}}class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest{constructor(C,W,U,K){super(C,W,U),this._providers=K}_compute(C,W,U,K){return getOccurrencesAtPosition(this._providers,C,W.getPosition(),K).then(G=>G||[])}}class TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest{constructor(C,W,U){super(C,W,U),this._selectionIsEmpty=W.isEmpty()}_compute(C,W,U,K){return timeout(250,K).then(()=>{if(!W.isEmpty())return[];const G=C.getWordAtPosition(W.getPosition());return!G||G.word.length>1e3?[]:C.findMatches(G.word,!0,!1,!0,U,!1).map(Z=>({range:Z.range,kind:DocumentHighlightKind$4.Text}))})}isValid(C,W,U){const K=W.isEmpty();return this._selectionIsEmpty!==K?!1:super.isValid(C,W,U)}}function computeOccurencesAtPosition(H,C,W,U){return H.has(C)?new SemanticOccurenceAtPositionRequest(C,W,U,H):new TextualOccurenceAtPositionRequest(C,W,U)}registerModelAndPositionCommand("_executeDocumentHighlights",(H,C,W)=>{const U=H.get(ILanguageFeaturesService);return getOccurrencesAtPosition(U.documentHighlightProvider,C,W,CancellationToken.None)});class WordHighlighter{constructor(C,W,U,K){this.toUnhook=new DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=C,this.providers=W,this.linkedHighlighters=U,this._hasWordHighlights=ctxHasWordHighlights.bindTo(K),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(C.onDidChangeCursorPosition(G=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(G)})),this.toUnhook.add(C.onDidChangeModelContent(G=>{this._stopAll()})),this.toUnhook.add(C.onDidChangeConfiguration(G=>{const Q=this.editor.getOption(80);this.occurrencesHighlight!==Q&&(this.occurrencesHighlight=Q,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(Range$5.compareRangesUsingStarts)}moveNext(){const C=this._getSortedHighlights(),U=(C.findIndex(G=>G.containsPosition(this.editor.getPosition()))+1)%C.length,K=C[U];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const G=this._getWord();if(G){const Q=this.editor.getModel().getLineContent(K.startLineNumber);alert(`${Q}, ${U+1} of ${C.length} for '${G.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const C=this._getSortedHighlights(),U=(C.findIndex(G=>G.containsPosition(this.editor.getPosition()))-1+C.length)%C.length,K=C[U];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(K.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(K);const G=this._getWord();if(G){const Q=this.editor.getModel().getLineContent(K.startLineNumber);alert(`${Q}, ${U+1} of ${C.length} for '${G.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(C){if(!this.occurrencesHighlight){this._stopAll();return}if(C.reason!==3){this._stopAll();return}this._run()}_getWord(){const C=this.editor.getSelection(),W=C.startLineNumber,U=C.startColumn;return this.model.getWordAtPosition({lineNumber:W,column:U})}_run(){const C=this.editor.getSelection();if(C.startLineNumber!==C.endLineNumber){this._stopAll();return}const W=C.startColumn,U=C.endColumn,K=this._getWord();if(!K||K.startColumn>W||K.endColumn<U){this._stopAll();return}const G=this.workerRequest&&this.workerRequest.isValid(this.model,C,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),G)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const Q=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=computeOccurencesAtPosition(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(129)),this.workerRequest.result.then(Z=>{Q===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=Z||[],this._beginRenderDecorations())},onUnexpectedError)}}_beginRenderDecorations(){const C=new Date().getTime(),W=this.lastCursorPositionChangeTime+250;C>=W?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},W-C)}renderDecorations(){this.renderDecorationsTimer=-1;const C=[];for(const W of this.workerRequestValue)W.range&&C.push({range:W.range,options:getHighlightDecorationOptions(W.kind)});this.decorations.set(C),this._hasWordHighlights.set(this.hasDecorations());for(const W of this.linkedHighlighters())(W==null?void 0:W.editor.getModel())===this.editor.getModel()&&(W._stopAll(),W.decorations.set(C),W._hasWordHighlights.set(W.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let WordHighlighterContribution=WordHighlighterContribution_1=class extends Disposable{static get(C){return C.getContribution(WordHighlighterContribution_1.ID)}constructor(C,W,U){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const K=()=>{C.hasModel()&&!C.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new WordHighlighter(C,U.documentHighlightProvider,()=>Iterable.map(this.linkedContributions,G=>G.wordHighlighter),W))};this._register(C.onDidChangeModel(G=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),K()})),K()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var C;(C=this.wordHighlighter)===null||C===void 0||C.moveNext()}moveBack(){var C;(C=this.wordHighlighter)===null||C===void 0||C.moveBack()}restoreViewState(C){this.wordHighlighter&&C&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};WordHighlighterContribution.ID="editor.contrib.wordHighlighter",WordHighlighterContribution=WordHighlighterContribution_1=__decorate$8([__param$8(1,IContextKeyService),__param$8(2,ILanguageFeaturesService)],WordHighlighterContribution);class WordHighlightNavigationAction extends EditorAction{constructor(C,W){super(W),this._isNext=C}run(C,W){const U=WordHighlighterContribution.get(W);U&&(this._isNext?U.moveNext():U.moveBack())}}class NextWordHighlightAction extends WordHighlightNavigationAction{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:localize("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:ctxHasWordHighlights,kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class PrevWordHighlightAction extends WordHighlightNavigationAction{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:localize("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:ctxHasWordHighlights,kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class TriggerWordHighlightAction extends EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:localize("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:ctxHasWordHighlights.toNegated(),kbOpts:{kbExpr:EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(C,W,U){const K=WordHighlighterContribution.get(W);K&&K.restoreViewState(!0)}}registerEditorContribution(WordHighlighterContribution.ID,WordHighlighterContribution,0),registerEditorAction(NextWordHighlightAction),registerEditorAction(PrevWordHighlightAction),registerEditorAction(TriggerWordHighlightAction);class MoveWordCommand extends EditorCommand{constructor(C){super(C),this._inSelectionMode=C.inSelectionMode,this._wordNavigationType=C.wordNavigationType}runEditorCommand(C,W,U){if(!W.hasModel())return;const K=getMapForWordSeparators(W.getOption(129)),G=W.getModel(),Z=W.getSelections().map(X=>{const ee=new Position$4(X.positionLineNumber,X.positionColumn),te=this._move(K,G,ee,this._wordNavigationType);return this._moveTo(X,te,this._inSelectionMode)});if(G.pushStackElement(),W._getViewModel().setCursorStates("moveWordCommand",3,Z.map(X=>CursorState$1.fromModelSelection(X))),Z.length===1){const X=new Position$4(Z[0].positionLineNumber,Z[0].positionColumn);W.revealPosition(X,0)}}_moveTo(C,W,U){return U?new Selection$1(C.selectionStartLineNumber,C.selectionStartColumn,W.lineNumber,W.column):new Selection$1(W.lineNumber,W.column,W.lineNumber,W.column)}}class WordLeftCommand extends MoveWordCommand{_move(C,W,U,K){return WordOperations.moveWordLeft(C,W,U,K)}}class WordRightCommand extends MoveWordCommand{_move(C,W,U,K){return WordOperations.moveWordRight(C,W,U,K)}}class CursorWordStartLeft extends WordLeftCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class CursorWordEndLeft extends WordLeftCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class CursorWordLeft extends WordLeftCommand{constructor(){var C;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ContextKeyExpr.and(EditorContextKeys.textInputFocus,(C=ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED,IsWindowsContext))===null||C===void 0?void 0:C.negate()),primary:2063,mac:{primary:527},weight:100}})}}class CursorWordStartLeftSelect extends WordLeftCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class CursorWordEndLeftSelect extends WordLeftCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class CursorWordLeftSelect extends WordLeftCommand{constructor(){var C;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ContextKeyExpr.and(EditorContextKeys.textInputFocus,(C=ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED,IsWindowsContext))===null||C===void 0?void 0:C.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class CursorWordAccessibilityLeft extends WordLeftCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(C,W,U,K){return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue),W,U,K)}}class CursorWordAccessibilityLeftSelect extends WordLeftCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(C,W,U,K){return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue),W,U,K)}}class CursorWordStartRight extends WordRightCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class CursorWordEndRight extends WordRightCommand{constructor(){var C;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ContextKeyExpr.and(EditorContextKeys.textInputFocus,(C=ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED,IsWindowsContext))===null||C===void 0?void 0:C.negate()),primary:2065,mac:{primary:529},weight:100}})}}class CursorWordRight extends WordRightCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class CursorWordStartRightSelect extends WordRightCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class CursorWordEndRightSelect extends WordRightCommand{constructor(){var C;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ContextKeyExpr.and(EditorContextKeys.textInputFocus,(C=ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED,IsWindowsContext))===null||C===void 0?void 0:C.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class CursorWordRightSelect extends WordRightCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class CursorWordAccessibilityRight extends WordRightCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(C,W,U,K){return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue),W,U,K)}}class CursorWordAccessibilityRightSelect extends WordRightCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(C,W,U,K){return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue),W,U,K)}}class DeleteWordCommand extends EditorCommand{constructor(C){super(C),this._whitespaceHeuristics=C.whitespaceHeuristics,this._wordNavigationType=C.wordNavigationType}runEditorCommand(C,W,U){const K=C.get(ILanguageConfigurationService);if(!W.hasModel())return;const G=getMapForWordSeparators(W.getOption(129)),Q=W.getModel(),Z=W.getSelections(),X=W.getOption(6),ee=W.getOption(11),te=K.getLanguageConfiguration(Q.getLanguageId()).getAutoClosingPairs(),ne=W._getViewModel(),ie=Z.map(oe=>{const re=this._delete({wordSeparators:G,model:Q,selection:oe,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:W.getOption(9),autoClosingBrackets:X,autoClosingQuotes:ee,autoClosingPairs:te,autoClosedCharacters:ne.getCursorAutoClosedCharacters()},this._wordNavigationType);return new ReplaceCommand(re,"")});W.pushUndoStop(),W.executeCommands(this.id,ie),W.pushUndoStop()}}class DeleteWordLeftCommand extends DeleteWordCommand{_delete(C,W){const U=WordOperations.deleteWordLeft(C,W);return U||new Range$5(1,1,1,1)}}class DeleteWordRightCommand extends DeleteWordCommand{_delete(C,W){const U=WordOperations.deleteWordRight(C,W);if(U)return U;const K=C.model.getLineCount(),G=C.model.getLineMaxColumn(K);return new Range$5(K,G,K,G)}}class DeleteWordStartLeft extends DeleteWordLeftCommand{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:EditorContextKeys.writable})}}class DeleteWordEndLeft extends DeleteWordLeftCommand{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:EditorContextKeys.writable})}}class DeleteWordLeft extends DeleteWordLeftCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:EditorContextKeys.writable,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class DeleteWordStartRight extends DeleteWordRightCommand{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:EditorContextKeys.writable})}}class DeleteWordEndRight extends DeleteWordRightCommand{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:EditorContextKeys.writable})}}class DeleteWordRight extends DeleteWordRightCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:EditorContextKeys.writable,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class DeleteInsideWord extends EditorAction{constructor(){super({id:"deleteInsideWord",precondition:EditorContextKeys.writable,label:localize("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(C,W,U){if(!W.hasModel())return;const K=getMapForWordSeparators(W.getOption(129)),G=W.getModel(),Z=W.getSelections().map(X=>{const ee=WordOperations.deleteInsideWord(K,G,X);return new ReplaceCommand(ee,"")});W.pushUndoStop(),W.executeCommands(this.id,Z),W.pushUndoStop()}}registerEditorCommand(new CursorWordStartLeft),registerEditorCommand(new CursorWordEndLeft),registerEditorCommand(new CursorWordLeft),registerEditorCommand(new CursorWordStartLeftSelect),registerEditorCommand(new CursorWordEndLeftSelect),registerEditorCommand(new CursorWordLeftSelect),registerEditorCommand(new CursorWordStartRight),registerEditorCommand(new CursorWordEndRight),registerEditorCommand(new CursorWordRight),registerEditorCommand(new CursorWordStartRightSelect),registerEditorCommand(new CursorWordEndRightSelect),registerEditorCommand(new CursorWordRightSelect),registerEditorCommand(new CursorWordAccessibilityLeft),registerEditorCommand(new CursorWordAccessibilityLeftSelect),registerEditorCommand(new CursorWordAccessibilityRight),registerEditorCommand(new CursorWordAccessibilityRightSelect),registerEditorCommand(new DeleteWordStartLeft),registerEditorCommand(new DeleteWordEndLeft),registerEditorCommand(new DeleteWordLeft),registerEditorCommand(new DeleteWordStartRight),registerEditorCommand(new DeleteWordEndRight),registerEditorCommand(new DeleteWordRight),registerEditorAction(DeleteInsideWord);class DeleteWordPartLeft extends DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:EditorContextKeys.writable,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(C,W){const U=WordPartOperations.deleteWordPartLeft(C);return U||new Range$5(1,1,1,1)}}class DeleteWordPartRight extends DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:EditorContextKeys.writable,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(C,W){const U=WordPartOperations.deleteWordPartRight(C);if(U)return U;const K=C.model.getLineCount(),G=C.model.getLineMaxColumn(K);return new Range$5(K,G,K,G)}}class WordPartLeftCommand extends MoveWordCommand{_move(C,W,U,K){return WordPartOperations.moveWordPartLeft(C,W,U)}}class CursorWordPartLeft extends WordPartLeftCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class CursorWordPartLeftSelect extends WordPartLeftCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class WordPartRightCommand extends MoveWordCommand{_move(C,W,U,K){return WordPartOperations.moveWordPartRight(C,W,U)}}class CursorWordPartRight extends WordPartRightCommand{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class CursorWordPartRightSelect extends WordPartRightCommand{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}registerEditorCommand(new DeleteWordPartLeft),registerEditorCommand(new DeleteWordPartRight),registerEditorCommand(new CursorWordPartLeft),registerEditorCommand(new CursorWordPartLeftSelect),registerEditorCommand(new CursorWordPartRight),registerEditorCommand(new CursorWordPartRightSelect);class ReadOnlyMessageController extends Disposable{constructor(C){super(),this.editor=C,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const C=MessageController.get(this.editor);if(C&&this.editor.hasModel()){let W=this.editor.getOptions().get(91);W||(this.editor.isSimpleWidget?W=new MarkdownString(localize("editor.simple.readonly","Cannot edit in read-only input")):W=new MarkdownString(localize("editor.readonly","Cannot edit in read-only editor"))),C.showMessage(W,this.editor.getPosition())}}}ReadOnlyMessageController.ID="editor.contrib.readOnlyMessageController",registerEditorContribution(ReadOnlyMessageController.ID,ReadOnlyMessageController,2);const iPadShowKeyboard="";class IPadShowKeyboard extends Disposable{constructor(C){super(),this.editor=C,this.widget=null,isIOS&&(this._register(C.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const C=!this.editor.getOption(90);!this.widget&&C?this.widget=new ShowKeyboardWidget(this.editor):this.widget&&!C&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}IPadShowKeyboard.ID="editor.contrib.iPadShowKeyboard";class ShowKeyboardWidget extends Disposable{constructor(C){super(),this.editor=C,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(addDisposableListener(this._domNode,"touchstart",W=>{this.editor.focus()})),this._register(addDisposableListener(this._domNode,"focus",W=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return ShowKeyboardWidget.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}ShowKeyboardWidget.ID="editor.contrib.ShowKeyboardWidget",registerEditorContribution(IPadShowKeyboard.ID,IPadShowKeyboard,3);const inspectTokens="";var __decorate$7=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$7=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},InspectTokensController_1;let InspectTokensController=InspectTokensController_1=class extends Disposable{static get(C){return C.getContribution(InspectTokensController_1.ID)}constructor(C,W,U){super(),this._editor=C,this._languageService=U,this._widget=null,this._register(this._editor.onDidChangeModel(K=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(K=>this.stop())),this._register(TokenizationRegistry.onDidChange(K=>this.stop())),this._register(this._editor.onKeyUp(K=>K.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new InspectTokensWidget(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};InspectTokensController.ID="editor.contrib.inspectTokens",InspectTokensController=InspectTokensController_1=__decorate$7([__param$7(1,IStandaloneThemeService),__param$7(2,ILanguageService)],InspectTokensController);class InspectTokens extends EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(C,W){const U=InspectTokensController.get(W);U==null||U.launch()}}function renderTokenText(H){let C="";for(let W=0,U=H.length;W<U;W++){const K=H.charCodeAt(W);switch(K){case 9:C+="→";break;case 32:C+="·";break;default:C+=String.fromCharCode(K)}}return C}function getSafeTokenizationSupport(H,C){const W=TokenizationRegistry.get(C);if(W)return W;const U=H.encodeLanguageId(C);return{getInitialState:()=>NullState,tokenize:(K,G,Q)=>nullTokenize(C,Q),tokenizeEncoded:(K,G,Q)=>nullTokenizeEncoded(U,Q)}}class InspectTokensWidget extends Disposable{constructor(C,W){super(),this.allowEditorOverflow=!0,this._editor=C,this._languageService=W,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=getSafeTokenizationSupport(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(U=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return InspectTokensWidget._ID}_compute(C){const W=this._getTokensAtLine(C.lineNumber);let U=0;for(let X=W.tokens1.length-1;X>=0;X--){const ee=W.tokens1[X];if(C.column-1>=ee.offset){U=X;break}}let K=0;for(let X=W.tokens2.length>>>1;X>=0;X--)if(C.column-1>=W.tokens2[X<<1]){K=X;break}const G=this._model.getLineContent(C.lineNumber);let Q="";if(U<W.tokens1.length){const X=W.tokens1[U].offset,ee=U+1<W.tokens1.length?W.tokens1[U+1].offset:G.length;Q=G.substring(X,ee)}reset(this._domNode,$$d("h2.tm-token",void 0,renderTokenText(Q),$$d("span.tm-token-length",void 0,`${Q.length} ${Q.length===1?"char":"chars"}`))),append$1(this._domNode,$$d("hr.tokens-inspect-separator",{style:"clear:both"}));const Z=(K<<1)+1<W.tokens2.length?this._decodeMetadata(W.tokens2[(K<<1)+1]):null;append$1(this._domNode,$$d("table.tm-metadata-table",void 0,$$d("tbody",void 0,$$d("tr",void 0,$$d("td.tm-metadata-key",void 0,"language"),$$d("td.tm-metadata-value",void 0,`${Z?Z.languageId:"-?-"}`)),$$d("tr",void 0,$$d("td.tm-metadata-key",void 0,"token type"),$$d("td.tm-metadata-value",void 0,`${Z?this._tokenTypeToString(Z.tokenType):"-?-"}`)),$$d("tr",void 0,$$d("td.tm-metadata-key",void 0,"font style"),$$d("td.tm-metadata-value",void 0,`${Z?this._fontStyleToString(Z.fontStyle):"-?-"}`)),$$d("tr",void 0,$$d("td.tm-metadata-key",void 0,"foreground"),$$d("td.tm-metadata-value",void 0,`${Z?Color$3.Format.CSS.formatHex(Z.foreground):"-?-"}`)),$$d("tr",void 0,$$d("td.tm-metadata-key",void 0,"background"),$$d("td.tm-metadata-value",void 0,`${Z?Color$3.Format.CSS.formatHex(Z.background):"-?-"}`))))),append$1(this._domNode,$$d("hr.tokens-inspect-separator")),U<W.tokens1.length&&append$1(this._domNode,$$d("span.tm-token-type",void 0,W.tokens1[U].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(C){const W=TokenizationRegistry.getColorMap(),U=TokenMetadata.getLanguageId(C),K=TokenMetadata.getTokenType(C),G=TokenMetadata.getFontStyle(C),Q=TokenMetadata.getForeground(C),Z=TokenMetadata.getBackground(C);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(U),tokenType:K,fontStyle:G,foreground:W[Q],background:W[Z]}}_tokenTypeToString(C){switch(C){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(C){let W="";return C&1&&(W+="italic "),C&2&&(W+="bold "),C&4&&(W+="underline "),C&8&&(W+="strikethrough "),W.length===0&&(W="---"),W}_getTokensAtLine(C){const W=this._getStateBeforeLine(C),U=this._tokenizationSupport.tokenize(this._model.getLineContent(C),!0,W),K=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(C),!0,W);return{startState:W,tokens1:U.tokens,tokens2:K.tokens,endState:U.endState}}_getStateBeforeLine(C){let W=this._tokenizationSupport.getInitialState();for(let U=1;U<C;U++)W=this._tokenizationSupport.tokenize(this._model.getLineContent(U),!0,W).endState;return W}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}InspectTokensWidget._ID="editor.contrib.inspectTokensWidget",registerEditorContribution(InspectTokensController.ID,InspectTokensController,4),registerEditorAction(InspectTokens);var __decorate$6=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$6=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},HelpQuickAccessProvider_1;let HelpQuickAccessProvider=HelpQuickAccessProvider_1=class{constructor(C,W){this.quickInputService=C,this.keybindingService=W,this.registry=Registry.as(Extensions$2.Quickaccess)}provide(C){const W=new DisposableStore;return W.add(C.onDidAccept(()=>{const[U]=C.selectedItems;U&&this.quickInputService.quickAccess.show(U.prefix,{preserveValue:!0})})),W.add(C.onDidChangeValue(U=>{const K=this.registry.getQuickAccessProvider(U.substr(HelpQuickAccessProvider_1.PREFIX.length));K&&K.prefix&&K.prefix!==HelpQuickAccessProvider_1.PREFIX&&this.quickInputService.quickAccess.show(K.prefix,{preserveValue:!0})})),C.items=this.getQuickAccessProviders().filter(U=>U.prefix!==HelpQuickAccessProvider_1.PREFIX),W}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((W,U)=>W.prefix.localeCompare(U.prefix)).flatMap(W=>this.createPicks(W))}createPicks(C){return C.helpEntries.map(W=>{const U=W.prefix||C.prefix,K=U||"…";return{prefix:U,label:K,keybinding:W.commandId?this.keybindingService.lookupKeybinding(W.commandId):void 0,ariaLabel:localize("helpPickAriaLabel","{0}, {1}",K,W.description),description:W.description}})}};HelpQuickAccessProvider.PREFIX="?",HelpQuickAccessProvider=HelpQuickAccessProvider_1=__decorate$6([__param$6(0,IQuickInputService),__param$6(1,IKeybindingService)],HelpQuickAccessProvider),Registry.as(Extensions$2.Quickaccess).registerQuickAccessProvider({ctor:HelpQuickAccessProvider,prefix:"",helpEntries:[{description:QuickHelpNLS.helpQuickAccessActionLabel}]});class AbstractEditorNavigationQuickAccessProvider{constructor(C){this.options=C,this.rangeHighlightDecorationId=void 0}provide(C,W){var U;const K=new DisposableStore;C.canAcceptInBackground=!!(!((U=this.options)===null||U===void 0)&&U.canAcceptInBackground),C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;const G=K.add(new MutableDisposable);return G.value=this.doProvide(C,W),K.add(this.onDidActiveTextEditorControlChange(()=>{G.value=void 0,G.value=this.doProvide(C,W)})),K}doProvide(C,W){var U;const K=new DisposableStore,G=this.activeTextEditorControl;if(G&&this.canProvideWithTextEditor(G)){const Q={editor:G},Z=getCodeEditor(G);if(Z){let X=(U=G.saveViewState())!==null&&U!==void 0?U:void 0;K.add(Z.onDidChangeCursorPosition(()=>{var ee;X=(ee=G.saveViewState())!==null&&ee!==void 0?ee:void 0})),Q.restoreViewState=()=>{X&&G===this.activeTextEditorControl&&G.restoreViewState(X)},K.add(createSingleCallFunction(W.onCancellationRequested)(()=>{var ee;return(ee=Q.restoreViewState)===null||ee===void 0?void 0:ee.call(Q)}))}K.add(toDisposable(()=>this.clearDecorations(G))),K.add(this.provideWithTextEditor(Q,C,W))}else K.add(this.provideWithoutTextEditor(C,W));return K}canProvideWithTextEditor(C){return!0}gotoLocation({editor:C},W){C.setSelection(W.range),C.revealRangeInCenter(W.range,0),W.preserveFocus||C.focus();const U=C.getModel();U&&"getLineContent"in U&&status(`${U.getLineContent(W.range.startLineNumber)}`)}getModel(C){var W;return isDiffEditor(C)?(W=C.getModel())===null||W===void 0?void 0:W.modified:C.getModel()}addDecorations(C,W){C.changeDecorations(U=>{const K=[];this.rangeHighlightDecorationId&&(K.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),K.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const G=[{range:W,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:W,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:themeColorFromId(overviewRulerRangeHighlight),position:OverviewRulerLane.Full}}}],[Q,Z]=U.deltaDecorations(K,G);this.rangeHighlightDecorationId={rangeHighlightId:Q,overviewRulerDecorationId:Z}})}clearDecorations(C){const W=this.rangeHighlightDecorationId;W&&(C.changeDecorations(U=>{U.deltaDecorations([W.overviewRulerDecorationId,W.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(C){const W=localize("cannotRunGotoLine","Open a text editor first to go to a line.");return C.items=[{label:W}],C.ariaLabel=W,Disposable.None}provideWithTextEditor(C,W,U){const K=C.editor,G=new DisposableStore;G.add(W.onDidAccept(X=>{const[ee]=W.selectedItems;if(ee){if(!this.isValidLineNumber(K,ee.lineNumber))return;this.gotoLocation(C,{range:this.toRange(ee.lineNumber,ee.column),keyMods:W.keyMods,preserveFocus:X.inBackground}),X.inBackground||W.hide()}}));const Q=()=>{const X=this.parsePosition(K,W.value.trim().substr(AbstractGotoLineQuickAccessProvider.PREFIX.length)),ee=this.getPickLabel(K,X.lineNumber,X.column);if(W.items=[{lineNumber:X.lineNumber,column:X.column,label:ee}],W.ariaLabel=ee,!this.isValidLineNumber(K,X.lineNumber)){this.clearDecorations(K);return}const te=this.toRange(X.lineNumber,X.column);K.revealRangeInCenter(te,0),this.addDecorations(K,te)};Q(),G.add(W.onDidChangeValue(()=>Q()));const Z=getCodeEditor(K);return Z&&Z.getOptions().get(67).renderType===2&&(Z.updateOptions({lineNumbers:"on"}),G.add(toDisposable(()=>Z.updateOptions({lineNumbers:"relative"})))),G}toRange(C=1,W=1){return{startLineNumber:C,startColumn:W,endLineNumber:C,endColumn:W}}parsePosition(C,W){const U=W.split(/,|:|#/).map(G=>parseInt(G,10)).filter(G=>!isNaN(G)),K=this.lineCount(C)+1;return{lineNumber:U[0]>0?U[0]:K+U[0],column:U[1]}}getPickLabel(C,W,U){if(this.isValidLineNumber(C,W))return this.isValidColumn(C,W,U)?localize("gotoLineColumnLabel","Go to line {0} and character {1}.",W,U):localize("gotoLineLabel","Go to line {0}.",W);const K=C.getPosition()||{lineNumber:1,column:1},G=this.lineCount(C);return G>1?localize("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",K.lineNumber,K.column,G):localize("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",K.lineNumber,K.column)}isValidLineNumber(C,W){return!W||typeof W!="number"?!1:W>0&&W<=this.lineCount(C)}isValidColumn(C,W,U){if(!U||typeof U!="number")return!1;const K=this.getModel(C);if(!K)return!1;const G={lineNumber:W,column:U};return K.validatePosition(G).equals(G)}lineCount(C){var W,U;return(U=(W=this.getModel(C))===null||W===void 0?void 0:W.getLineCount())!==null&&U!==void 0?U:0}}AbstractGotoLineQuickAccessProvider.PREFIX=":";var __decorate$5=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$5=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let StandaloneGotoLineQuickAccessProvider=class extends AbstractGotoLineQuickAccessProvider{constructor(C){super(),this.editorService=C,this.onDidActiveTextEditorControlChange=Event.None}get activeTextEditorControl(){var C;return(C=this.editorService.getFocusedCodeEditor())!==null&&C!==void 0?C:void 0}};StandaloneGotoLineQuickAccessProvider=__decorate$5([__param$5(0,ICodeEditorService)],StandaloneGotoLineQuickAccessProvider);let GotoLineAction$1=class kn extends EditorAction{constructor(){super({id:kn.ID,label:GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(C){C.get(IQuickInputService).quickAccess.show(StandaloneGotoLineQuickAccessProvider.PREFIX)}};GotoLineAction$1.ID="editor.action.gotoLine",registerEditorAction(GotoLineAction$1),Registry.as(Extensions$2.Quickaccess).registerQuickAccessProvider({ctor:StandaloneGotoLineQuickAccessProvider,prefix:StandaloneGotoLineQuickAccessProvider.PREFIX,helpEntries:[{description:GoToLineNLS.gotoLineActionLabel,commandId:GotoLineAction$1.ID}]});const NO_SCORE2=[void 0,[]];function scoreFuzzy2(H,C,W=0,U=0){const K=C;return K.values&&K.values.length>1?doScoreFuzzy2Multiple(H,K.values,W,U):doScoreFuzzy2Single(H,C,W,U)}function doScoreFuzzy2Multiple(H,C,W,U){let K=0;const G=[];for(const Q of C){const[Z,X]=doScoreFuzzy2Single(H,Q,W,U);if(typeof Z!="number")return NO_SCORE2;K+=Z,G.push(...X)}return[K,normalizeMatches(G)]}function doScoreFuzzy2Single(H,C,W,U){const K=fuzzyScore(C.original,C.originalLowercase,W,H,H.toLowerCase(),U,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return K?[K[0],createMatches(K)]:NO_SCORE2}function normalizeMatches(H){const C=H.sort((K,G)=>K.start-G.start),W=[];let U;for(const K of C)!U||!matchOverlaps(U,K)?(U=K,W.push(K)):(U.start=Math.min(U.start,K.start),U.end=Math.max(U.end,K.end));return W}function matchOverlaps(H,C){return!(H.end<C.start||C.end<H.start)}function queryExpectsExactMatch(H){return H.startsWith('"')&&H.endsWith('"')}const MULTIPLE_QUERY_VALUES_SEPARATOR=" ";function prepareQuery(H){typeof H!="string"&&(H="");const C=H.toLowerCase(),{pathNormalized:W,normalized:U,normalizedLowercase:K}=normalizeQuery$1(H),G=W.indexOf(sep)>=0,Q=queryExpectsExactMatch(H);let Z;const X=H.split(MULTIPLE_QUERY_VALUES_SEPARATOR);if(X.length>1)for(const ee of X){const te=queryExpectsExactMatch(ee),{pathNormalized:ne,normalized:ie,normalizedLowercase:oe}=normalizeQuery$1(ee);ie&&(Z||(Z=[]),Z.push({original:ee,originalLowercase:ee.toLowerCase(),pathNormalized:ne,normalized:ie,normalizedLowercase:oe,expectContiguousMatch:te}))}return{original:H,originalLowercase:C,pathNormalized:W,normalized:U,normalizedLowercase:K,values:Z,containsPathSeparator:G,expectContiguousMatch:Q}}function normalizeQuery$1(H){let C;isWindows?C=H.replace(/\//g,sep):C=H.replace(/\\/g,sep);const W=stripWildcards(C).replace(/\s|"/g,"");return{pathNormalized:C,normalized:W,normalizedLowercase:W.toLowerCase()}}function pieceToQuery(H){return Array.isArray(H)?prepareQuery(H.map(C=>C.original).join(MULTIPLE_QUERY_VALUES_SEPARATOR)):prepareQuery(H.original)}var __decorate$4=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$4=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$3=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},AbstractGotoSymbolQuickAccessProvider_1;let AbstractGotoSymbolQuickAccessProvider=AbstractGotoSymbolQuickAccessProvider_1=class extends AbstractEditorNavigationQuickAccessProvider{constructor(C,W,U=Object.create(null)){super(U),this._languageFeaturesService=C,this._outlineModelService=W,this.options=U,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(C){return this.provideLabelPick(C,localize("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),Disposable.None}provideWithTextEditor(C,W,U){const K=C.editor,G=this.getModel(K);return G?this._languageFeaturesService.documentSymbolProvider.has(G)?this.doProvideWithEditorSymbols(C,G,W,U):this.doProvideWithoutEditorSymbols(C,G,W,U):Disposable.None}doProvideWithoutEditorSymbols(C,W,U,K){const G=new DisposableStore;return this.provideLabelPick(U,localize("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),__awaiter$3(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(W,G))||K.isCancellationRequested||G.add(this.doProvideWithEditorSymbols(C,W,U,K))}),G}provideLabelPick(C,W){C.items=[{label:W,index:0,kind:14}],C.ariaLabel=W}waitForLanguageSymbolRegistry(C,W){return __awaiter$3(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(C))return!0;const U=new DeferredPromise,K=W.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(C)&&(K.dispose(),U.complete(!0))}));return W.add(toDisposable(()=>U.complete(!1))),U.p})}doProvideWithEditorSymbols(C,W,U,K){var G;const Q=C.editor,Z=new DisposableStore;Z.add(U.onDidAccept(ne=>{const[ie]=U.selectedItems;ie&&ie.range&&(this.gotoLocation(C,{range:ie.range.selection,keyMods:U.keyMods,preserveFocus:ne.inBackground}),ne.inBackground||U.hide())})),Z.add(U.onDidTriggerItemButton(({item:ne})=>{ne&&ne.range&&(this.gotoLocation(C,{range:ne.range.selection,keyMods:U.keyMods,forceSideBySide:!0}),U.hide())}));const X=this.getDocumentSymbols(W,K);let ee;const te=ne=>__awaiter$3(this,void 0,void 0,function*(){ee==null||ee.dispose(!0),U.busy=!1,ee=new CancellationTokenSource$1(K),U.busy=!0;try{const ie=prepareQuery(U.value.substr(AbstractGotoSymbolQuickAccessProvider_1.PREFIX.length).trim()),oe=yield this.doGetSymbolPicks(X,ie,void 0,ee.token);if(K.isCancellationRequested)return;if(oe.length>0){if(U.items=oe,ne&&ie.original.length===0){const re=findLast(oe,se=>!!(se.type!=="separator"&&se.range&&Range$5.containsPosition(se.range.decoration,ne)));re&&(U.activeItems=[re])}}else ie.original.length>0?this.provideLabelPick(U,localize("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(U,localize("noSymbolResults","No editor symbols"))}finally{K.isCancellationRequested||(U.busy=!1)}});return Z.add(U.onDidChangeValue(()=>te(void 0))),te((G=Q.getSelection())===null||G===void 0?void 0:G.getPosition()),Z.add(U.onDidChangeActive(()=>{const[ne]=U.activeItems;ne&&ne.range&&(Q.revealRangeInCenter(ne.range.selection,0),this.addDecorations(Q,ne.range.decoration))})),Z}doGetSymbolPicks(C,W,U,K){var G,Q;return __awaiter$3(this,void 0,void 0,function*(){const Z=yield C;if(K.isCancellationRequested)return[];const X=W.original.indexOf(AbstractGotoSymbolQuickAccessProvider_1.SCOPE_PREFIX)===0,ee=X?1:0;let te,ne;W.values&&W.values.length>1?(te=pieceToQuery(W.values[0]),ne=pieceToQuery(W.values.slice(1))):te=W;let ie;const oe=(Q=(G=this.options)===null||G===void 0?void 0:G.openSideBySideDirection)===null||Q===void 0?void 0:Q.call(G);oe&&(ie=[{iconClass:oe==="right"?ThemeIcon.asClassName(Codicon.splitHorizontal):ThemeIcon.asClassName(Codicon.splitVertical),tooltip:oe==="right"?localize("openToSide","Open to the Side"):localize("openToBottom","Open to the Bottom")}]);const re=[];for(let le=0;le<Z.length;le++){const ce=Z[le],de=trim(ce.name),ue=`$(${SymbolKinds.toIcon(ce.kind).id}) ${de}`,he=ue.length-de.length;let fe=ce.containerName;U!=null&&U.extraContainerLabel&&(fe?fe=`${U.extraContainerLabel} • ${fe}`:fe=U.extraContainerLabel);let ge,pe,me,ve;if(W.original.length>ee){let ye=!1;if(te!==W&&([ge,pe]=scoreFuzzy2(ue,Object.assign(Object.assign({},W),{values:void 0}),ee,he),typeof ge=="number"&&(ye=!0)),typeof ge!="number"&&([ge,pe]=scoreFuzzy2(ue,te,ee,he),typeof ge!="number"))continue;if(!ye&&ne){if(fe&&ne.original.length>0&&([me,ve]=scoreFuzzy2(fe,ne)),typeof me!="number")continue;typeof ge=="number"&&(ge+=me)}}const be=ce.tags&&ce.tags.indexOf(1)>=0;re.push({index:le,kind:ce.kind,score:ge,label:ue,ariaLabel:getAriaLabelForSymbol(ce.name,ce.kind),description:fe,highlights:be?void 0:{label:pe,description:ve},range:{selection:Range$5.collapseToStart(ce.selectionRange),decoration:ce.range},strikethrough:be,buttons:ie})}const se=re.sort((le,ce)=>X?this.compareByKindAndScore(le,ce):this.compareByScore(le,ce));let ae=[];if(X){let ue=function(){ce&&typeof le=="number"&&de>0&&(ce.label=format(NLS_SYMBOL_KIND_CACHE[le]||FALLBACK_NLS_SYMBOL_KIND,de))},le,ce,de=0;for(const he of se)le!==he.kind?(ue(),le=he.kind,de=1,ce={type:"separator"},ae.push(ce)):de++,ae.push(he);ue()}else se.length>0&&(ae=[{label:localize("symbols","symbols ({0})",re.length),type:"separator"},...se]);return ae})}compareByScore(C,W){if(typeof C.score!="number"&&typeof W.score=="number")return 1;if(typeof C.score=="number"&&typeof W.score!="number")return-1;if(typeof C.score=="number"&&typeof W.score=="number"){if(C.score>W.score)return-1;if(C.score<W.score)return 1}return C.index<W.index?-1:C.index>W.index?1:0}compareByKindAndScore(C,W){const U=NLS_SYMBOL_KIND_CACHE[C.kind]||FALLBACK_NLS_SYMBOL_KIND,K=NLS_SYMBOL_KIND_CACHE[W.kind]||FALLBACK_NLS_SYMBOL_KIND,G=U.localeCompare(K);return G===0?this.compareByScore(C,W):G}getDocumentSymbols(C,W){return __awaiter$3(this,void 0,void 0,function*(){const U=yield this._outlineModelService.getOrCreate(C,W);return W.isCancellationRequested?[]:U.asListOfDocumentSymbols()})}};AbstractGotoSymbolQuickAccessProvider.PREFIX="@",AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX=":",AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY=`${AbstractGotoSymbolQuickAccessProvider_1.PREFIX}${AbstractGotoSymbolQuickAccessProvider_1.SCOPE_PREFIX}`,AbstractGotoSymbolQuickAccessProvider=AbstractGotoSymbolQuickAccessProvider_1=__decorate$4([__param$4(0,ILanguageFeaturesService),__param$4(1,IOutlineModelService)],AbstractGotoSymbolQuickAccessProvider);const FALLBACK_NLS_SYMBOL_KIND=localize("property","properties ({0})"),NLS_SYMBOL_KIND_CACHE={5:localize("method","methods ({0})"),11:localize("function","functions ({0})"),8:localize("_constructor","constructors ({0})"),12:localize("variable","variables ({0})"),4:localize("class","classes ({0})"),22:localize("struct","structs ({0})"),23:localize("event","events ({0})"),24:localize("operator","operators ({0})"),10:localize("interface","interfaces ({0})"),2:localize("namespace","namespaces ({0})"),3:localize("package","packages ({0})"),25:localize("typeParameter","type parameters ({0})"),1:localize("modules","modules ({0})"),6:localize("property","properties ({0})"),9:localize("enum","enumerations ({0})"),21:localize("enumMember","enumeration members ({0})"),14:localize("string","strings ({0})"),0:localize("file","files ({0})"),17:localize("array","arrays ({0})"),15:localize("number","numbers ({0})"),16:localize("boolean","booleans ({0})"),18:localize("object","objects ({0})"),19:localize("key","keys ({0})"),7:localize("field","fields ({0})"),13:localize("constant","constants ({0})")};var __decorate$3=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$3=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let StandaloneGotoSymbolQuickAccessProvider=class extends AbstractGotoSymbolQuickAccessProvider{constructor(C,W,U){super(W,U),this.editorService=C,this.onDidActiveTextEditorControlChange=Event.None}get activeTextEditorControl(){var C;return(C=this.editorService.getFocusedCodeEditor())!==null&&C!==void 0?C:void 0}};StandaloneGotoSymbolQuickAccessProvider=__decorate$3([__param$3(0,ICodeEditorService),__param$3(1,ILanguageFeaturesService),__param$3(2,IOutlineModelService)],StandaloneGotoSymbolQuickAccessProvider);class GotoSymbolAction extends EditorAction{constructor(){super({id:GotoSymbolAction.ID,label:QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(C){C.get(IQuickInputService).quickAccess.show(AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:ItemActivation.NONE})}}GotoSymbolAction.ID="editor.action.quickOutline",registerEditorAction(GotoSymbolAction),Registry.as(Extensions$2.Quickaccess).registerQuickAccessProvider({ctor:StandaloneGotoSymbolQuickAccessProvider,prefix:AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:QuickOutlineNLS.quickOutlineActionLabel,prefix:AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:GotoSymbolAction.ID},{description:QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]});function exceptionToErrorMessage(H,C){return C&&(H.stack||H.stacktrace)?localize("stackTrace.format","{0}: {1}",detectSystemErrorMessage(H),stackToString(H.stack)||stackToString(H.stacktrace)):detectSystemErrorMessage(H)}function stackToString(H){return Array.isArray(H)?H.join(`
1847
- `):H}function detectSystemErrorMessage(H){return H.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${H.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof H.code=="string"&&typeof H.errno=="number"&&typeof H.syscall=="string"?localize("nodeExceptionMessage","A system error occurred ({0})",H.message):H.message||localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function toErrorMessage(H=null,C=!1){if(!H)return localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(H)){const W=coalesce(H),U=toErrorMessage(W[0],C);return W.length>1?localize("error.moreErrors","{0} ({1} errors in total)",U,W.length):U}if(isString$2(H))return H;if(H.detail){const W=H.detail;if(W.error)return exceptionToErrorMessage(W.error,C);if(W.exception)return exceptionToErrorMessage(W.exception,C)}return H.stack?exceptionToErrorMessage(H,C):H.message?H.message:localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function countMapFrom(H){var C;const W=new Map;for(const U of H)W.set(U,((C=W.get(U))!==null&&C!==void 0?C:0)+1);return W}class TfIdfCalculator{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(C,W){const U=this.computeEmbedding(C),K=new Map,G=[];for(const[Q,Z]of this.documents){if(W.isCancellationRequested)return[];for(const X of Z.chunks){const ee=this.computeSimilarityScore(X,U,K);ee>0&&G.push({key:Q,score:ee})}}return G}static termFrequencies(C){return countMapFrom(TfIdfCalculator.splitTerms(C))}static*splitTerms(C){const W=U=>U.toLowerCase();for(const[U]of C.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield W(U);const K=U.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(K.length>1)for(const G of K)G.length>2&&/\p{Letter}{3,}/gu.test(G)&&(yield W(G))}}updateDocuments(C){var W;for(const{key:U}of C)this.deleteDocument(U);for(const U of C){const K=[];for(const G of U.textChunks){const Q=TfIdfCalculator.termFrequencies(G);for(const Z of Q.keys())this.chunkOccurrences.set(Z,((W=this.chunkOccurrences.get(Z))!==null&&W!==void 0?W:0)+1);K.push({text:G,tf:Q})}this.chunkCount+=K.length,this.documents.set(U.key,{chunks:K})}return this}deleteDocument(C){const W=this.documents.get(C);if(W){this.documents.delete(C),this.chunkCount-=W.chunks.length;for(const U of W.chunks)for(const K of U.tf.keys()){const G=this.chunkOccurrences.get(K);if(typeof G=="number"){const Q=G-1;Q<=0?this.chunkOccurrences.delete(K):this.chunkOccurrences.set(K,Q)}}}}computeSimilarityScore(C,W,U){let K=0;for(const[G,Q]of Object.entries(W)){const Z=C.tf.get(G);if(!Z)continue;let X=U.get(G);typeof X!="number"&&(X=this.computeIdf(G),U.set(G,X));const ee=Z*X;K+=ee*Q}return K}computeEmbedding(C){const W=TfIdfCalculator.termFrequencies(C);return this.computeTfidf(W)}computeIdf(C){var W;const U=(W=this.chunkOccurrences.get(C))!==null&&W!==void 0?W:0;return U>0?Math.log((this.chunkCount+1)/U):0}computeTfidf(C){const W=Object.create(null);for(const[U,K]of C){const G=this.computeIdf(U);G>0&&(W[U]=K*G)}return W}}function normalizeTfIdfScores(H){var C,W;const U=H.slice(0);U.sort((G,Q)=>Q.score-G.score);const K=(W=(C=U[0])===null||C===void 0?void 0:C.score)!==null&&W!==void 0?W:0;if(K>0)for(const G of U)G.score/=K;return U}var __awaiter$2=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},TriggerAction;(function(H){H[H.NO_ACTION=0]="NO_ACTION",H[H.CLOSE_PICKER=1]="CLOSE_PICKER",H[H.REFRESH_PICKER=2]="REFRESH_PICKER",H[H.REMOVE_ITEM=3]="REMOVE_ITEM"})(TriggerAction||(TriggerAction={}));function isPicksWithActive(H){const C=H;return Array.isArray(C.items)}function isFastAndSlowPicks(H){const C=H;return!!C.picks&&C.additionalPicks instanceof Promise}class PickerQuickAccessProvider extends Disposable{constructor(C,W){super(),this.prefix=C,this.options=W}provide(C,W,U){var K;const G=new DisposableStore;C.canAcceptInBackground=!!(!((K=this.options)===null||K===void 0)&&K.canAcceptInBackground),C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;let Q;const Z=G.add(new MutableDisposable),X=()=>__awaiter$2(this,void 0,void 0,function*(){const ee=Z.value=new DisposableStore;Q==null||Q.dispose(!0),C.busy=!1,Q=new CancellationTokenSource$1(W);const te=Q.token,ne=C.value.substr(this.prefix.length).trim(),ie=this._getPicks(ne,ee,te,U),oe=(se,ae)=>{var le;let ce,de;if(isPicksWithActive(se)?(ce=se.items,de=se.active):ce=se,ce.length===0){if(ae)return!1;(ne.length>0||C.hideInput)&&(!((le=this.options)===null||le===void 0)&&le.noResultsPick)&&(isFunction(this.options.noResultsPick)?ce=[this.options.noResultsPick(ne)]:ce=[this.options.noResultsPick])}return C.items=ce,de&&(C.activeItems=[de]),!0},re=se=>__awaiter$2(this,void 0,void 0,function*(){let ae=!1,le=!1;yield Promise.all([(()=>__awaiter$2(this,void 0,void 0,function*(){typeof se.mergeDelay=="number"&&(yield timeout(se.mergeDelay),te.isCancellationRequested)||le||(ae=oe(se.picks,!0))}))(),(()=>__awaiter$2(this,void 0,void 0,function*(){C.busy=!0;try{const ce=yield se.additionalPicks;if(te.isCancellationRequested)return;let de,ue;isPicksWithActive(se.picks)?(de=se.picks.items,ue=se.picks.active):de=se.picks;let he,fe;if(isPicksWithActive(ce)?(he=ce.items,fe=ce.active):he=ce,he.length>0||!ae){let ge;if(!ue&&!fe){const pe=C.activeItems[0];pe&&de.indexOf(pe)!==-1&&(ge=pe)}oe({items:[...de,...he],active:ue||fe||ge})}}finally{te.isCancellationRequested||(C.busy=!1),le=!0}}))()])});if(ie!==null)if(isFastAndSlowPicks(ie))yield re(ie);else if(!(ie instanceof Promise))oe(ie);else{C.busy=!0;try{const se=yield ie;if(te.isCancellationRequested)return;isFastAndSlowPicks(se)?yield re(se):oe(se)}finally{te.isCancellationRequested||(C.busy=!1)}}});return G.add(C.onDidChangeValue(()=>X())),X(),G.add(C.onDidAccept(ee=>{const[te]=C.selectedItems;typeof(te==null?void 0:te.accept)=="function"&&(ee.inBackground||C.hide(),te.accept(C.keyMods,ee))})),G.add(C.onDidTriggerItemButton(({button:ee,item:te})=>__awaiter$2(this,void 0,void 0,function*(){var ne,ie;if(typeof te.trigger=="function"){const oe=(ie=(ne=te.buttons)===null||ne===void 0?void 0:ne.indexOf(ee))!==null&&ie!==void 0?ie:-1;if(oe>=0){const re=te.trigger(oe,C.keyMods),se=typeof re=="number"?re:yield re;if(W.isCancellationRequested)return;switch(se){case TriggerAction.NO_ACTION:break;case TriggerAction.CLOSE_PICKER:C.hide();break;case TriggerAction.REFRESH_PICKER:X();break;case TriggerAction.REMOVE_ITEM:{const ae=C.items.indexOf(te);if(ae!==-1){const le=C.items.slice(),ce=le.splice(ae,1),de=C.activeItems.filter(he=>he!==ce[0]),ue=C.keepScrollPosition;C.keepScrollPosition=!0,C.items=le,de&&(C.activeItems=de),C.keepScrollPosition=ue}break}}}}}))),G}}var __decorate$2=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$2=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$1=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},AbstractCommandsQuickAccessProvider_1,CommandsHistory_1;let AbstractCommandsQuickAccessProvider=AbstractCommandsQuickAccessProvider_1=class extends PickerQuickAccessProvider{constructor(C,W,U,K,G,Q){super(AbstractCommandsQuickAccessProvider_1.PREFIX,C),this.instantiationService=W,this.keybindingService=U,this.commandService=K,this.telemetryService=G,this.dialogService=Q,this.commandsHistory=this._register(this.instantiationService.createInstance(CommandsHistory)),this.options=C}_getPicks(C,W,U,K){var G,Q,Z,X;return __awaiter$1(this,void 0,void 0,function*(){const ee=yield this.getCommandPicks(U);if(U.isCancellationRequested)return[];const te=createSingleCallFunction(()=>{const le=new TfIdfCalculator;le.updateDocuments(ee.map(de=>({key:de.commandId,textChunks:[de.label+(de.commandAlias?` ${de.commandAlias}`:"")]})));const ce=le.calculateScores(C,U);return normalizeTfIdfScores(ce).filter(de=>de.score>AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD).slice(0,AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS)}),ne=[];for(const le of ee){const ce=(G=AbstractCommandsQuickAccessProvider_1.WORD_FILTER(C,le.label))!==null&&G!==void 0?G:void 0,de=le.commandAlias&&(Q=AbstractCommandsQuickAccessProvider_1.WORD_FILTER(C,le.commandAlias))!==null&&Q!==void 0?Q:void 0;if(ce||de)le.highlights={label:ce,detail:this.options.showAlias?de:void 0},ne.push(le);else if(C===le.commandId)ne.push(le);else if(C.length>=3){const ue=te();if(U.isCancellationRequested)return[];const he=ue.find(fe=>fe.key===le.commandId);he&&(le.tfIdfScore=he.score,ne.push(le))}}const ie=new Map;for(const le of ne){const ce=ie.get(le.label);ce?(le.description=le.commandId,ce.description=ce.commandId):ie.set(le.label,le)}ne.sort((le,ce)=>{if(le.tfIdfScore&&ce.tfIdfScore)return le.tfIdfScore===ce.tfIdfScore?le.label.localeCompare(ce.label):ce.tfIdfScore-le.tfIdfScore;if(le.tfIdfScore)return 1;if(ce.tfIdfScore)return-1;const de=this.commandsHistory.peek(le.commandId),ue=this.commandsHistory.peek(ce.commandId);if(de&&ue)return de>ue?-1:1;if(de)return-1;if(ue)return 1;if(this.options.suggestedCommandIds){const he=this.options.suggestedCommandIds.has(le.commandId),fe=this.options.suggestedCommandIds.has(ce.commandId);if(he&&fe)return 0;if(he)return-1;if(fe)return 1}return le.label.localeCompare(ce.label)});const oe=[];let re=!1,se=!0,ae=!!this.options.suggestedCommandIds;for(let le=0;le<ne.length;le++){const ce=ne[le];le===0&&this.commandsHistory.peek(ce.commandId)&&(oe.push({type:"separator",label:localize("recentlyUsed","recently used")}),re=!0),se&&ce.tfIdfScore!==void 0&&(oe.push({type:"separator",label:localize("suggested","similar commands")}),se=!1),ae&&ce.tfIdfScore===void 0&&!this.commandsHistory.peek(ce.commandId)&&(!((Z=this.options.suggestedCommandIds)===null||Z===void 0)&&Z.has(ce.commandId))&&(oe.push({type:"separator",label:localize("commonlyUsed","commonly used")}),re=!0,ae=!1),re&&ce.tfIdfScore===void 0&&!this.commandsHistory.peek(ce.commandId)&&!(!((X=this.options.suggestedCommandIds)===null||X===void 0)&&X.has(ce.commandId))&&(oe.push({type:"separator",label:localize("morecCommands","other commands")}),re=!1),oe.push(this.toCommandPick(ce,K))}return this.hasAdditionalCommandPicks(C,U)?{picks:oe,additionalPicks:(()=>__awaiter$1(this,void 0,void 0,function*(){var le;const ce=yield this.getAdditionalCommandPicks(ee,ne,C,U);if(U.isCancellationRequested)return[];const de=ce.map(ue=>this.toCommandPick(ue,K));return se&&((le=de[0])===null||le===void 0?void 0:le.type)!=="separator"&&de.unshift({type:"separator",label:localize("suggested","similar commands")}),de}))()}:oe})}toCommandPick(C,W){if(C.type==="separator")return C;const U=this.keybindingService.lookupKeybinding(C.commandId),K=U?localize("commandPickAriaLabelWithKeybinding","{0}, {1}",C.label,U.getAriaLabel()):C.label;return Object.assign(Object.assign({},C),{ariaLabel:K,detail:this.options.showAlias&&C.commandAlias!==C.label?C.commandAlias:void 0,keybinding:U,accept:()=>__awaiter$1(this,void 0,void 0,function*(){var G,Q;this.commandsHistory.push(C.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:C.commandId,from:(G=W==null?void 0:W.from)!==null&&G!==void 0?G:"quick open"});try{!((Q=C.args)===null||Q===void 0)&&Q.length?yield this.commandService.executeCommand(C.commandId,...C.args):yield this.commandService.executeCommand(C.commandId)}catch(Z){isCancellationError(Z)||this.dialogService.error(localize("canNotRun","Command '{0}' resulted in an error",C.label),toErrorMessage(Z))}})})}};AbstractCommandsQuickAccessProvider.PREFIX=">",AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD=.5,AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS=5,AbstractCommandsQuickAccessProvider.WORD_FILTER=or(matchesPrefix,matchesWords,matchesContiguousSubString),AbstractCommandsQuickAccessProvider=AbstractCommandsQuickAccessProvider_1=__decorate$2([__param$2(1,IInstantiationService),__param$2(2,IKeybindingService),__param$2(3,ICommandService),__param$2(4,ITelemetryService),__param$2(5,IDialogService)],AbstractCommandsQuickAccessProvider);let CommandsHistory=CommandsHistory_1=class extends Disposable{constructor(C,W){super(),this.storageService=C,this.configurationService=W,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(C=>this.updateConfiguration(C)))}updateConfiguration(C){C&&!C.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=CommandsHistory_1.getConfiguredCommandHistoryLength(this.configurationService),CommandsHistory_1.cache&&CommandsHistory_1.cache.limit!==this.configuredCommandsHistoryLength&&(CommandsHistory_1.cache.limit=this.configuredCommandsHistoryLength,CommandsHistory_1.saveState(this.storageService)))}load(){const C=this.storageService.get(CommandsHistory_1.PREF_KEY_CACHE,0);let W;if(C)try{W=JSON.parse(C)}catch{}const U=CommandsHistory_1.cache=new LRUCache(this.configuredCommandsHistoryLength,1);if(W){let K;W.usesLRU?K=W.entries:K=W.entries.sort((G,Q)=>G.value-Q.value),K.forEach(G=>U.set(G.key,G.value))}CommandsHistory_1.counter=this.storageService.getNumber(CommandsHistory_1.PREF_KEY_COUNTER,0,CommandsHistory_1.counter)}push(C){CommandsHistory_1.cache&&(CommandsHistory_1.cache.set(C,CommandsHistory_1.counter++),CommandsHistory_1.saveState(this.storageService))}peek(C){var W;return(W=CommandsHistory_1.cache)===null||W===void 0?void 0:W.peek(C)}static saveState(C){if(!CommandsHistory_1.cache)return;const W={usesLRU:!0,entries:[]};CommandsHistory_1.cache.forEach((U,K)=>W.entries.push({key:K,value:U})),C.store(CommandsHistory_1.PREF_KEY_CACHE,JSON.stringify(W),0,0),C.store(CommandsHistory_1.PREF_KEY_COUNTER,CommandsHistory_1.counter,0,0)}static getConfiguredCommandHistoryLength(C){var W,U;const G=(U=(W=C.getValue().workbench)===null||W===void 0?void 0:W.commandPalette)===null||U===void 0?void 0:U.history;return typeof G=="number"?G:CommandsHistory_1.DEFAULT_COMMANDS_HISTORY_LENGTH}};CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH=50,CommandsHistory.PREF_KEY_CACHE="commandPalette.mru.cache",CommandsHistory.PREF_KEY_COUNTER="commandPalette.mru.counter",CommandsHistory.counter=1,CommandsHistory=CommandsHistory_1=__decorate$2([__param$2(0,IStorageService),__param$2(1,IConfigurationService)],CommandsHistory);class AbstractEditorCommandsQuickAccessProvider extends AbstractCommandsQuickAccessProvider{constructor(C,W,U,K,G,Q){super(C,W,U,K,G,Q)}getCodeEditorCommandPicks(){const C=this.activeTextEditorControl;if(!C)return[];const W=[];for(const U of C.getSupportedActions())W.push({commandId:U.id,commandAlias:U.alias,label:stripIcons(U.label)||U.id});return W}}var __decorate$1=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$1=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};let StandaloneCommandsQuickAccessProvider=class extends AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){var C;return(C=this.codeEditorService.getFocusedCodeEditor())!==null&&C!==void 0?C:void 0}constructor(C,W,U,K,G,Q){super({showAlias:!1},C,U,K,G,Q),this.codeEditorService=W}getCommandPicks(){return __awaiter(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return __awaiter(this,void 0,void 0,function*(){return[]})}};StandaloneCommandsQuickAccessProvider=__decorate$1([__param$1(0,IInstantiationService),__param$1(1,ICodeEditorService),__param$1(2,IKeybindingService),__param$1(3,ICommandService),__param$1(4,ITelemetryService),__param$1(5,IDialogService)],StandaloneCommandsQuickAccessProvider);class GotoLineAction extends EditorAction{constructor(){super({id:GotoLineAction.ID,label:QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(C){C.get(IQuickInputService).quickAccess.show(StandaloneCommandsQuickAccessProvider.PREFIX)}}GotoLineAction.ID="editor.action.quickCommand",registerEditorAction(GotoLineAction),Registry.as(Extensions$2.Quickaccess).registerQuickAccessProvider({ctor:StandaloneCommandsQuickAccessProvider,prefix:StandaloneCommandsQuickAccessProvider.PREFIX,helpEntries:[{description:QuickCommandNLS.quickCommandHelp,commandId:GotoLineAction.ID}]});var __decorate=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let StandaloneReferencesController=class extends ReferencesController{constructor(C,W,U,K,G,Q,Z){super(!0,C,W,U,K,G,Q,Z)}};StandaloneReferencesController=__decorate([__param(1,IContextKeyService),__param(2,ICodeEditorService),__param(3,INotificationService),__param(4,IInstantiationService),__param(5,IStorageService),__param(6,IConfigurationService)],StandaloneReferencesController),registerEditorContribution(ReferencesController.ID,StandaloneReferencesController,4);class ToggleHighContrast extends EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(C,W){const U=C.get(IStandaloneThemeService),K=U.getColorTheme();isHighContrast(K.type)?(U.setTheme(this._originalThemeName||(isDark(K.type)?VS_DARK_THEME_NAME:VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(U.setTheme(isDark(K.type)?HC_BLACK_THEME_NAME:HC_LIGHT_THEME_NAME),this._originalThemeName=K.themeName)}}registerEditorAction(ToggleHighContrast);function WorkerWrapper$4(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/json.worker-8dd963f3.js").href:new URL("assets/json.worker-8dd963f3.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$3(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/css.worker-c3850ceb.js").href:new URL("assets/css.worker-c3850ceb.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$2(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/html.worker-88b237e1.js").href:new URL("assets/html.worker-88b237e1.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$1(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/ts.worker-184cdfdf.js").href:new URL("assets/ts.worker-184cdfdf.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-94ffd778.js").href:new URL("assets/editor.worker-94ffd778.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}const _sfc_main$E=vue.defineComponent({__name:"monacoEditor",props:{readOnly:{type:Boolean,default:!1},...editorProps},emits:["update:modelValue","change","editor-mounted"],setup(H,{emit:C}){vue.useCssVars(ee=>({"32d7ef8b":ee.width,"0e570802":ee.height}));const W=H,U=C;self.MonacoEnvironment={getWorker(ee,te){return te==="json"?new WorkerWrapper$4:["css","less"].includes(te)?new WorkerWrapper$3:["html","handlebars","razor"].includes(te)?new WorkerWrapper$2:["typescript","javascript"].includes(te)?new WorkerWrapper$1:new WorkerWrapper}};let K;const G=vue.ref(),Q=()=>{languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),languages.typescript.javascriptDefaults.setCompilerOptions({target:languages.typescript.ScriptTarget.ES2020,allowNonTsExtensions:!0}),K=editor.create(G.value,{value:W.modelValue,language:W.language,theme:W.theme,...W.options}),K.getAction("editor.action.formatDocument").run(),K.onDidChangeModelContent(()=>{const ee=K.getValue();U("update:modelValue",ee),U("change",ee)}),X(),U("editor-mounted",K)},Z=ee=>{let te=K.getModel();te&&editor.setModelLanguage(te,ee)};vue.watch(()=>W.language,ee=>{K&&Z(ee)}),vue.watch(()=>W.modelValue,ee=>{if(K){const te=K.getValue();ee!==te&&(K.getAction("editor.action.formatDocument").run(),K.setValue(ee),X())}}),vue.onMounted(()=>{Q()});const X=()=>{var te;const ee=W.readOnly;K==null||K.updateOptions({readOnly:!1}),(te=K==null?void 0:K.getAction("editor.action.formatDocument"))==null||te.run().then().finally(()=>K==null?void 0:K.updateOptions({readOnly:ee})),K==null||K.setValue(K==null?void 0:K.getValue())};return(ee,te)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"codeEditBox",ref:G,class:"codeEditBox"},null,512))}}),monacoEditor_vue_vue_type_style_index_0_scoped_8e6cb063_lang="",monacoEditor=_export_sfc(_sfc_main$E,[["__scopeId","data-v-8e6cb063"]]),monacoEditor$1=Object.freeze(Object.defineProperty({__proto__:null,default:monacoEditor},Symbol.toStringTag,{value:"Module"})),_withScopeId$3=H=>(vue.pushScopeId("data-v-c9ea141a"),H=H(),vue.popScopeId(),H),_hoisted_1$j={style:{height:"40px"}},_hoisted_2$c={style:{float:"right"}},_hoisted_3$a=_withScopeId$3(()=>vue.createElementVNode("span",null,"watch监听事件放到Mounted方法里面",-1)),_hoisted_4$8={style:{height:"500px",width:"100%"}},_hoisted_5$7={style:{width:"300px",height:"100%",border:"1px solid #e4e7ed",float:"left",overflow:"auto"}},_hoisted_6$6=["onClick"],_hoisted_7$4={style:{color:"#67c23a"}},_hoisted_8$2=["onClick"],_hoisted_9$2={key:0,style:{width:"calc(100% - 310px)",height:"100%",float:"left"}},_hoisted_10$2={class:"content"},_hoisted_11$2={key:0},_hoisted_12$2=_withScopeId$3(()=>vue.createElementVNode("a",{style:{color:"red"}},"存在多个时,用逗号(,)分隔,如onChange,onClose",-1)),_hoisted_13$2={key:1},_hoisted_14$2=_withScopeId$3(()=>vue.createElementVNode("a",{style:{color:"red"}},"可暴露变量名或方法名让外部接收,存在多个时,用逗号(,)分隔,如onChange,onClose",-1)),_hoisted_15$2={key:2,style:{height:"100%"}},_hoisted_16$2={key:3,style:{height:"100%"}},_hoisted_17$2=_withScopeId$3(()=>vue.createElementVNode("div",{style:{color:"red","padding-top":"8px"}},"变量使用示例: basicInfo.value.name",-1)),_hoisted_18$1={key:4,style:{height:"100%"}},_hoisted_19$1={key:0},_hoisted_20={style:{color:"blue"}},_hoisted_21={key:1,style:{color:"blue","font-size":"12px"}},_sfc_main$D=vue.defineComponent({__name:"TypeScript",setup(H){const C=useFormStore(),W=[{type:"Mounted",name:"Mounted"},{type:"Function",name:"方法"},{type:"BeforeValidate",name:"(保存前)校验"}],U=[{type:"basicInfo",name:"变量"},{type:"Computed",name:"Computed"},{type:"Exposed",name:"Exposed"}];let K=vue.ref(-1),G=vue.ref({key:"",name:"",func:"",param:"",isasync:!1,type:"Function"}),Q=vue.ref(C.formData.config.eventScript);const Z=[{value:"string",label:"字符串"},{value:"number",label:"数字"},{value:"boolean",label:"布尔值"},{value:"object",label:"对象"},{value:"array",label:"数组"}];C.formData.config.cBasicInfo==null&&(C.formData.config.cBasicInfo=[]);let X=vue.ref(C.formData.config.cBasicInfo);function ee(){X.value.push({name:"",type:"",default:""})}function te(re){let se=X.value.indexOf(re);se!==-1&&X.value.splice(se,1)}G.value=Q.value[0];function ne(re){if(["Mounted","Emit","Props","basicInfo","BeforeValidate","Exposed"].includes(re)&&Q.value.filter(ce=>ce.type==re).length==1){message.warning("已经存在一个"+re+",不能重复添加");return}const ae={key:"12323",name:"fun1",func:"",param:"",isasync:!1,type:re};switch(re){case"Props":ae.name="_props",ae.func="// {{name:'value',type:'string'}}";break;case"Mounted":ae.name="initMount";break;case"basicInfo":ae.name="变量";break;case"BeforeValidate":ae.name="onBeforeValidate";break}Q.value.push(ae),oe(Q.value.length-1)}function ie(re,se){if(["basicInfo"].includes(re.type)&&X.value.length>0){message.error("存在变量项,不能直接删除,请先删除变量项");return}Q.value.splice(se,1);const le=se-1;K.value=le,G.value=Q.value[le]}function oe(re){K.value=re,G.value=Q.value[re]}return(re,se)=>{const ae=vue.resolveComponent("a-button"),le=vue.resolveComponent("a-space"),ce=vue.resolveComponent("a-tooltip"),de=vue.resolveComponent("a-input"),ue=vue.resolveComponent("a-form-item"),he=vue.resolveComponent("a-col"),fe=vue.resolveComponent("a-select"),ge=vue.resolveComponent("a-row"),pe=vue.resolveComponent("a-switch"),me=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$j,[vue.createVNode(le,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(W,(ve,be)=>vue.createVNode(ae,{onClick:ye=>ne(ve.type)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ve.name),1)]),_:2},1032,["onClick"])),64)),(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(U,(ve,be)=>vue.createVNode(ae,{danger:"",onClick:ye=>ne(ve.type)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ve.name),1)]),_:2},1032,["onClick"])),64))]),_:1}),vue.createElementVNode("div",_hoisted_2$c,[vue.createVNode(le,null,{default:vue.withCtx(()=>[vue.createVNode(ce,{color:"green",placement:"bottom"},{title:vue.withCtx(()=>[_hoisted_3$a]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(QuestionCircleOutlined$1),{style:{fontSize:"16px",color:"#1677ff"}})]),_:1})]),_:1})])]),vue.createElementVNode("div",_hoisted_4$8,[vue.createElementVNode("div",_hoisted_5$7,[vue.createElementVNode("ul",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q),(ve,be)=>(vue.openBlock(),vue.createElementBlock("li",{class:vue.normalizeClass(["menu-item",{active:vue.unref(K)==be}])},[vue.createElementVNode("div",null,[vue.createElementVNode("div",{style:{"padding-left":"5px",display:"inline-block",width:"230px"},onClick:ye=>oe(be)},[vue.createElementVNode("span",_hoisted_7$4,vue.toDisplayString(ve.type?ve.type:"Function"),1),vue.createTextVNode(" "+vue.toDisplayString(ve.name),1)],8,_hoisted_6$6),vue.createElementVNode("div",{style:{display:"inline-block",right:"5px",cursor:"pointer"},onClick:ye=>ie(ve,be)},[vue.createVNode(vue.unref(DeleteOutlined$1))],8,_hoisted_8$2)])],2))),256))])]),vue.unref(G)!=null?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$2,[vue.createElementVNode("div",_hoisted_10$2,[vue.unref(G).type=="Emit"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$2,[vue.createVNode(ue,{label:"Emit",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[0]||(se[0]=ve=>vue.unref(G).name=ve),placeholder:""},null,8,["value"]),_hoisted_12$2]),_:1})])):vue.unref(G).type=="Exposed"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$2,[vue.createVNode(ue,{label:"Exposed",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[1]||(se[1]=ve=>vue.unref(G).name=ve),placeholder:""},null,8,["value"]),_hoisted_14$2]),_:1})])):vue.unref(G).type=="Props"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[vue.createVNode(monacoEditor,{modelValue:vue.unref(G).func,"onUpdate:modelValue":se[2]||(se[2]=ve=>vue.unref(G).func=ve),language:"typescript",style:{width:"100%"},height:"100%","update:modelValue":"eventScript.func"},null,8,["modelValue"])])):vue.unref(G).type=="basicInfo"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16$2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(X),(ve,be)=>(vue.openBlock(),vue.createBlock(ge,{style:{"padding-bottom":"5px"}},{default:vue.withCtx(()=>[vue.createVNode(he,{span:6},{default:vue.withCtx(()=>[vue.createVNode(de,{value:ve.name,"onUpdate:value":ye=>ve.name=ye,placeholder:"变量名称"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:6,offset:1},{default:vue.withCtx(()=>[vue.createVNode(fe,{value:ve.type,"onUpdate:value":ye=>ve.type=ye,options:Z,placeholder:"变量类型",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:6,offset:1},{default:vue.withCtx(()=>[vue.createVNode(de,{value:ve.default,"onUpdate:value":ye=>ve.default=ye,placeholder:"默认值"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:3,offset:1,style:{"line-height":"30px"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:ye=>te(ve),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4"}},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(ue,null,{default:vue.withCtx(()=>[vue.createVNode(ae,{type:"dashed",style:{width:"100%"},onClick:ee},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加自定义变量 ")]),_:1}),_hoisted_17$2]),_:1})])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_18$1,[vue.createVNode(me,{"label-col":{span:6},"wrapper-col":{span:18},style:{height:"100%"}},{default:vue.withCtx(()=>[vue.unref(G).name!="全局变量定义"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_19$1,[vue.createVNode(ue,{label:"Function Name",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[3]||(se[3]=ve=>vue.unref(G).name=ve),readOnly:vue.unref(G).type=="Mounted"||vue.unref(G).type=="BeforeValidate"},null,8,["value","readOnly"])]),_:1}),vue.unref(G).name!="全局变量定义"&&vue.unref(G).type!="Computed"?(vue.openBlock(),vue.createBlock(ue,{key:0,label:"参数"},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).param,"onUpdate:value":se[4]||(se[4]=ve=>vue.unref(G).param=ve)},null,8,["value"])]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(ue,{label:"是否异步"},{default:vue.withCtx(()=>[vue.createVNode(pe,{checked:vue.unref(G).isasync,"onUpdate:checked":se[5]||(se[5]=ve=>vue.unref(G).isasync=ve),"checked-children":"是","un-checked-children":"否"},null,8,["checked"])]),_:1}),vue.createElementVNode("div",_hoisted_20,vue.toDisplayString(vue.unref(G).isasync?"async":"")+" Function(){ ",1)])):vue.createCommentVNode("",!0),vue.createVNode(monacoEditor,{modelValue:vue.unref(G).func,"onUpdate:modelValue":se[6]||(se[6]=ve=>vue.unref(G).func=ve),language:"typescript",style:{width:"100%"},height:"100%","update:modelValue":"eventScript.func"},null,8,["modelValue"]),vue.unref(G).name!="全局变量定义"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_21," } ")):vue.createCommentVNode("",!0)]),_:1})]))])])):vue.createCommentVNode("",!0)])],64)}}}),TypeScript_vue_vue_type_style_index_0_scoped_c9ea141a_lang="",TypeScript=_export_sfc(_sfc_main$D,[["__scopeId","data-v-c9ea141a"]]),TypeScript$1=Object.freeze(Object.defineProperty({__proto__:null,default:TypeScript},Symbol.toStringTag,{value:"Module"})),_sfc_main$C=vue.defineComponent({__name:"Form",setup(H){const C=useFormStore(),W=vue.ref(!1),U=vue.ref(""),K=vue.ref("");function G(Q){K.value=Q,Q=="datasource"?(U.value="数据源",W.value=!0):Q=="ts"?(U.value="脚本",W.value=!0):Q=="basets"&&(U.value="",W.value=!0)}return(Q,Z)=>{const X=vue.resolveComponent("a-input-number"),ee=vue.resolveComponent("a-form-item"),te=vue.resolveComponent("a-button"),ne=vue.resolveComponent("a-form"),ie=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(ne,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(ee,{label:"表单文本宽度",name:"labelWidth"},{default:vue.withCtx(()=>[vue.createVNode(X,{min:"50",max:"300",defaultValue:"100",value:vue.unref(C).formData.config.labelWidth,"onUpdate:value":Z[0]||(Z[0]=oe=>vue.unref(C).formData.config.labelWidth=oe)},null,8,["value"])]),_:1}),vue.createVNode(ee,{label:"脚本"},{default:vue.withCtx(()=>[vue.createVNode(te,{onClick:Z[1]||(Z[1]=oe=>G("ts")),block:""},{default:vue.withCtx(()=>[vue.createTextVNode(" + ")]),_:1})]),_:1})]),_:1}),vue.createVNode(ie,{open:W.value,"onUpdate:open":Z[3]||(Z[3]=oe=>W.value=oe),title:U.value,width:"1000px"},{footer:vue.withCtx(()=>[]),default:vue.withCtx(()=>[W.value&&K.value=="datasource"?(vue.openBlock(),vue.createBlock(DataSource$1,{key:0})):vue.createCommentVNode("",!0),W.value&&K.value=="ts"?(vue.openBlock(),vue.createBlock(TypeScript,{key:1})):vue.createCommentVNode("",!0),W.value&&K.value=="basets"?(vue.openBlock(),vue.createBlock(monacoEditor,{key:2,modelValue:vue.unref(C).formData.config.baseScript,"onUpdate:modelValue":Z[2]||(Z[2]=oe=>vue.unref(C).formData.config.baseScript=oe),"update:modelValue":"formStore.formData.config.baseScript",language:"typescript",style:{width:"100%","padding-top":"20px"},height:"500px"},null,8,["modelValue"])):vue.createCommentVNode("",!0)]),_:1},8,["open","title"])],64)}}}),Form_vue_vue_type_style_index_0_scoped_be567b5d_lang="",CForm=_export_sfc(_sfc_main$C,[["__scopeId","data-v-be567b5d"]]),Form$1=Object.freeze(Object.defineProperty({__proto__:null,default:CForm},Symbol.toStringTag,{value:"Module"})),_hoisted_1$i={style:{"min-height":"500px"}},_hoisted_2$b={style:{"padding-top":"10px"}},_hoisted_3$9={style:{padding:"0 0 10px",color:"rgba(139,61,255)"}},_hoisted_4$7={key:0,style:{"background-color":"#fff",border:"1px solid #d9d9d9"}},_hoisted_5$6={style:{"font-weight":"600","padding-left":"20px"}},_hoisted_6$5={key:1},_hoisted_7$3={style:{padding:"15px 0 15px",color:"rgba(139,61,255)"}},placement="bottom",_sfc_main$B=vue.defineComponent({__name:"FormSetting",props:{open:{type:Boolean,default:!1},title:{type:String,default:"设置"},isedit:{type:Boolean,default:!1},data:{type:Object,default:()=>({name:"",ruleList:[],actionList:[]})}},emits:["onClose"],setup(H,{emit:C}){const W=H;let U=vue.ref(W.open);const K=useFormStore(),G=vue.ref(!1);let Q=vue.ref({});Q.value=W.data;const Z=vue.ref([]),X=vue.ref([]),ee=vue.ref(""),te=[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"包含"},{value:"notIn",label:"不包含"}],ne=[{value:"fix",label:"固定值"},{value:"field",label:"字段值"}],ie=[{value:"隐藏",label:"隐藏"},{value:"显示",label:"显示"},{value:"只读",label:"只读"},{value:"可编辑",label:"可编辑"},{value:"必填",label:"必填"}];function oe(fe){Q.value.actionList.push({actionType:fe.value,actionField:[]})}function re(fe,ge){if(ge.checked){let pe=Q.value.ruleList,me="当";pe.length>0&&(me="且"),pe.push({matchType:me,title:ge.node.name,field:ge.node.id,ruleType:"等于",selectType:"fix",ruleValue:""}),G.value=!G}}let se=vue.computed(()=>{let fe=[];return K.getFormDesignConfig.list.forEach(ge=>{le(fe,ge),ge.type=="grid"&&ae(ge,fe),ge.type=="collapse"&&ge.content.forEach(pe=>{switch(pe.type){case"grid":ae(pe,fe);break}})}),fe});function ae(fe,ge){fe.columns.forEach(pe=>{pe.list.forEach(me=>{le(ge,me)})})}function le(fe,ge){(ge.type=="input"||ge.type=="inputnumber"||ge.type=="radio")&&fe.push({id:ge.model==null?ge.id:ge.model,name:ge.name})}const ce=C;function de(){ce("onClose",{refresh:!0})}function ue(){W.isedit||(K.formData.config.formSetting==null&&(K.formData.config.formSetting=[]),K.formData.config.formSetting.push(Q.value)),ce("onClose",{refresh:!0})}let he=vue.ref(!1);return(fe,ge)=>{const pe=vue.resolveComponent("a-input"),me=vue.resolveComponent("a-form-item"),ve=vue.resolveComponent("a-tree"),be=vue.resolveComponent("a-menu-item"),ye=vue.resolveComponent("a-menu"),Ce=vue.resolveComponent("a-dropdown"),ke=vue.resolveComponent("a-col"),Se=vue.resolveComponent("a-row"),De=vue.resolveComponent("a-select"),Ne=vue.resolveComponent("a-button"),Ie=vue.resolveComponent("a-space"),Ee=vue.resolveComponent("a-drawer");return vue.openBlock(),vue.createBlock(Ee,{title:H.title,width:600,open:vue.unref(U),"onUpdate:open":ge[7]||(ge[7]=Te=>vue.isRef(U)?U.value=Te:U=Te),"body-style":{paddingBottom:"80px"},"footer-style":{textAlign:"right"},onClose:de},{extra:vue.withCtx(()=>[vue.createVNode(Ie,null,{default:vue.withCtx(()=>[vue.createVNode(Ne,{onClick:de},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1}),vue.createVNode(Ne,{type:"primary",onClick:ue},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1})]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$i,[vue.unref(he)?(vue.openBlock(),vue.createBlock(me,{key:0,label:"规则名称",name:"name",rules:[{required:!0,message:"规则名称"}]},{default:vue.withCtx(()=>[vue.createVNode(pe,{value:vue.unref(Q).name,"onUpdate:value":ge[0]||(ge[0]=Te=>vue.unref(Q).name=Te)},null,8,["value"])]),_:1})):vue.createCommentVNode("",!0),vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[1]||(ge[1]=()=>G.value=!G.value)},[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加条件 ")]),vue.createElementVNode("div",_hoisted_2$b,[vue.createElementVNode("h3",_hoisted_3$9,[vue.createTextVNode("当满足以下条件 "),vue.createVNode(vue.unref(ArrowRightOutlined$1))]),G.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$7,[vue.createVNode(pe,{value:ee.value,"onUpdate:value":ge[2]||(ge[2]=Te=>ee.value=Te),style:{"margin-bottom":"2px"}},{prefix:vue.withCtx(()=>[vue.createVNode(vue.unref(SearchOutlined$1))]),_:1},8,["value"]),vue.createVNode(ve,{selectedKeys:Z.value,"onUpdate:selectedKeys":ge[3]||(ge[3]=Te=>Z.value=Te),checkedKeys:X.value,"onUpdate:checkedKeys":ge[4]||(ge[4]=Te=>X.value=Te),checkable:"","tree-data":vue.unref(se),onCheck:re},{title:vue.withCtx(({name:Te,id:we})=>[vue.createElementVNode("span",null,vue.toDisplayString(Te),1)]),_:1},8,["selectedKeys","checkedKeys","tree-data"])])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).ruleList,(Te,we)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Se,{style:{margin:"8px 0"}},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:12},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Te.matchType),1),vue.createElementVNode("span",_hoisted_5$6,vue.toDisplayString(Te.title),1),vue.createVNode(Ce,{trigger:["click"],placement},{overlay:vue.withCtx(()=>[vue.createVNode(ye,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(te,(xe,Me)=>vue.createVNode(be,{key:Me,onClick:()=>Te.ruleType=xe.label},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(xe.label),1)]),_:2},1032,["onClick"])),64))]),_:2},1024)]),default:vue.withCtx(()=>[vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[5]||(ge[5]=vue.withModifiers(()=>{},["prevent"])),style:{"padding-left":"20px"}},[vue.createTextVNode(vue.toDisplayString(Te.ruleType)+" ",1),vue.createVNode(vue.unref(DownOutlined$1))])]),_:2},1024)]),_:2},1024),vue.createVNode(ke,{span:12})]),_:2},1024),vue.createVNode(Se,{gutter:[8,8]},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:5},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.selectType,"onUpdate:value":xe=>Te.selectType=xe,options:ne,allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ke,{span:19},{default:vue.withCtx(()=>[Te.selectType=="fix"?(vue.openBlock(),vue.createBlock(pe,{key:0,value:Te.ruleValue,"onUpdate:value":xe=>Te.ruleValue=xe},null,8,["value","onUpdate:value"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$5,[vue.createVNode(De,{value:Te.ruleValue,"onUpdate:value":xe=>Te.ruleValue=xe,options:vue.unref(se),"field-names":{label:"name",value:"id"},allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value","options"])]))]),_:2},1024)]),_:2},1024)],64))),256)),vue.createElementVNode("h3",_hoisted_7$3,[vue.createTextVNode("则执行以下动作 "),vue.createVNode(vue.unref(ArrowRightOutlined$1))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).actionList,(Te,we)=>(vue.openBlock(),vue.createBlock(Se,{gutter:[8,8],style:{"margin-top":"5px","margin-bottom":"5px"}},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:5},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.actionType,"onUpdate:value":xe=>Te.actionType=xe,options:ie,allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ke,{span:19},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.actionField,"onUpdate:value":xe=>Te.actionField=xe,options:vue.unref(se),"field-names":{label:"name",value:"name"},allowClear:"",style:{width:"100%"},mode:"tags"},null,8,["value","onUpdate:value","options"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(Ce,{trigger:["click"],placement},{overlay:vue.withCtx(()=>[vue.createVNode(ye,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(ie,(Te,we)=>vue.createVNode(be,{key:we,onClick:xe=>oe(Te)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Te.label),1)]),_:2},1032,["onClick"])),64))]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[6]||(ge[6]=vue.withModifiers(()=>{},["prevent"]))},[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加动作 ")])]),_:1})])])]),_:1},8,["title","open"])}}}),FormSetting_vue_vue_type_style_index_0_scoped_eecf4360_lang="",FormSetting=_export_sfc(_sfc_main$B,[["__scopeId","data-v-eecf4360"]]),FormSetting$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormSetting},Symbol.toStringTag,{value:"Module"})),_withScopeId$2=H=>(vue.pushScopeId("data-v-9462cb24"),H=H(),vue.popScopeId(),H),_hoisted_1$h=_withScopeId$2(()=>vue.createElementVNode("div",{class:"title"},"业务规则",-1)),_hoisted_2$a=_withScopeId$2(()=>vue.createElementVNode("div",{style:{"padding-bottom":"10px","font-size":"11px"}}," 添加业务规则可以规范化表单数据录入。当满足条件时,显示、隐藏、更改字段属性。 ",-1)),_hoisted_3$8={style:{"padding-top":"10px","font-size":"12px !important"}},_hoisted_4$6=["onClick"],_hoisted_5$5=_withScopeId$2(()=>vue.createElementVNode("span",{style:{"padding-left":"15px"}},"时",-1)),_hoisted_6$4={style:{right:"10px",position:"absolute"}},_hoisted_7$2=["onClick"],_sfc_main$A=vue.defineComponent({__name:"FormSettingIndex",setup(H){const C=useFormStore(),W=vue.ref(""),U=vue.ref(!1);let K=vue.ref({name:"",ruleList:[],actionList:[]}),G=vue.ref(!1);function Q(te){W.value="业务规则",K.value={name:"",ruleList:[],actionList:[]},U.value=!0}function Z(te){W.value="业务规则",K.value=te,G.value=!0,U.value=!0}function X(){U.value=!1}function ee(te){C.formData.config.formSetting.splice(C.formData.config.formSetting.indexOf(te),1)}return(te,ne)=>{const ie=vue.resolveComponent("a-button"),oe=vue.resolveComponent("a-col"),re=vue.resolveComponent("a-row"),se=vue.resolveComponent("a-divider");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[_hoisted_1$h,_hoisted_2$a,vue.createVNode(ie,{onClick:ne[0]||(ne[0]=ae=>Q()),type:"primary",icon:vue.h(vue.unref(PlusOutlined$1)),block:""},{default:vue.withCtx(()=>[vue.createTextVNode(" 添加规则 ")]),_:1},8,["icon"]),vue.createElementVNode("div",_hoisted_3$8,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).formData.config.formSetting,ae=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",{onClick:le=>Z(ae)},[vue.createVNode(re,null,{default:vue.withCtx(()=>[vue.createVNode(oe,{span:"6",style:{"text-align":"right",color:"#9e9e9e"}},{default:vue.withCtx(()=>[vue.createTextVNode("当满足条件")]),_:1}),vue.createVNode(oe,{span:"17",offset:"1"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ae.ruleList,le=>(vue.openBlock(),vue.createElementBlock("span",null,vue.toDisplayString(le.matchType)+"   "+vue.toDisplayString(le.title)+"   "+vue.toDisplayString(le.ruleType)+"   "+vue.toDisplayString(le.ruleValue),1))),256)),_hoisted_5$5]),_:2},1024)]),_:2},1024),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ae.actionList,(le,ce)=>(vue.openBlock(),vue.createBlock(re,null,{default:vue.withCtx(()=>[vue.createVNode(oe,{span:"6",style:{"text-align":"right",color:"#9e9e9e"}},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(le.actionType),1)]),_:2},1024),vue.createVNode(oe,{span:"17",offset:"1"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(le.actionField.join(", ")),1)]),_:2},1024)]),_:2},1024))),256))],8,_hoisted_4$6),vue.createElementVNode("div",_hoisted_6$4,[vue.createElementVNode("a",{onClick:le=>ee(ae)},"删除",8,_hoisted_7$2)]),vue.createVNode(se,{dashed:""})]))),256))]),U.value?(vue.openBlock(),vue.createBlock(FormSetting,{key:0,open:U.value,title:W.value,onOnClose:X,data:vue.unref(K),isedit:vue.unref(G)},null,8,["open","title","data","isedit"])):vue.createCommentVNode("",!0)],64)}}}),FormSettingIndex_vue_vue_type_style_index_0_scoped_9462cb24_lang="",CFormSettingIndex=_export_sfc(_sfc_main$A,[["__scopeId","data-v-9462cb24"]]),FormSettingIndex=Object.freeze(Object.defineProperty({__proto__:null,default:CFormSettingIndex},Symbol.toStringTag,{value:"Module"})),_sfc_main$z=vue.defineComponent({__name:"Tabs",props:{configData:{type:Object,default:{}}},setup(H){function C(){}function W(){}return(U,K)=>{const G=vue.resolveComponent("a-input"),Q=vue.resolveComponent("a-form-item"),Z=vue.resolveComponent("a-radio-button"),X=vue.resolveComponent("a-radio-group"),ee=vue.resolveComponent("a-textarea"),te=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(te,{class:"tabs-properties",layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(Q,{label:"宽度"},{default:vue.withCtx(()=>[vue.createVNode(G,{value:H.configData.width,"onUpdate:value":K[0]||(K[0]=ne=>H.configData.width=ne)},null,8,["value"])]),_:1}),vue.createVNode(Q,{label:"卡片样式"},{default:vue.withCtx(()=>[vue.createVNode(X,{value:H.configData.tabType,"onUpdate:value":K[1]||(K[1]=ne=>H.configData.tabType=ne)},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:"line"},{default:vue.withCtx(()=>[vue.createTextVNode("默认")]),_:1}),vue.createVNode(Z,{value:"card"},{default:vue.withCtx(()=>[vue.createTextVNode("卡片")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode(Q,{label:"子Tab属性"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(VueDraggableNext),{list:H.configData.panes,animation:"300",handle:".ant-input-group-addon",onStart:C,onEnd:W},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.panes,(ne,ie)=>(vue.openBlock(),vue.createBlock(G,{value:ne.title,"onUpdate:value":oe=>ne.title=oe,style:{"margin-bottom":"5px"}},{addonBefore:vue.withCtx(()=>[vue.createVNode(vue.unref(MenuOutlined$1))]),_:2},1032,["value","onUpdate:value"]))),256))]),_:1},8,["list"])]),_:1}),vue.createVNode(Q,{label:"切换面板事件"},{default:vue.withCtx(()=>[vue.createVNode(G,{value:H.configData.changeEvent,"onUpdate:value":K[2]||(K[2]=ne=>H.configData.changeEvent=ne)},null,8,["value"])]),_:1}),vue.createVNode(Q,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(ee,{value:H.configData.extended,"onUpdate:value":K[3]||(K[3]=ne=>H.configData.extended=ne),rows:5},null,8,["value"])]),_:1})]),_:1})}}}),Tabs_vue_vue_type_style_index_0_scoped_8924aeef_lang="",CTabs=_export_sfc(_sfc_main$z,[["__scopeId","data-v-8924aeef"]]),Tabs=Object.freeze(Object.defineProperty({__proto__:null,default:CTabs},Symbol.toStringTag,{value:"Module"})),_sfc_main$y=vue.defineComponent({__name:"Collapse",props:{configData:{type:Object,default:{}}},setup(H){return vue.ref(""),(C,W)=>{const U=vue.resolveComponent("a-input"),K=vue.resolveComponent("a-form-item"),G=vue.resolveComponent("a-select-option"),Q=vue.resolveComponent("a-select"),Z=vue.resolveComponent("a-radio-button"),X=vue.resolveComponent("a-radio-group"),ee=vue.resolveComponent("a-switch"),te=vue.resolveComponent("a-textarea"),ne=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(ne,{class:"collapse-properties",layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(K,{label:"宽度"},{default:vue.withCtx(()=>[vue.createVNode(U,{value:H.configData.width,"onUpdate:value":W[0]||(W[0]=ie=>H.configData.width=ie)},null,8,["value"])]),_:1}),vue.createVNode(K,{label:"标题"},{default:vue.withCtx(()=>[vue.createVNode(U,{value:H.configData.header,"onUpdate:value":W[1]||(W[1]=ie=>H.configData.header=ie)},null,8,["value"])]),_:1}),vue.createVNode(K,{label:"样式"},{default:vue.withCtx(()=>[vue.createVNode(Q,{value:H.configData.classname,"onUpdate:value":W[2]||(W[2]=ie=>H.configData.classname=ie)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)("class"),(ie,oe)=>(vue.openBlock(),vue.createBlock(G,{value:ie.value},{default:vue.withCtx(()=>[vue.createTextVNode(" 样式"+vue.toDisplayString(oe+1),1)]),_:2},1032,["value"]))),256))]),_:1},8,["value"])]),_:1}),vue.createVNode(K,{label:"触发折叠方式"},{default:vue.withCtx(()=>[vue.createVNode(X,{value:H.configData.collapseType,"onUpdate:value":W[3]||(W[3]=ie=>H.configData.collapseType=ie)},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:"row"},{default:vue.withCtx(()=>[vue.createTextVNode("默认")]),_:1}),vue.createVNode(Z,{value:"icon"},{default:vue.withCtx(()=>[vue.createTextVNode("按钮")]),_:1}),vue.createVNode(Z,{value:"header"},{default:vue.withCtx(()=>[vue.createTextVNode("标题")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode(K,{label:"是否默认折叠"},{default:vue.withCtx(()=>[vue.createVNode(ee,{checked:H.configData.defaultCollapse,"onUpdate:checked":W[4]||(W[4]=ie=>H.configData.defaultCollapse=ie)},null,8,["checked"])]),_:1}),vue.createVNode(K,{label:"是否显示箭头"},{default:vue.withCtx(()=>[vue.createVNode(ee,{checked:H.configData.showArrow,"onUpdate:checked":W[5]||(W[5]=ie=>H.configData.showArrow=ie)},null,8,["checked"])]),_:1}),vue.createVNode(K,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(te,{value:H.configData.extended,"onUpdate:value":W[6]||(W[6]=ie=>H.configData.extended=ie),rows:3},null,8,["value"])]),_:1})]),_:1})}}}),Collapse=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$y},Symbol.toStringTag,{value:"Module"})),extendProperties$1=[{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:3}],headerProperties$1=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"样式",bind:"classname",type:"dic",placeholder:"",code:"class"},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]},{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:"5"}],labelProperties=[{title:"标题",bind:"name",type:"textarea",placeholder:"",rows:3,required:!0},{title:"是否必填",bind:"required",type:"switch",placeholder:""},{title:"大小",bind:"font",type:"inputnumber",placeholder:"",min:10,max:80},{title:"颜色",bind:"color",type:"input",placeholder:""},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]},{title:"样式扩展",bind:"cssextended",type:"textarea",placeholder:"",rows:3},...extendProperties$1],titleProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0}],baseProperties$1=[{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"默认值",bind:"defaultValue",type:"input",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"}],selectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!0},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"字典选项",bind:"dictType",type:"dicall",placeholder:""},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],btnProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!1},{title:"图标",bind:"beforeIcon",type:"iconselect",placeholder:""},{title:"按钮类型",bind:"buttonType",type:"buttonType",placeholder:""},...baseProperties$1,...extendProperties$1],radioProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"选项",bind:"defaultValue",type:"radio",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"操作属性",type:"czsx",options:["隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],checkProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"选项",bind:"defaultValue",type:"checkbox",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"操作属性",type:"czsx",options:["隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],inputProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏","去边框"]},{title:"前缀",bind:"prefix",type:"input",placeholder:""},{title:"后缀",bind:"suffix",type:"input",placeholder:""},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],textareaProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"行数",bind:"rows",type:"inputnumber",placeholder:"",min:1,max:10},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],inputNumberProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"最小值",bind:"min",type:"inputNumberConfig",placeholder:""},{title:"最大值",bind:"max",type:"inputNumberConfig",placeholder:""},{title:"前缀",bind:"addonBefore",type:"input",placeholder:""},{title:"后缀",bind:"addonAfter",type:"input",placeholder:""},{title:"步长",bind:"step",type:"inputnumber",min:0,max:"Infinity",placeholder:""},{title:"精度",bind:"precision",type:"inputnumber",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],treeSelectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!1},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"数据来源",bind:"treedic",type:"treedic",placeholder:"",required:!0},{title:"多选标点",bind:"punctuation",type:"input",placeholder:"可填写变量名或者字符串,默认逗号"},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],cascaderProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"数据来源",bind:"casdic",type:"casdic",placeholder:"",required:!0},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur"]}],tableSelectProperties=[...titleProperties,{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!1},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"下拉表格宽度",bind:"dropMenuWidth",type:"input",placeholder:""},{title:"下拉表格高度",bind:"dropMenuHeight",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"数据来源",bind:"tableSource",type:"input",placeholder:"",required:!0},{title:"选中字段绑定(唯一)",bind:"tableKeyName",type:"input",placeholder:"",required:!0},{title:"显示字段绑定",bind:"tableLabelName",type:"input",placeholder:"",required:!0},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur","rowChange"]},...extendProperties$1],imageProperties=[...titleProperties,{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"静态地址",bind:"static",type:"input",placeholder:""},{title:"图片宽度",bind:"width",type:"input",placeholder:""},{title:"图片高度",bind:"height",type:"input",placeholder:""},...extendProperties$1],dateProperties=[...titleProperties,{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"类型",bind:"dateType",type:"select",placeholder:"",options:[{label:"年份",value:"year"},{label:"月份",value:"month"},{label:"日期",value:"date"}]},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],childFormProperties=[{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"页面地址",bind:"filePath",type:"input",placeholder:"",required:!0},...extendProperties$1],baseProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"数据绑定",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"查询模式",bind:"searchType",type:"searchType",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"默认值",bind:"defaultValue",type:"input",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""}],extendProperties=[{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:3}],rinputProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},{title:"前缀",bind:"prefix",type:"input",placeholder:""},{title:"后缀",bind:"suffix",type:"input",placeholder:""},...extendProperties],rtextareaProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},{title:"行数",bind:"rows",type:"inputnumber",placeholder:"",min:1,max:10},...extendProperties],rselectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"数据绑定",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"查询模式",bind:"searchType",type:"searchType",placeholder:"",required:!0},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"字典选项",bind:"dictType",type:"dicall",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},...extendProperties],cdateProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},...extendProperties],cbtnProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"图标",bind:"beforeIcon",type:"iconselect",placeholder:""},{title:"按钮类型",bind:"buttonType",type:"buttonType",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""},...extendProperties],headerProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"样式",bind:"classname",type:"dic",placeholder:"",code:"class"},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]}],_withScopeId$1=H=>(vue.pushScopeId("data-v-71c699a3"),H=H(),vue.popScopeId(),H),_hoisted_1$g={key:6,class:"radio-properties"},_hoisted_2$9={key:7,class:"radio-properties"},_hoisted_3$7={key:8},_hoisted_4$5={key:9},_hoisted_5$4={key:10},_hoisted_6$3={key:14},_hoisted_7$1=_withScopeId$1(()=>vue.createElementVNode("span",{style:{color:"#1890ff"}},"必填",-1)),_hoisted_8$1={key:0,style:{"margin-top":"5px"}},_hoisted_9$1=_withScopeId$1(()=>vue.createElementVNode("span",{style:{color:"#1890ff"}},"高级",-1)),_hoisted_10$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_11$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_12$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_13$1={key:15},_hoisted_14$1={key:16},_hoisted_15$1={class:"icon-select-modal"},_hoisted_16$1=["onClick"],_hoisted_17$1={key:19,style:{display:"flex","align-items":"center"}},_hoisted_18={key:20},_hoisted_19=_withScopeId$1(()=>vue.createElementVNode("span",null,"只针对默认生成方法中扩展事件",-1)),_sfc_main$x=vue.defineComponent({__name:"Properties",props:{configData:{type:Object,default:{}}},setup(H){const C=useUserStore(),W=useDataStore(),U=vue.computed(()=>Object.keys(Object.assign({"/src/assets/svg/arrow.svg":()=>Promise.resolve().then(()=>arrow$1),"/src/assets/svg/btn.svg":()=>Promise.resolve().then(()=>btn$1),"/src/assets/svg/cascader.svg":()=>Promise.resolve().then(()=>cascader$1),"/src/assets/svg/checkbox.svg":()=>Promise.resolve().then(()=>checkbox$1),"/src/assets/svg/clear.svg":()=>Promise.resolve().then(()=>clear$1),"/src/assets/svg/code.svg":()=>Promise.resolve().then(()=>code$1),"/src/assets/svg/collapse.svg":()=>Promise.resolve().then(()=>collapse$1),"/src/assets/svg/date.svg":()=>Promise.resolve().then(()=>date$1),"/src/assets/svg/empty.svg":()=>Promise.resolve().then(()=>empty$1),"/src/assets/svg/formvue.svg":()=>Promise.resolve().then(()=>formvue$1),"/src/assets/svg/fx.svg":()=>Promise.resolve().then(()=>fx$1),"/src/assets/svg/grid.svg":()=>Promise.resolve().then(()=>grid$1),"/src/assets/svg/header.svg":()=>Promise.resolve().then(()=>header$1),"/src/assets/svg/image.svg":()=>Promise.resolve().then(()=>image$1),"/src/assets/svg/ing.svg":()=>Promise.resolve().then(()=>ing$1),"/src/assets/svg/input.svg":()=>Promise.resolve().then(()=>input$1),"/src/assets/svg/inputnumber.svg":()=>Promise.resolve().then(()=>inputnumber$1),"/src/assets/svg/json.svg":()=>Promise.resolve().then(()=>json$1),"/src/assets/svg/label.svg":()=>Promise.resolve().then(()=>label$1),"/src/assets/svg/placeholder.svg":()=>Promise.resolve().then(()=>placeholder$1),"/src/assets/svg/preview.svg":()=>Promise.resolve().then(()=>preview$1),"/src/assets/svg/radio.svg":()=>Promise.resolve().then(()=>radio$1),"/src/assets/svg/report.svg":()=>Promise.resolve().then(()=>report$1),"/src/assets/svg/save.svg":()=>Promise.resolve().then(()=>save$1),"/src/assets/svg/select.svg":()=>Promise.resolve().then(()=>select$1),"/src/assets/svg/table.svg":()=>Promise.resolve().then(()=>table$1),"/src/assets/svg/tableselect.svg":()=>Promise.resolve().then(()=>tableselect$1),"/src/assets/svg/tabs.svg":()=>Promise.resolve().then(()=>tabs$1),"/src/assets/svg/textarea.svg":()=>Promise.resolve().then(()=>textarea$1),"/src/assets/svg/tree.svg":()=>Promise.resolve().then(()=>tree$1),"/src/assets/svg/xx.svg":()=>Promise.resolve().then(()=>xx$1)})).map(me=>{let ve=me.split("/");return ve[ve.length-1].split(".")[0]}));let K=vue.ref(""),G=vue.computed(()=>W.getSelectData.filter(pe=>pe.isList==0)),Q=vue.computed(()=>W.getUpdateData.filter(pe=>pe.isList==0)),Z=vue.ref(!1);const X=H;function ee(){const pe=X.configData.model;Q.value.filter(ve=>ve.value.indexOf(pe)!==-1).length>0&&(X.configData.writeField=[pe])}function te(pe){let me=X.configData.options.indexOf(pe);me!==-1&&X.configData.options.splice(me,1)}vue.ref(!1);let ne=vue.ref([]),ie=X.configData.type;if(X.configData.compType=="report")switch(ie){case"input":ne.value=rinputProperties;break;case"textarea":ne.value=rtextareaProperties;break;case"select":ne.value=rselectProperties;break;case"datepicker":case"rangepicker":ne.value=cdateProperties;break;case"button":ne.value=cbtnProperties;break}else switch(ie){case"label":ne.value=labelProperties;break;case"header":ne.value=headerProperties$1;break;case"button":ne.value=btnProperties;break;case"select":ne.value=selectProperties;break;case"treeselect":ne.value=treeSelectProperties;break;case"radio":ne.value=radioProperties;break;case"checkbox":ne.value=checkProperties;break;case"input":ne.value=inputProperties;break;case"inputnumber":ne.value=inputNumberProperties;break;case"textarea":ne.value=textareaProperties;break;case"datepicker":case"rangepicker":ne.value=dateProperties;break;case"cascader":ne.value=cascaderProperties;break;case"tableselect":ne.value=tableSelectProperties;break;case"childform":ne.value=childFormProperties;break;case"image":ne.value=imageProperties;break;default:ne.value=[...titleProperties,...baseProperties$1,...extendProperties$1];break}let re=vue.ref("");vue.ref(""),vue.ref("");function se(pe){re.value=pe}vue.ref(X.configData.rules);function ae(pe,me){X.configData.rules.push({type:pe,message:"必须填写此项",ruleType:X.configData.ruleType})}function le(pe){pe.target.checked&&(X.configData.ruleType==null?X.configData.ruleType="data":X.configData.ruleType)}let ce=vue.reactive({type:null,required:null});vue.watch(()=>X.configData.dataTypeCheck,(pe,me)=>{pe||(ce.type=null,X.configData.dataType=null),de()}),vue.watch(()=>X.configData.dataTypeMessage,(pe,me)=>{ce.type={type:X.configData.dataType,message:pe,ruleType:X.configData.ruleType},de()}),vue.watch(()=>X.configData.dataType,(pe,me)=>{pe?ce.type={type:pe,message:X.configData.dataTypeMessage,ruleType:X.configData.ruleType}:ce.type=null,de()}),vue.watch(()=>X.configData.ruleType,(pe,me)=>{ce.type=null,X.configData.dataType=null,de()}),vue.watch(()=>X.configData.required,(pe,me)=>{pe?ce.required={type:"required",message:"不能为空"}:ce.required=null,de()});function de(){X.configData.rules=[],Object.keys(ce).forEach(pe=>{ce[pe]&&X.configData.rules.push(ce[pe])})}function ue(){X.configData.options.push({label:"新选项",value:"新选项"})}function he(pe,me){X.configData.options[me].label=pe.value}function fe(pe){K.value=pe,Z.value=!0}function ge(){let pe=ne.value.find(me=>me.type=="iconselect");pe&&X.configData&&X.configData[pe.bind]!==void 0&&(X.configData[pe.bind]=K.value),Z.value=!1}return(pe,me)=>{const ve=vue.resolveComponent("a-input"),be=vue.resolveComponent("a-textarea"),ye=vue.resolveComponent("a-input-number"),Ce=vue.resolveComponent("a-radio-button"),ke=vue.resolveComponent("a-radio-group"),Se=vue.resolveComponent("a-switch"),De=vue.resolveComponent("a-select"),Ne=vue.resolveComponent("a-radio"),Ie=vue.resolveComponent("a-form-item"),Ee=vue.resolveComponent("a-select-option"),Te=vue.resolveComponent("a-checkbox"),we=vue.resolveComponent("a-checkbox-group"),xe=vue.resolveComponent("svg-icon"),Me=vue.resolveComponent("a-modal"),Le=vue.resolveComponent("a-divider"),We=vue.resolveComponent("a-tooltip"),ze=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(ze,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(ne),($e,je)=>(vue.openBlock(),vue.createBlock(Ie,{label:$e.title,rules:[{required:$e.required}]},{default:vue.withCtx(()=>[$e.type=="input"?(vue.openBlock(),vue.createBlock(ve,{key:0,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,placeholder:$e.placeholder},null,8,["value","onUpdate:value","placeholder"])):$e.type=="textarea"?(vue.openBlock(),vue.createBlock(be,{key:1,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,placeholder:"",rows:$e.rows},null,8,["value","onUpdate:value","rows"])):$e.type=="inputnumber"?(vue.openBlock(),vue.createBlock(ye,{key:2,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,min:$e.min,max:$e.max},null,8,["value","onUpdate:value","min","max"])):$e.type=="radiogroup"?(vue.openBlock(),vue.createBlock(ke,{key:3,value:H.configData.align,"onUpdate:value":me[0]||(me[0]=Ae=>H.configData.align=Ae)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($e.children,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ce,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.title),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value"])):$e.type=="switch"?(vue.openBlock(),vue.createBlock(Se,{key:4,checked:H.configData[$e.bind],"onUpdate:checked":Ae=>H.configData[$e.bind]=Ae},null,8,["checked","onUpdate:checked"])):$e.type=="select"?(vue.openBlock(),vue.createBlock(De,{key:5,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"",options:$e.options},null,8,["value","onUpdate:value","options"])):$e.type=="radio"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.createVNode(ke,{value:H.configData.optionsType,"onUpdate:value":me[1]||(me[1]=Ae=>H.configData.optionsType=Ae),onChange:Ae=>H.configData[$e.bind]="","button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"static"},{default:vue.withCtx(()=>[vue.createTextVNode("静态数据")]),_:1}),vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1})]),_:2},1032,["value","onChange"]),H.configData.optionsType=="static"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(ke,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.options,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ne,{value:Ae.value,style:{"padding-bottom":"8px"}},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:Ae.value,"onUpdate:value":Ve=>Ae.value=Ve,placeholder:"选项名称",style:{width:"60%"},onChange:Ve=>he(Ae,Pe)},null,8,["value","onUpdate:value","onChange"]),vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:Ve=>te(Ae),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4","padding-left":"10px"}},null,8,["onClick"])]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"]),vue.createElementVNode("a",{style:{"margin-bottom":"10px",display:"block"},onClick:ue},"添加选项"),vue.createVNode(Ie,{style:{"margin-bottom":"0"},label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},null,8,["value","onUpdate:value"])]),_:2},1024)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[2]||(me[2]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.createVNode(Ie,{label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(H.configData.dic),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])]),_:2},1024)],64))])):$e.type=="checkbox"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$9,[vue.createVNode(ke,{value:H.configData.optionsType,"onUpdate:value":me[3]||(me[3]=Ae=>H.configData.optionsType=Ae),onChange:Ae=>H.configData[$e.bind]=void 0,"button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"static"},{default:vue.withCtx(()=>[vue.createTextVNode("静态数据")]),_:1}),vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1})]),_:2},1032,["value","onChange"]),H.configData.optionsType=="static"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(we,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.options,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Te,{value:Ae.value,style:{"padding-bottom":"8px"}},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:Ae.value,"onUpdate:value":Ve=>Ae.value=Ve,placeholder:"选项名称",style:{width:"60%"},onChange:Ve=>he(Ae,Pe)},null,8,["value","onUpdate:value","onChange"]),vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:Ve=>te(Ae),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4","padding-left":"10px"}},null,8,["onClick"])]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"]),vue.createElementVNode("a",{onClick:ue},"添加选项")],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[4]||(me[4]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.createVNode(Ie,{label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,mode:"multiple","allow-clear":""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(H.configData.dic),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])]),_:2},1024)],64))])):$e.type=="dicall"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$7,[vue.createVNode(ke,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,onChange:me[5]||(me[5]=Ae=>H.configData.dic=""),"button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1}),vue.createVNode(Ce,{value:"dynamic"},{default:vue.withCtx(()=>[vue.createTextVNode("动态字典")]),_:1})]),_:2},1032,["value","onUpdate:value"]),H.configData[$e.bind]=="dynamic"?(vue.openBlock(),vue.createBlock(De,{key:0,"show-search":"","allow-clear":"",value:H.configData.dic,"onUpdate:value":me[6]||(me[6]=Ae=>H.configData.dic=Ae),options:vue.unref(W).getSelectData},null,8,["value","options"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[7]||(me[7]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.unref(re)!=""?(vue.openBlock(),vue.createBlock(Ie,{key:0,label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{checked:H.configData[$e.bind],"onUpdate:checked":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(vue.unref(re)),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["checked","onUpdate:checked"])]),_:2},1024)):vue.createCommentVNode("",!0)],64))])):$e.type=="treedic"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$5,[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"","show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllCategory,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label,value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["label","value"]))),256))]),_:2},1032,["value","onUpdate:value"])])):$e.type=="casdic"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$4,[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"","show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(casDicts),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label,value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["label","value"]))),256))]),_:2},1032,["value","onUpdate:value"])])):$e.type=="dic"?(vue.openBlock(),vue.createBlock(De,{key:11,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)($e.code),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])):$e.type=="dataselect"||$e.type=="syncupdate"?(vue.openBlock(),vue.createBlock(De,{key:12,"show-search":"",allowClear:"",mode:$e.mode,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,options:vue.unref(G),onChange:ee},null,8,["mode","value","onUpdate:value","options"])):$e.type=="dataupdate"?(vue.openBlock(),vue.createBlock(De,{key:13,mode:$e.mode,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,options:vue.unref(Q)},null,8,["mode","value","onUpdate:value","options"])):$e.type=="guize"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$3,[vue.createVNode(Te,{checked:H.configData.required,"onUpdate:checked":me[8]||(me[8]=Ae=>H.configData.required=Ae)},{default:vue.withCtx(()=>[_hoisted_7$1]),_:1},8,["checked"]),$e.mode=="pro"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$1,[vue.createVNode(Te,{checked:H.configData.dataTypeCheck,"onUpdate:checked":me[9]||(me[9]=Ae=>H.configData.dataTypeCheck=Ae),onChange:le},{default:vue.withCtx(()=>[_hoisted_9$1]),_:1},8,["checked"]),_hoisted_10$1,H.configData.dataTypeCheck?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(ke,{value:H.configData.ruleType,"onUpdate:value":me[10]||(me[10]=Ae=>H.configData.ruleType=Ae),"button-style":"solid",style:{margin:"5px 0 10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("校验规则")]),_:1}),vue.createVNode(Ce,{value:"dynamic"},{default:vue.withCtx(()=>[vue.createTextVNode("动态规则")]),_:1}),vue.createVNode(Ce,{value:"custom"},{default:vue.withCtx(()=>[vue.createTextVNode("变量输入")]),_:1})]),_:1},8,["value"]),H.configData.ruleType=="data"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(De,{value:H.configData.dataType,"onUpdate:value":me[11]||(me[11]=Ae=>H.configData.dataType=Ae),onChange:ae,"allow-clear":"",style:{width:"100%"},placeholder:"请选择",disabled:!H.configData.dataTypeCheck},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getValidateRuleList,Ae=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.ruleCode},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.ruleName),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","disabled"]),_hoisted_11$1,_hoisted_12$1],64)):H.configData.ruleType=="dynamic"?(vue.openBlock(),vue.createBlock(De,{key:1,"show-search":"","allow-clear":"",value:H.configData.dataType,"onUpdate:value":me[12]||(me[12]=Ae=>H.configData.dataType=Ae),options:vue.unref(W).getSelectData,onChange:ae},null,8,["value","options"])):(vue.openBlock(),vue.createBlock(ve,{key:2,value:H.configData.dataType,"onUpdate:value":me[13]||(me[13]=Ae=>H.configData.dataType=Ae)},null,8,["value"]))],64)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)])):$e.type=="czsx"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$1,[$e.options.includes("只读")?(vue.openBlock(),vue.createBlock(Te,{key:0,checked:H.configData.disabled,"onUpdate:checked":me[14]||(me[14]=Ae=>H.configData.disabled=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("只读")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("清除")?(vue.openBlock(),vue.createBlock(Te,{key:1,checked:H.configData.clearable,"onUpdate:checked":me[15]||(me[15]=Ae=>H.configData.clearable=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("清除")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("隐藏")?(vue.openBlock(),vue.createBlock(Te,{key:2,checked:H.configData.hidden,"onUpdate:checked":me[16]||(me[16]=Ae=>H.configData.hidden=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("隐藏")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("去边框")?(vue.openBlock(),vue.createBlock(Te,{key:3,checked:H.configData.bordered,"onUpdate:checked":me[17]||(me[17]=Ae=>H.configData.bordered=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("去边框")]),_:1},8,["checked"])):vue.createCommentVNode("",!0)])):$e.type=="iconselect"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$1,[vue.createVNode(ve,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,allowClear:"",readOnly:"",class:"icon-select"},{addonAfter:vue.withCtx(()=>[vue.createVNode(vue.unref(SettingOutlined$1),{onClick:Ae=>fe(H.configData[$e.bind])},null,8,["onClick"])]),_:2},1032,["value","onUpdate:value"]),vue.createVNode(Me,{open:vue.unref(Z),"onUpdate:open":me[18]||(me[18]=Ae=>vue.isRef(Z)?Z.value=Ae:Z=Ae),title:"图标选择",onOk:ge},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_15$1,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(U.value,(Ae,Pe)=>(vue.openBlock(),vue.createElementBlock("div",{onClick:Ve=>vue.isRef(K)?K.value=Ae:K=Ae,class:vue.normalizeClass(["icon-item",vue.unref(K)==Ae?"active":""])},[vue.createVNode(xe,{name:Ae,width:"20",height:"20",color:"rgba(0,0,0,0.85)"},null,8,["name"])],10,_hoisted_16$1))),256))])]),_:1},8,["open"])])):$e.type=="buttonType"?(vue.openBlock(),vue.createBlock(De,{key:17,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[vue.createVNode(Ee,{value:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("主按钮")]),_:1}),vue.createVNode(Ee,{value:"default"},{default:vue.withCtx(()=>[vue.createTextVNode("默认按钮")]),_:1}),vue.createVNode(Ee,{value:"dashed"},{default:vue.withCtx(()=>[vue.createTextVNode("虚线按钮")]),_:1}),vue.createVNode(Ee,{value:"link"},{default:vue.withCtx(()=>[vue.createTextVNode("链接按钮")]),_:1})]),_:2},1032,["value","onUpdate:value"])):$e.type=="searchType"?(vue.openBlock(),vue.createBlock(De,{key:18,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[vue.createVNode(Ee,{value:"eq"},{default:vue.withCtx(()=>[vue.createTextVNode("精确查询")]),_:1}),vue.createVNode(Ee,{value:"like"},{default:vue.withCtx(()=>[vue.createTextVNode("模糊匹配")]),_:1}),vue.createVNode(Ee,{value:"between"},{default:vue.withCtx(()=>[vue.createTextVNode("区间查询")]),_:1})]),_:2},1032,["value","onUpdate:value"])):$e.type=="inputNumberConfig"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_17$1,[vue.createVNode(ye,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,disabled:H.configData[$e.bind+"Check"]},null,8,["value","onUpdate:value","disabled"]),vue.createVNode(Le,{type:"vertical"}),vue.createVNode(Te,{checked:H.configData[$e.bind+"Check"],"onUpdate:checked":Ae=>H.configData[$e.bind+"Check"]=Ae},{default:vue.withCtx(()=>[vue.createTextVNode("不限")]),_:2},1032,["checked","onUpdate:checked"])])):$e.type=="eventextended"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_18,[vue.createVNode(We,null,{title:vue.withCtx(()=>[_hoisted_19]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(ExclamationCircleOutlined$1),{style:{position:"absolute",top:"-25px",left:"55px"}})]),_:1}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($e.options,Ae=>(vue.openBlock(),vue.createBlock(ve,{"addon-before":Ae,value:H.configData[Ae+"Event"],"onUpdate:value":Pe=>H.configData[Ae+"Event"]=Pe,style:{"margin-bottom":"5px"}},null,8,["addon-before","value","onUpdate:value"]))),256))])):vue.createCommentVNode("",!0)]),_:2},1032,["label","rules"]))),256))]),_:1})}}}),Properties_vue_vue_type_style_index_0_scoped_71c699a3_lang="",CProperties=_export_sfc(_sfc_main$x,[["__scopeId","data-v-71c699a3"]]),Properties=Object.freeze(Object.defineProperty({__proto__:null,default:CProperties},Symbol.toStringTag,{value:"Module"})),_sfc_main$w=vue.defineComponent({__name:"FX",props:{configData:{type:Object,default:{}}},setup(H){const C=useDataStore(),W=useFormStore();let U=vue.computed(()=>C.getUpdateData.filter(ee=>ee.isList==0)),K=vue.ref("求和");const G=[{value:"sum",label:"求和"},{value:"avg",label:"平均值"}];let Q=vue.computed(()=>{let ee=[];return W.getFormDesignConfig.list.forEach(te=>{te.type=="inputnumber"?Z(ee,te):te.type=="grid"&&te.columns.forEach(ne=>{ne.list.forEach(ie=>{ie.type=="inputnumber"&&Z(ee,ie)})})}),ee});function Z(ee,te){ee.push({value:te.model,label:te.name})}function X(ee,te){K.value=te.label}return(ee,te)=>{const ne=vue.resolveComponent("a-input"),ie=vue.resolveComponent("a-form-item"),oe=vue.resolveComponent("a-select"),re=vue.resolveComponent("a-switch"),se=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(se,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(ie,{label:"标题"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.name,"onUpdate:value":te[0]||(te[0]=ae=>H.configData.name=ae),placeholder:"请输入标题"},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:"绑定更新",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{value:H.configData.writeField,"onUpdate:value":te[1]||(te[1]=ae=>H.configData.writeField=ae),options:vue.unref(U)},null,8,["value","options"])]),_:1}),vue.createVNode(ie,{label:"显示边框",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(re,{checked:H.configData.bordered,"onUpdate:checked":te[2]||(te[2]=ae=>H.configData.bordered=ae),"checked-children":"是","un-checked-children":"否"},null,8,["checked"])]),_:1}),vue.createVNode(ie,{label:"计算方式",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{value:H.configData.account,"onUpdate:value":te[3]||(te[3]=ae=>H.configData.account=ae),options:G,onChange:X},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:vue.unref(K),rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{mode:"tags",value:H.configData.accountField,"onUpdate:value":te[4]||(te[4]=ae=>H.configData.accountField=ae),options:vue.unref(Q),style:{height:"auto"}},null,8,["value","options"])]),_:1},8,["label"]),vue.createVNode(ie,{label:"前缀"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.prefix,"onUpdate:value":te[5]||(te[5]=ae=>H.configData.prefix=ae)},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:"后缀"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.suffix,"onUpdate:value":te[6]||(te[6]=ae=>H.configData.suffix=ae)},null,8,["value"])]),_:1})]),_:1})}}}),FX=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$w},Symbol.toStringTag,{value:"Module"})),_hoisted_1$f={key:0},_sfc_main$v=vue.defineComponent({__name:"index",props:{configData:{type:Object,default:[]}},setup(H){let C=vue.ref("1");const W=H;return(U,K)=>{const G=vue.resolveComponent("a-button"),Q=vue.resolveComponent("a-tab-pane"),Z=vue.resolveComponent("a-tabs");return vue.openBlock(),vue.createBlock(Z,{activeKey:vue.unref(C),"onUpdate:activeKey":K[0]||(K[0]=X=>vue.isRef(C)?C.value=X:C=X),style:{height:"100%","overflow-y":"auto"}},{default:vue.withCtx(()=>[vue.createVNode(Q,{key:"1",tab:"字段属性"},{default:vue.withCtx(()=>[W.configData.length!=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$f,[vue.createVNode(G,{class:"btn-type-css",size:"small"},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(CheckCircleTwoTone$1),{"two-tone-color":"#1890ff"})]),default:vue.withCtx(()=>[vue.createTextVNode(" "+vue.toDisplayString(H.configData.type),1)]),_:1}),H.configData.type=="grid"?(vue.openBlock(),vue.createBlock(CGrid,{key:0,configData:H.configData},null,8,["configData"])):H.configData.type=="table"?(vue.openBlock(),vue.createBlock(_sfc_main$G,{key:1,configData:H.configData},null,8,["configData"])):H.configData.type=="col"?(vue.openBlock(),vue.createBlock(_sfc_main$J,{key:2,configData:H.configData},null,8,["configData"])):H.configData.type=="tabs"?(vue.openBlock(),vue.createBlock(CTabs,{key:3,configData:H.configData},null,8,["configData"])):H.configData.type=="collapse"?(vue.openBlock(),vue.createBlock(_sfc_main$y,{key:4,configData:H.configData},null,8,["configData"])):H.configData.type=="fx"?(vue.openBlock(),vue.createBlock(_sfc_main$w,{key:5,configData:H.configData},null,8,["configData"])):(vue.openBlock(),vue.createBlock(CProperties,{configData:H.configData,key:H.configData.type},null,8,["configData"]))])):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(Q,{key:"2",tab:"表单属性","force-render":""},{default:vue.withCtx(()=>[vue.createVNode(CForm)]),_:1}),vue.createVNode(Q,{key:"3",tab:"表单设置","force-render":""},{default:vue.withCtx(()=>[vue.createVNode(CFormSettingIndex)]),_:1})]),_:1},8,["activeKey"])}}}),index_vue_vue_type_style_index_0_scoped_9cd4495a_lang="",formConfig$1=_export_sfc(_sfc_main$v,[["__scopeId","data-v-9cd4495a"]]),index$8=Object.freeze(Object.defineProperty({__proto__:null,default:formConfig$1},Symbol.toStringTag,{value:"Module"})),_hoisted_1$e={class:"container"},_sfc_main$u=vue.defineComponent({__name:"Code",props:{code:{type:String,default:""},language:{type:String,default:""}},setup(H){const C=H,W=useFormStore();let U=vue.ref("");return vue.onMounted(()=>{C.code!=null?U.value=C.code:U.value=JSON.stringify([W.formData],null," ")}),(K,G)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,[vue.createVNode(monacoEditor,{modelValue:vue.unref(U),"onUpdate:modelValue":G[0]||(G[0]=Q=>vue.isRef(U)?U.value=Q:U=Q),language:H.language,height:"500px"},null,8,["modelValue","language"])]))}}),Code=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$u},Symbol.toStringTag,{value:"Module"})),tableSelectProps={value:{type:[String,Number,Array]},mode:{type:String,default:""},keyName:{type:String,default:"name"}};function validateRequired(H){let C="不能为空";if(H!==void 0){if(typeof H=="string"){if(H.match(/^\s*$/))return C}else if(Array.isArray(H))return H.filter(U=>{if(U){if(typeof U=="string"&&U.trim())return U;if(typeof U=="object")return U}}).length?"":C;return""}else return C}function validateReg(H,C,W){let U,K=!0;switch(H){case"number":U=/^-?\d+(\.?\d+|\d?)$/;break;case"email":U=/^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/;break;case"lxdh":U=/^1(3|4|5|7|8)\d{9}$|^(0\d{2}-\d{8}(-\d{1,4})?)|(0\d{3}-\d{7,8}(-\d{1,4})?)$/;break}return U&&!W.match(U)&&(K=!1),K?"":C}let validateInfos=vue.reactive({});async function getData(H,C){C.value=!1;const W="/imaginform/zrzy-form/generate/select";await defHttp.post({url:W,data:{formId:64,param:{code:"liulu"}}},{withToken:!1}).then(U=>{U.result!="{}"&&(H.value=JSON.parse(U.result)),C.value=!0})}function onSubmitForm(H,C){let W,U=H.querySelectorAll("[write-field]");console.log("formDom",U);for(let K=0;K<U.length;K++)validateFun(U[K]);if(C&&C(),W=isValidateSuccess(),W){console.log("校验成功");let K={};return K=getUpdateData(U),K}else return!1}function getUpdateData(H){let C={};for(let W=0;W<H.length;W++){let U=getDomValue(H[W]);const G=getDomAttribute(H[W],"write-field").split(";");for(let Q=0;Q<G.length;Q++){const Z=G[Q].split("."),X=Z[0];C[X]=C[X]?C[X]:{},C[X][Z[1]]=U}}return C}function getDomValue(H,C,W){let U;if(W)U=W;else if(C)U=H.target.value;else{let K=H.classList;if(K.contains("ant-select"))U=H.__vueParentComponent.parent.props.value;else if(K.contains("ant-checkbox-group")||K.contains("ant-radio-group"))U=H.__vueParentComponent.props.value;else if(K.contains("ant-picker-range-custom")){let G=Array.from(H.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker-range"));U=Array.from(G.childNodes).filter(Z=>Z.classList&&Z.classList.contains("ant-picker-input")).map(Z=>Z.childNodes[0].value)}else if(K.contains("ant-picker-custom")){let G=Array.from(H.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker"));U=Array.from(G.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker-input")).childNodes[0].value}else U=H.value}return U}function getDomAttribute(H,C,W){let U;if(W){let K=H.target.classList,G=H.target.parentNode.classList;K.contains("ant-select-selection-search-input")||G.contains("ant-picker-input")?U=H.target.parentNode.parentNode.parentNode.__vnode.props[C]:U=H.target.__vnode.props[C]}else U=H.target?H.target.__vnode.props[C]:H.__vnode.props[C];return U}function validateFun(H,C,W){let U=getDomValue(H,C,W),K=getDomAttribute(H,"rules",C),G=getDomAttribute(H,"write-field",C),Q="";if(K&&G){for(let Z=0;Z<K.length;Z++)K[Z].type=="required"&&(Q+=validateRequired(U,K[Z].msg)),Q.length==0&&(Q+=validateReg(K[Z].type,K[Z].msg,U));validateInfos[G]||(validateInfos[G]={}),Q.length>0?(validateInfos[G].validateStatus="error",validateInfos[G].help=Q):(validateInfos[G].validateStatus="validating",validateInfos[G].help="")}}function isValidateSuccess(){let H=!0;for(const C in validateInfos)if(validateInfos[C].validateStatus=="error"){H=!1;break}return H}const syncChange=(H,C,W,U)=>{var K=U.split("."),G=W.split(".");C[G[0]][G[1]]=H.label,C[K[0]][K[1]]=H.value};function onTableSelectClear(H,C){let W=C.split(".");H[W[0]][W[1]]=""}function onTableSelectRowChange(H,C,W,U,K,G){let Q=W.split("."),Z=H.map(X=>X[U]);if(C[Q[0]][Q[1]]=Z?Z.join(","):void 0,K&&G){let X=K.split("."),ee=H.map(te=>te[G]);C[X[0]][X[1]]=ee?ee.join(","):void 0}}const getSelectAllCheck=(H,C)=>{let W=C?C.map(K=>K.value):[],U=H?H.includes(",")?H.split(","):[H]:[];return U.length==W.length&&U.length!==0&&W.length!==0},setSelectAllCheck=(H,C,W,U)=>{let K=H.target.checked,G=W?W.split("."):null;if(G){let Q=U?U.map(Z=>Z.value):[];C[G[0]][G[1]]=K?Q.join(","):null}};function getAccount(H,C,W){let U=0;switch(H){case"sum":U=sum(C,W);break;case"avg":U=sum(C,W)/C.split(",").length;break}return U}function sum(H,C){let W=0;if(H.indexOf(",")>-1){let U=H.split(",");for(let K=0;K<U.length;K++){let G=U[K].split("."),Q=C[G[0]][G[1]];Q==null&&(Q=0),W+=Q}}return W}function hideField(H,C,W){let U=!1;const K=H[W].ruleList[0],{field:G,selectType:Q,ruleValue:Z}=K,X=G.split(".");let ee=Z;if(Q=="field"){const te=Z.split(".");ee=C.value[te[0]][te[1]]}if(C.value!=null){const te=C.value[X[0]];te!=null&&te[X[1]]!=null&&(U=te[X[1]]===ee)}return U}const locale$2={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},CalendarLocale=locale$2,locale$1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},TimePicker=locale$1,locale={lang:_extends$1({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},CalendarLocale),timePickerLocale:_extends$1({},TimePicker)};locale.lang.ok="确定";const DatePicker=locale,typeTemplate="${label}不是一个有效的${type}",localeValues={locale:"zh-cn",Pagination:Pagination$2,DatePicker,TimePicker,Calendar:DatePicker,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:typeTemplate,method:typeTemplate,array:typeTemplate,object:typeTemplate,number:typeTemplate,date:typeTemplate,boolean:typeTemplate,integer:typeTemplate,float:typeTemplate,regexp:typeTemplate,email:typeTemplate,url:typeTemplate,hex:typeTemplate},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}},zhCN=localeValues,_sfc_main$t=vue.defineComponent({__name:"index",props:{title:{type:String,default:"标题"},width:{type:[String,Number],default:520},filePath:{type:String,default:"components/wonderform/free/PreviewDemo"},formData:{type:[Object,String,Number,Array]},okText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},onOk:{type:Function,default:null},onCancel:{type:Function,default:null},footer:{type:Boolean,default:!0}},setup(H,{expose:C}){const W=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)});let U=vue.ref(!1),K=vue.ref(!1),G=vue.ref(),Q=vue.ref(!1);const Z=vue.computed(()=>vue.defineAsyncComponent(W[`/src/${X.filePath}.vue`])),X=H,ee=vue.computed(()=>X.footer?"":{footer:null});C({setConfirmLoading:te,show:oe,close:re}),vue.onMounted(()=>{oe()});function te(ae){K.value=ae}function ne(){if(X.onOk&&typeof X.onOk=="function"){let ae=G.value;X.onOk(ae)}else U.value=!1}function ie(){if(X.onCancel&&typeof X.onCancel=="function"){let ae=G.value;X.onCancel(ae)}else U.value=!1}function oe(){U.value=!0}function re(){U.value=!1}function se(){Q.value=!Q.value}return(ae,le)=>{const ce=vue.resolveComponent("a-modal"),de=vue.resolveComponent("a-config-provider");return vue.openBlock(),vue.createBlock(de,{locale:vue.unref(zhCN)},{default:vue.withCtx(()=>[vue.createVNode(ce,vue.mergeProps({class:"commonModal",open:vue.unref(U),"onUpdate:open":le[0]||(le[0]=ue=>vue.isRef(U)?U.value=ue:U=ue),width:vue.unref(Q)?"100%":H.width,"wrap-class-name":vue.unref(Q)?"full-common-modal":"",confirmLoading:vue.unref(K),maskClosable:!1,okText:H.okText,cancelText:H.cancelText},ee.value,{onOk:ne,onCancel:ie}),{title:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(H.title)+" ",1),vue.createElementVNode("div",{class:"fullscreen-custom",onClick:se},[vue.unref(Q)?(vue.openBlock(),vue.createBlock(vue.unref(FullscreenExitOutlined$1),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(FullscreenOutlined$1),{key:1}))])]),default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Z.value),{formData:H.formData,ref_key:"link",ref:G},null,8,["formData"]))]),_:1},16,["open","width","wrap-class-name","confirmLoading","okText","cancelText"])]),_:1},8,["locale"])}}}),index_vue_vue_type_style_index_0_scoped_7fcccc1f_lang="",index_vue_vue_type_style_index_1_lang="",CommonModal=_export_sfc(_sfc_main$t,[["__scopeId","data-v-7fcccc1f"]]),index$7=Object.freeze(Object.defineProperty({__proto__:null,default:CommonModal},Symbol.toStringTag,{value:"Module"})),_hoisted_1$d=["xlink:href"],_sfc_main$s=vue.defineComponent({__name:"SvgIcon",props:{name:{type:String,required:!0},title:{type:String,required:!1},color:{type:String,default:""},width:{type:String,default:"16px"},height:{type:String,default:"16px"}},setup(H){const C=H,W=vue.computed(()=>`#icon-${C.name}`),U=vue.computed(()=>C.name?`svg-icon icon-${C.name}`:"svg-icon");return(K,G)=>(vue.openBlock(),vue.createElementBlock("svg",vue.mergeProps({class:U.value},K.$attrs,{style:{color:H.color,width:H.width,height:H.height}}),[vue.createElementVNode("title",null,vue.toDisplayString(H.title),1),vue.createElementVNode("use",{"xlink:href":W.value},null,8,_hoisted_1$d)],16))}}),SvgIcon_vue_vue_type_style_index_0_scoped_f02ffdf6_lang="",SvgIcon=_export_sfc(_sfc_main$s,[["__scopeId","data-v-f02ffdf6"]]),SvgIcon$1=Object.freeze(Object.defineProperty({__proto__:null,default:SvgIcon},Symbol.toStringTag,{value:"Module"})),_hoisted_1$c={class:"form-table-css"},_hoisted_2$8={class:"form-table-thead"},_hoisted_3$6={class:"form-table-tbody"},_hoisted_4$4={key:0},_hoisted_5$3=["colspan"],_hoisted_6$2={key:0,class:"form-table-pagination"},_sfc_main$r=vue.defineComponent({__name:"cTable",props:{columns:{type:Object,default:[]},datasource:{type:Object,default:[]},disabled:{type:Boolean,default:!1,require:!1},total:{type:Number,default:0,require:!1},current:{type:Number,default:1,require:!1},pageSize:{type:Number,default:2,require:!1},showTotal:{type:Function,default:H=>`共 ${H} 条`,require:!1}},setup(H){const C=H;let W=vue.ref(C.current),U=vue.ref(C.pageSize);debugger;const K=Q=>{W.value=Q},G=Q=>C.disabled?Q.slice((W.value-1)*C.pageSize,(W.value-1)*C.pageSize+C.pageSize):C.datasource;return(Q,Z)=>{const X=vue.resolveComponent("a-pagination");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("table",_hoisted_1$c,[vue.createElementVNode("thead",_hoisted_2$8,[vue.createElementVNode("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.columns,(ee,te)=>(vue.openBlock(),vue.createElementBlock("th",null,vue.toDisplayString(ee.title),1))),256))])]),vue.createElementVNode("tbody",_hoisted_3$6,[H.datasource.length==0?(vue.openBlock(),vue.createElementBlock("tr",_hoisted_4$4,[vue.createElementVNode("td",{colspan:H.columns.length,class:"td-empty-data"},"暂无数据",8,_hoisted_5$3)])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(G(H.datasource),(ee,te)=>(vue.openBlock(),vue.createElementBlock("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.columns,(ne,ie)=>(vue.openBlock(),vue.createElementBlock("td",null,vue.toDisplayString(ee[ne.model]),1))),256))]))),256))])]),H.disabled?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$2,[vue.createVNode(X,{current:vue.unref(W),"onUpdate:current":Z[0]||(Z[0]=ee=>vue.isRef(W)?W.value=ee:W=ee),pageSize:vue.unref(U),"onUpdate:pageSize":Z[1]||(Z[1]=ee=>vue.isRef(U)?U.value=ee:U=ee),total:H.datasource.length,"show-total":H.showTotal,onChange:K},null,8,["current","pageSize","total","show-total"])])):vue.createCommentVNode("",!0)])}}}),cTable=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$r},Symbol.toStringTag,{value:"Module"})),_sfc_main$q=vue.defineComponent({__name:"tableSelect",props:{value:{type:[String,Number,Array]},mode:{type:String,default:""},bindKeyName:{type:String,default:""},bindLabelName:{type:String,default:""},tableProps:{type:[Number,String,Object,Array]},dropMenuWidth:{type:[Number,String],default:""},dropMenuHeight:{type:[Number,String],default:""},filePath:{type:String,default:""}},emits:["update:value","rowChange"],setup(H,{emit:C}){const W=H;let U=vue.ref(!1),K=vue.ref();const G=vue.computed(()=>({allowClear:!0,...vue.useAttrs()}));vue.ref();let Q=vue.ref([]),Z=vue.computed({get(){return W.value},set(le){ie("update:value",le)}});const X=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)}),ee=vue.computed(()=>{if(W.filePath){let le=`/src/${W.filePath}.vue`;return W.filePath?Object.keys(X).includes(le):!1}else return!1}),te=vue.computed(()=>ee?vue.defineAsyncComponent(X[`/src/${W.filePath}.vue`]):null),ne=vue.computed(()=>{let le=W.dropMenuWidth,ce=W.dropMenuHeight,de=le==null||le==""?`width: ${oe.value}`:`width: ${typeof le=="number"?`${le}px`:`${le}`}`,ue=ce==null||ce==""?"":`height: ${typeof ce=="number"?`${ce}px`:`${ce}`}`;return de&&ue?de+";"+ue:de&&!ue?de:!de&&ue?ue:""}),ie=C,oe=vue.computed(()=>K.value?K.value.$el.offsetWidth+"px":"");vue.onMounted(()=>{U.value=!0,vue.nextTick(()=>{U.value=!1})});function re(){let le=G.value;le&&!le.disabled&&le.disabled!=""&&(U.value=!U.value)}function se(le){ie("rowChange",le)}function ae(le){le?Q.value=le.map(ce=>({label:ce[W.bindLabelName]||"",value:ce[W.bindKeyName]})):Q.value=[]}return(le,ce)=>{const de=vue.resolveComponent("a-select"),ue=vue.resolveComponent("a-empty"),he=vue.resolveComponent("a-dropdown");return vue.openBlock(),vue.createBlock(he,{overlayClassName:"table-select-dropdown",trigger:["click"],open:vue.unref(U),"onUpdate:open":ce[2]||(ce[2]=fe=>vue.isRef(U)?U.value=fe:U=fe),onClick:re},{overlay:vue.withCtx(()=>[vue.createElementVNode("div",{class:"table-select-content",style:vue.normalizeStyle(ne.value)},[ee.value&&te.value?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(te.value),{key:0,value:vue.unref(Z),"onUpdate:value":ce[1]||(ce[1]=fe=>vue.isRef(Z)?Z.value=fe:Z=fe),mode:H.mode,keyName:H.bindKeyName,tableProps:H.tableProps,onGetTable:ae,onRowChange:se},null,40,["value","mode","keyName","tableProps"])):(vue.openBlock(),vue.createBlock(ue,{key:1}))],4)]),default:vue.withCtx(()=>[vue.createVNode(de,vue.mergeProps({ref_key:"select",ref:K,value:vue.unref(Z),"onUpdate:value":ce[0]||(ce[0]=fe=>vue.isRef(Z)?Z.value=fe:Z=fe),options:vue.unref(Q),mode:H.mode},G.value,{open:!1}),null,16,["value","options","mode"])]),_:1},8,["open"])}}}),tableSelect_vue_vue_type_style_index_0_scoped_46d332d3_lang="",tableSelect_vue_vue_type_style_index_1_lang="",CTableSelect=_export_sfc(_sfc_main$q,[["__scopeId","data-v-46d332d3"]]),tableSelect=Object.freeze(Object.defineProperty({__proto__:null,default:CTableSelect},Symbol.toStringTag,{value:"Module"})),_sfc_main$p=vue.defineComponent({__name:"childForm",props:{filePath:{type:String,default:""}},setup(H){const C=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)}),W=H,U=vue.computed(()=>{if(W.filePath){let G=`/src/${W.filePath}.vue`;return W.filePath?Object.keys(C).includes(G):!1}else return!1}),K=vue.computed(()=>U?vue.defineAsyncComponent(C[`/src/${W.filePath}.vue`]):null);return(G,Q)=>{const Z=vue.resolveComponent("a-empty"),X=vue.resolveComponent("a-card");return U.value?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(K.value),vue.normalizeProps(vue.mergeProps({key:0},vue.useAttrs)),null,16)):(vue.openBlock(),vue.createBlock(X,{key:1},{default:vue.withCtx(()=>[vue.createVNode(Z)]),_:1}))}}}),childForm=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$p},Symbol.toStringTag,{value:"Module"})),_hoisted_1$b={class:"collapsePanel"},_hoisted_2$7={key:0,class:"collapse-btn"},_hoisted_3$5={class:"collapse-form-list"},_sfc_main$o=vue.defineComponent({__name:"collapsePanel",props:{classname:{type:String,default:"title-css1"},header:{type:String,default:"标题"},showArrow:{type:Boolean,default:!0},defaultCollapse:{type:Boolean,default:!1},collapseType:{type:String,default:"row"}},setup(H){const C=H;let W=vue.ref(C.defaultCollapse);function U(K){K==C.collapseType&&(W.value=!W.value)}return(K,G)=>{const Q=vue.resolveComponent("svg-icon");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$b,[vue.createElementVNode("div",{class:vue.normalizeClass([H.classname,"title-between",H.collapseType=="row"?"clickPointer":"clickAuto"]),onClick:G[2]||(G[2]=Z=>U("row"))},[vue.createElementVNode("span",{class:vue.normalizeClass(H.collapseType=="icon"?"clickAuto":"clickPointer"),onClick:G[0]||(G[0]=Z=>U("header"))},vue.toDisplayString(H.header),3),H.showArrow?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,[vue.createVNode(Q,{class:vue.normalizeClass(H.collapseType=="header"?"clickAuto":"clickPointer"),style:vue.normalizeStyle(vue.unref(W)?{transform:"rotate(180deg)"}:{}),height:"24",name:"arrow",width:"24",onClick:G[1]||(G[1]=Z=>U("icon"))},null,8,["class","style"])])):vue.createCommentVNode("",!0)],2),vue.withDirectives(vue.createElementVNode("div",_hoisted_3$5,[vue.renderSlot(K.$slots,"default",{},void 0,!0)],512),[[vue.vShow,!vue.unref(W)]])])}}}),collapsePanel_vue_vue_type_style_index_0_scoped_191866ea_lang="",CCollapsePanel=_export_sfc(_sfc_main$o,[["__scopeId","data-v-191866ea"]]),collapsePanel=Object.freeze(Object.defineProperty({__proto__:null,default:CCollapsePanel},Symbol.toStringTag,{value:"Module"}));var zhCn={exports:{}};(function(H,C){(function(W,U){H.exports=U(dayjs_minExports)})(commonjsGlobal,function(W){function U(Q){return Q&&typeof Q=="object"&&"default"in Q?Q:{default:Q}}var K=U(W),G={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(Q,Z){return Z==="W"?Q+"周":Q+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(Q,Z){var X=100*Q+Z;return X<600?"凌晨":X<900?"早上":X<1100?"上午":X<1300?"中午":X<1800?"下午":"晚上"}};return K.default.locale(G,null,!0),G})})(zhCn),dayjs.locale("zh-cn");function registerGlobComp(H){H.component("svg-icon",SvgIcon),H.component("c-table",_sfc_main$r),H.component("c-table-select",CTableSelect),H.component("c-child-form",_sfc_main$p),H.component("c-collapse-panel",CCollapsePanel),H.use(Layout).use(Input).use(Row).use(Col$1).use(Form$3).use(Empty$1).use(Tabs$1).use(Modal).use(InputNumber$1).use(Button$2).use(Table$2).use(Pagination).use(ConfigProvider$1).use(Switch$1).use(Select$1).use(Radio).use(Slider$1).use(Dropdown$1).use(Menu$1).use(Divider$1).use(DatePicker$2).use(Collapse$1).use(Checkbox).use(Tree).use(TreeSelect$1).use(Space$1).use(List$2).use(Popconfirm$1).use(Cascader$1).use(Card$1).use(Flex).use(Drawer$1).use(Tooltip)}function cModal(H){let C,W,U;C=document.createElement("div"),H&&!H.onCancel&&(H.onCancel=()=>{Z()}),H&&!H.onOk&&(H.onOk=()=>{Z()}),W=vue.createApp(CommonModal,{...H}),registerGlobComp(W),U=W.mount(C);function K(X){U&&U.setConfirmLoading(X)}function G(){U&&U.show()}function Q(){U&&U.close()}function Z(){Q(),setTimeout(()=>{U=W.unmount()},200)}return{setConfirmLoading:K,show:G,close:Q,destroy:Z}}/*!
1847
+ `):H}function detectSystemErrorMessage(H){return H.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${H.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof H.code=="string"&&typeof H.errno=="number"&&typeof H.syscall=="string"?localize("nodeExceptionMessage","A system error occurred ({0})",H.message):H.message||localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function toErrorMessage(H=null,C=!1){if(!H)return localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(H)){const W=coalesce(H),U=toErrorMessage(W[0],C);return W.length>1?localize("error.moreErrors","{0} ({1} errors in total)",U,W.length):U}if(isString$2(H))return H;if(H.detail){const W=H.detail;if(W.error)return exceptionToErrorMessage(W.error,C);if(W.exception)return exceptionToErrorMessage(W.exception,C)}return H.stack?exceptionToErrorMessage(H,C):H.message?H.message:localize("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function countMapFrom(H){var C;const W=new Map;for(const U of H)W.set(U,((C=W.get(U))!==null&&C!==void 0?C:0)+1);return W}class TfIdfCalculator{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(C,W){const U=this.computeEmbedding(C),K=new Map,G=[];for(const[Q,Z]of this.documents){if(W.isCancellationRequested)return[];for(const X of Z.chunks){const ee=this.computeSimilarityScore(X,U,K);ee>0&&G.push({key:Q,score:ee})}}return G}static termFrequencies(C){return countMapFrom(TfIdfCalculator.splitTerms(C))}static*splitTerms(C){const W=U=>U.toLowerCase();for(const[U]of C.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield W(U);const K=U.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(K.length>1)for(const G of K)G.length>2&&/\p{Letter}{3,}/gu.test(G)&&(yield W(G))}}updateDocuments(C){var W;for(const{key:U}of C)this.deleteDocument(U);for(const U of C){const K=[];for(const G of U.textChunks){const Q=TfIdfCalculator.termFrequencies(G);for(const Z of Q.keys())this.chunkOccurrences.set(Z,((W=this.chunkOccurrences.get(Z))!==null&&W!==void 0?W:0)+1);K.push({text:G,tf:Q})}this.chunkCount+=K.length,this.documents.set(U.key,{chunks:K})}return this}deleteDocument(C){const W=this.documents.get(C);if(W){this.documents.delete(C),this.chunkCount-=W.chunks.length;for(const U of W.chunks)for(const K of U.tf.keys()){const G=this.chunkOccurrences.get(K);if(typeof G=="number"){const Q=G-1;Q<=0?this.chunkOccurrences.delete(K):this.chunkOccurrences.set(K,Q)}}}}computeSimilarityScore(C,W,U){let K=0;for(const[G,Q]of Object.entries(W)){const Z=C.tf.get(G);if(!Z)continue;let X=U.get(G);typeof X!="number"&&(X=this.computeIdf(G),U.set(G,X));const ee=Z*X;K+=ee*Q}return K}computeEmbedding(C){const W=TfIdfCalculator.termFrequencies(C);return this.computeTfidf(W)}computeIdf(C){var W;const U=(W=this.chunkOccurrences.get(C))!==null&&W!==void 0?W:0;return U>0?Math.log((this.chunkCount+1)/U):0}computeTfidf(C){const W=Object.create(null);for(const[U,K]of C){const G=this.computeIdf(U);G>0&&(W[U]=K*G)}return W}}function normalizeTfIdfScores(H){var C,W;const U=H.slice(0);U.sort((G,Q)=>Q.score-G.score);const K=(W=(C=U[0])===null||C===void 0?void 0:C.score)!==null&&W!==void 0?W:0;if(K>0)for(const G of U)G.score/=K;return U}var __awaiter$2=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},TriggerAction;(function(H){H[H.NO_ACTION=0]="NO_ACTION",H[H.CLOSE_PICKER=1]="CLOSE_PICKER",H[H.REFRESH_PICKER=2]="REFRESH_PICKER",H[H.REMOVE_ITEM=3]="REMOVE_ITEM"})(TriggerAction||(TriggerAction={}));function isPicksWithActive(H){const C=H;return Array.isArray(C.items)}function isFastAndSlowPicks(H){const C=H;return!!C.picks&&C.additionalPicks instanceof Promise}class PickerQuickAccessProvider extends Disposable{constructor(C,W){super(),this.prefix=C,this.options=W}provide(C,W,U){var K;const G=new DisposableStore;C.canAcceptInBackground=!!(!((K=this.options)===null||K===void 0)&&K.canAcceptInBackground),C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;let Q;const Z=G.add(new MutableDisposable),X=()=>__awaiter$2(this,void 0,void 0,function*(){const ee=Z.value=new DisposableStore;Q==null||Q.dispose(!0),C.busy=!1,Q=new CancellationTokenSource$1(W);const te=Q.token,ne=C.value.substr(this.prefix.length).trim(),ie=this._getPicks(ne,ee,te,U),oe=(se,ae)=>{var le;let ce,de;if(isPicksWithActive(se)?(ce=se.items,de=se.active):ce=se,ce.length===0){if(ae)return!1;(ne.length>0||C.hideInput)&&(!((le=this.options)===null||le===void 0)&&le.noResultsPick)&&(isFunction(this.options.noResultsPick)?ce=[this.options.noResultsPick(ne)]:ce=[this.options.noResultsPick])}return C.items=ce,de&&(C.activeItems=[de]),!0},re=se=>__awaiter$2(this,void 0,void 0,function*(){let ae=!1,le=!1;yield Promise.all([(()=>__awaiter$2(this,void 0,void 0,function*(){typeof se.mergeDelay=="number"&&(yield timeout(se.mergeDelay),te.isCancellationRequested)||le||(ae=oe(se.picks,!0))}))(),(()=>__awaiter$2(this,void 0,void 0,function*(){C.busy=!0;try{const ce=yield se.additionalPicks;if(te.isCancellationRequested)return;let de,ue;isPicksWithActive(se.picks)?(de=se.picks.items,ue=se.picks.active):de=se.picks;let he,fe;if(isPicksWithActive(ce)?(he=ce.items,fe=ce.active):he=ce,he.length>0||!ae){let ge;if(!ue&&!fe){const pe=C.activeItems[0];pe&&de.indexOf(pe)!==-1&&(ge=pe)}oe({items:[...de,...he],active:ue||fe||ge})}}finally{te.isCancellationRequested||(C.busy=!1),le=!0}}))()])});if(ie!==null)if(isFastAndSlowPicks(ie))yield re(ie);else if(!(ie instanceof Promise))oe(ie);else{C.busy=!0;try{const se=yield ie;if(te.isCancellationRequested)return;isFastAndSlowPicks(se)?yield re(se):oe(se)}finally{te.isCancellationRequested||(C.busy=!1)}}});return G.add(C.onDidChangeValue(()=>X())),X(),G.add(C.onDidAccept(ee=>{const[te]=C.selectedItems;typeof(te==null?void 0:te.accept)=="function"&&(ee.inBackground||C.hide(),te.accept(C.keyMods,ee))})),G.add(C.onDidTriggerItemButton(({button:ee,item:te})=>__awaiter$2(this,void 0,void 0,function*(){var ne,ie;if(typeof te.trigger=="function"){const oe=(ie=(ne=te.buttons)===null||ne===void 0?void 0:ne.indexOf(ee))!==null&&ie!==void 0?ie:-1;if(oe>=0){const re=te.trigger(oe,C.keyMods),se=typeof re=="number"?re:yield re;if(W.isCancellationRequested)return;switch(se){case TriggerAction.NO_ACTION:break;case TriggerAction.CLOSE_PICKER:C.hide();break;case TriggerAction.REFRESH_PICKER:X();break;case TriggerAction.REMOVE_ITEM:{const ae=C.items.indexOf(te);if(ae!==-1){const le=C.items.slice(),ce=le.splice(ae,1),de=C.activeItems.filter(he=>he!==ce[0]),ue=C.keepScrollPosition;C.keepScrollPosition=!0,C.items=le,de&&(C.activeItems=de),C.keepScrollPosition=ue}break}}}}}))),G}}var __decorate$2=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$2=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter$1=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})},AbstractCommandsQuickAccessProvider_1,CommandsHistory_1;let AbstractCommandsQuickAccessProvider=AbstractCommandsQuickAccessProvider_1=class extends PickerQuickAccessProvider{constructor(C,W,U,K,G,Q){super(AbstractCommandsQuickAccessProvider_1.PREFIX,C),this.instantiationService=W,this.keybindingService=U,this.commandService=K,this.telemetryService=G,this.dialogService=Q,this.commandsHistory=this._register(this.instantiationService.createInstance(CommandsHistory)),this.options=C}_getPicks(C,W,U,K){var G,Q,Z,X;return __awaiter$1(this,void 0,void 0,function*(){const ee=yield this.getCommandPicks(U);if(U.isCancellationRequested)return[];const te=createSingleCallFunction(()=>{const le=new TfIdfCalculator;le.updateDocuments(ee.map(de=>({key:de.commandId,textChunks:[de.label+(de.commandAlias?` ${de.commandAlias}`:"")]})));const ce=le.calculateScores(C,U);return normalizeTfIdfScores(ce).filter(de=>de.score>AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD).slice(0,AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS)}),ne=[];for(const le of ee){const ce=(G=AbstractCommandsQuickAccessProvider_1.WORD_FILTER(C,le.label))!==null&&G!==void 0?G:void 0,de=le.commandAlias&&(Q=AbstractCommandsQuickAccessProvider_1.WORD_FILTER(C,le.commandAlias))!==null&&Q!==void 0?Q:void 0;if(ce||de)le.highlights={label:ce,detail:this.options.showAlias?de:void 0},ne.push(le);else if(C===le.commandId)ne.push(le);else if(C.length>=3){const ue=te();if(U.isCancellationRequested)return[];const he=ue.find(fe=>fe.key===le.commandId);he&&(le.tfIdfScore=he.score,ne.push(le))}}const ie=new Map;for(const le of ne){const ce=ie.get(le.label);ce?(le.description=le.commandId,ce.description=ce.commandId):ie.set(le.label,le)}ne.sort((le,ce)=>{if(le.tfIdfScore&&ce.tfIdfScore)return le.tfIdfScore===ce.tfIdfScore?le.label.localeCompare(ce.label):ce.tfIdfScore-le.tfIdfScore;if(le.tfIdfScore)return 1;if(ce.tfIdfScore)return-1;const de=this.commandsHistory.peek(le.commandId),ue=this.commandsHistory.peek(ce.commandId);if(de&&ue)return de>ue?-1:1;if(de)return-1;if(ue)return 1;if(this.options.suggestedCommandIds){const he=this.options.suggestedCommandIds.has(le.commandId),fe=this.options.suggestedCommandIds.has(ce.commandId);if(he&&fe)return 0;if(he)return-1;if(fe)return 1}return le.label.localeCompare(ce.label)});const oe=[];let re=!1,se=!0,ae=!!this.options.suggestedCommandIds;for(let le=0;le<ne.length;le++){const ce=ne[le];le===0&&this.commandsHistory.peek(ce.commandId)&&(oe.push({type:"separator",label:localize("recentlyUsed","recently used")}),re=!0),se&&ce.tfIdfScore!==void 0&&(oe.push({type:"separator",label:localize("suggested","similar commands")}),se=!1),ae&&ce.tfIdfScore===void 0&&!this.commandsHistory.peek(ce.commandId)&&(!((Z=this.options.suggestedCommandIds)===null||Z===void 0)&&Z.has(ce.commandId))&&(oe.push({type:"separator",label:localize("commonlyUsed","commonly used")}),re=!0,ae=!1),re&&ce.tfIdfScore===void 0&&!this.commandsHistory.peek(ce.commandId)&&!(!((X=this.options.suggestedCommandIds)===null||X===void 0)&&X.has(ce.commandId))&&(oe.push({type:"separator",label:localize("morecCommands","other commands")}),re=!1),oe.push(this.toCommandPick(ce,K))}return this.hasAdditionalCommandPicks(C,U)?{picks:oe,additionalPicks:(()=>__awaiter$1(this,void 0,void 0,function*(){var le;const ce=yield this.getAdditionalCommandPicks(ee,ne,C,U);if(U.isCancellationRequested)return[];const de=ce.map(ue=>this.toCommandPick(ue,K));return se&&((le=de[0])===null||le===void 0?void 0:le.type)!=="separator"&&de.unshift({type:"separator",label:localize("suggested","similar commands")}),de}))()}:oe})}toCommandPick(C,W){if(C.type==="separator")return C;const U=this.keybindingService.lookupKeybinding(C.commandId),K=U?localize("commandPickAriaLabelWithKeybinding","{0}, {1}",C.label,U.getAriaLabel()):C.label;return Object.assign(Object.assign({},C),{ariaLabel:K,detail:this.options.showAlias&&C.commandAlias!==C.label?C.commandAlias:void 0,keybinding:U,accept:()=>__awaiter$1(this,void 0,void 0,function*(){var G,Q;this.commandsHistory.push(C.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:C.commandId,from:(G=W==null?void 0:W.from)!==null&&G!==void 0?G:"quick open"});try{!((Q=C.args)===null||Q===void 0)&&Q.length?yield this.commandService.executeCommand(C.commandId,...C.args):yield this.commandService.executeCommand(C.commandId)}catch(Z){isCancellationError(Z)||this.dialogService.error(localize("canNotRun","Command '{0}' resulted in an error",C.label),toErrorMessage(Z))}})})}};AbstractCommandsQuickAccessProvider.PREFIX=">",AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD=.5,AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS=5,AbstractCommandsQuickAccessProvider.WORD_FILTER=or(matchesPrefix,matchesWords,matchesContiguousSubString),AbstractCommandsQuickAccessProvider=AbstractCommandsQuickAccessProvider_1=__decorate$2([__param$2(1,IInstantiationService),__param$2(2,IKeybindingService),__param$2(3,ICommandService),__param$2(4,ITelemetryService),__param$2(5,IDialogService)],AbstractCommandsQuickAccessProvider);let CommandsHistory=CommandsHistory_1=class extends Disposable{constructor(C,W){super(),this.storageService=C,this.configurationService=W,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(C=>this.updateConfiguration(C)))}updateConfiguration(C){C&&!C.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=CommandsHistory_1.getConfiguredCommandHistoryLength(this.configurationService),CommandsHistory_1.cache&&CommandsHistory_1.cache.limit!==this.configuredCommandsHistoryLength&&(CommandsHistory_1.cache.limit=this.configuredCommandsHistoryLength,CommandsHistory_1.saveState(this.storageService)))}load(){const C=this.storageService.get(CommandsHistory_1.PREF_KEY_CACHE,0);let W;if(C)try{W=JSON.parse(C)}catch{}const U=CommandsHistory_1.cache=new LRUCache(this.configuredCommandsHistoryLength,1);if(W){let K;W.usesLRU?K=W.entries:K=W.entries.sort((G,Q)=>G.value-Q.value),K.forEach(G=>U.set(G.key,G.value))}CommandsHistory_1.counter=this.storageService.getNumber(CommandsHistory_1.PREF_KEY_COUNTER,0,CommandsHistory_1.counter)}push(C){CommandsHistory_1.cache&&(CommandsHistory_1.cache.set(C,CommandsHistory_1.counter++),CommandsHistory_1.saveState(this.storageService))}peek(C){var W;return(W=CommandsHistory_1.cache)===null||W===void 0?void 0:W.peek(C)}static saveState(C){if(!CommandsHistory_1.cache)return;const W={usesLRU:!0,entries:[]};CommandsHistory_1.cache.forEach((U,K)=>W.entries.push({key:K,value:U})),C.store(CommandsHistory_1.PREF_KEY_CACHE,JSON.stringify(W),0,0),C.store(CommandsHistory_1.PREF_KEY_COUNTER,CommandsHistory_1.counter,0,0)}static getConfiguredCommandHistoryLength(C){var W,U;const G=(U=(W=C.getValue().workbench)===null||W===void 0?void 0:W.commandPalette)===null||U===void 0?void 0:U.history;return typeof G=="number"?G:CommandsHistory_1.DEFAULT_COMMANDS_HISTORY_LENGTH}};CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH=50,CommandsHistory.PREF_KEY_CACHE="commandPalette.mru.cache",CommandsHistory.PREF_KEY_COUNTER="commandPalette.mru.counter",CommandsHistory.counter=1,CommandsHistory=CommandsHistory_1=__decorate$2([__param$2(0,IStorageService),__param$2(1,IConfigurationService)],CommandsHistory);class AbstractEditorCommandsQuickAccessProvider extends AbstractCommandsQuickAccessProvider{constructor(C,W,U,K,G,Q){super(C,W,U,K,G,Q)}getCodeEditorCommandPicks(){const C=this.activeTextEditorControl;if(!C)return[];const W=[];for(const U of C.getSupportedActions())W.push({commandId:U.id,commandAlias:U.alias,label:stripIcons(U.label)||U.id});return W}}var __decorate$1=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param$1=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}},__awaiter=globalThis&&globalThis.__awaiter||function(H,C,W,U){function K(G){return G instanceof W?G:new W(function(Q){Q(G)})}return new(W||(W=Promise))(function(G,Q){function Z(te){try{ee(U.next(te))}catch(ne){Q(ne)}}function X(te){try{ee(U.throw(te))}catch(ne){Q(ne)}}function ee(te){te.done?G(te.value):K(te.value).then(Z,X)}ee((U=U.apply(H,C||[])).next())})};let StandaloneCommandsQuickAccessProvider=class extends AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){var C;return(C=this.codeEditorService.getFocusedCodeEditor())!==null&&C!==void 0?C:void 0}constructor(C,W,U,K,G,Q){super({showAlias:!1},C,U,K,G,Q),this.codeEditorService=W}getCommandPicks(){return __awaiter(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return __awaiter(this,void 0,void 0,function*(){return[]})}};StandaloneCommandsQuickAccessProvider=__decorate$1([__param$1(0,IInstantiationService),__param$1(1,ICodeEditorService),__param$1(2,IKeybindingService),__param$1(3,ICommandService),__param$1(4,ITelemetryService),__param$1(5,IDialogService)],StandaloneCommandsQuickAccessProvider);class GotoLineAction extends EditorAction{constructor(){super({id:GotoLineAction.ID,label:QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(C){C.get(IQuickInputService).quickAccess.show(StandaloneCommandsQuickAccessProvider.PREFIX)}}GotoLineAction.ID="editor.action.quickCommand",registerEditorAction(GotoLineAction),Registry.as(Extensions$2.Quickaccess).registerQuickAccessProvider({ctor:StandaloneCommandsQuickAccessProvider,prefix:StandaloneCommandsQuickAccessProvider.PREFIX,helpEntries:[{description:QuickCommandNLS.quickCommandHelp,commandId:GotoLineAction.ID}]});var __decorate=globalThis&&globalThis.__decorate||function(H,C,W,U){var K=arguments.length,G=K<3?C:U===null?U=Object.getOwnPropertyDescriptor(C,W):U,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(H,C,W,U);else for(var Z=H.length-1;Z>=0;Z--)(Q=H[Z])&&(G=(K<3?Q(G):K>3?Q(C,W,G):Q(C,W))||G);return K>3&&G&&Object.defineProperty(C,W,G),G},__param=globalThis&&globalThis.__param||function(H,C){return function(W,U){C(W,U,H)}};let StandaloneReferencesController=class extends ReferencesController{constructor(C,W,U,K,G,Q,Z){super(!0,C,W,U,K,G,Q,Z)}};StandaloneReferencesController=__decorate([__param(1,IContextKeyService),__param(2,ICodeEditorService),__param(3,INotificationService),__param(4,IInstantiationService),__param(5,IStorageService),__param(6,IConfigurationService)],StandaloneReferencesController),registerEditorContribution(ReferencesController.ID,StandaloneReferencesController,4);class ToggleHighContrast extends EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(C,W){const U=C.get(IStandaloneThemeService),K=U.getColorTheme();isHighContrast(K.type)?(U.setTheme(this._originalThemeName||(isDark(K.type)?VS_DARK_THEME_NAME:VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(U.setTheme(isDark(K.type)?HC_BLACK_THEME_NAME:HC_LIGHT_THEME_NAME),this._originalThemeName=K.themeName)}}registerEditorAction(ToggleHighContrast);function WorkerWrapper$4(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/json.worker-8dd963f3.js").href:new URL("assets/json.worker-8dd963f3.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$3(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/css.worker-c3850ceb.js").href:new URL("assets/css.worker-c3850ceb.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$2(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/html.worker-88b237e1.js").href:new URL("assets/html.worker-88b237e1.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper$1(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/ts.worker-184cdfdf.js").href:new URL("assets/ts.worker-184cdfdf.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}function WorkerWrapper(){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-94ffd778.js").href:new URL("assets/editor.worker-94ffd778.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href))}const _sfc_main$E=vue.defineComponent({__name:"monacoEditor",props:{readOnly:{type:Boolean,default:!1},...editorProps},emits:["update:modelValue","change","editor-mounted"],setup(H,{emit:C}){vue.useCssVars(ee=>({"32d7ef8b":ee.width,"0e570802":ee.height}));const W=H,U=C;self.MonacoEnvironment={getWorker(ee,te){return te==="json"?new WorkerWrapper$4:["css","less"].includes(te)?new WorkerWrapper$3:["html","handlebars","razor"].includes(te)?new WorkerWrapper$2:["typescript","javascript"].includes(te)?new WorkerWrapper$1:new WorkerWrapper}};let K;const G=vue.ref(),Q=()=>{languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),languages.typescript.javascriptDefaults.setCompilerOptions({target:languages.typescript.ScriptTarget.ES2020,allowNonTsExtensions:!0}),K=editor.create(G.value,{value:W.modelValue,language:W.language,theme:W.theme,...W.options}),K.getAction("editor.action.formatDocument").run(),K.onDidChangeModelContent(()=>{const ee=K.getValue();U("update:modelValue",ee),U("change",ee)}),X(),U("editor-mounted",K)},Z=ee=>{let te=K.getModel();te&&editor.setModelLanguage(te,ee)};vue.watch(()=>W.language,ee=>{K&&Z(ee)}),vue.watch(()=>W.modelValue,ee=>{if(K){const te=K.getValue();ee!==te&&(K.getAction("editor.action.formatDocument").run(),K.setValue(ee),X())}}),vue.onMounted(()=>{Q()});const X=()=>{var te;const ee=W.readOnly;K==null||K.updateOptions({readOnly:!1}),(te=K==null?void 0:K.getAction("editor.action.formatDocument"))==null||te.run().then().finally(()=>K==null?void 0:K.updateOptions({readOnly:ee})),K==null||K.setValue(K==null?void 0:K.getValue())};return(ee,te)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"codeEditBox",ref:G,class:"codeEditBox"},null,512))}}),monacoEditor_vue_vue_type_style_index_0_scoped_8e6cb063_lang="",monacoEditor=_export_sfc(_sfc_main$E,[["__scopeId","data-v-8e6cb063"]]),monacoEditor$1=Object.freeze(Object.defineProperty({__proto__:null,default:monacoEditor},Symbol.toStringTag,{value:"Module"})),_withScopeId$3=H=>(vue.pushScopeId("data-v-c9ea141a"),H=H(),vue.popScopeId(),H),_hoisted_1$j={style:{height:"40px"}},_hoisted_2$c={style:{float:"right"}},_hoisted_3$a=_withScopeId$3(()=>vue.createElementVNode("span",null,"watch监听事件放到Mounted方法里面",-1)),_hoisted_4$8={style:{height:"500px",width:"100%"}},_hoisted_5$7={style:{width:"300px",height:"100%",border:"1px solid #e4e7ed",float:"left",overflow:"auto"}},_hoisted_6$6=["onClick"],_hoisted_7$4={style:{color:"#67c23a"}},_hoisted_8$2=["onClick"],_hoisted_9$2={key:0,style:{width:"calc(100% - 310px)",height:"100%",float:"left"}},_hoisted_10$2={class:"content"},_hoisted_11$2={key:0},_hoisted_12$2=_withScopeId$3(()=>vue.createElementVNode("a",{style:{color:"red"}},"存在多个时,用逗号(,)分隔,如onChange,onClose",-1)),_hoisted_13$2={key:1},_hoisted_14$2=_withScopeId$3(()=>vue.createElementVNode("a",{style:{color:"red"}},"可暴露变量名或方法名让外部接收,存在多个时,用逗号(,)分隔,如onChange,onClose",-1)),_hoisted_15$2={key:2,style:{height:"100%"}},_hoisted_16$2={key:3,style:{height:"100%"}},_hoisted_17$2=_withScopeId$3(()=>vue.createElementVNode("div",{style:{color:"red","padding-top":"8px"}},"变量使用示例: basicInfo.value.name",-1)),_hoisted_18$1={key:4,style:{height:"100%"}},_hoisted_19$1={key:0},_hoisted_20={style:{color:"blue"}},_hoisted_21={key:1,style:{color:"blue","font-size":"12px"}},_sfc_main$D=vue.defineComponent({__name:"TypeScript",setup(H){const C=useFormStore(),W=[{type:"Mounted",name:"Mounted"},{type:"Function",name:"方法"},{type:"BeforeValidate",name:"(保存前)校验"}],U=[{type:"basicInfo",name:"变量"},{type:"Computed",name:"Computed"},{type:"Exposed",name:"Exposed"}];let K=vue.ref(-1),G=vue.ref({key:"",name:"",func:"",param:"",isasync:!1,type:"Function"}),Q=vue.ref(C.formData.config.eventScript);const Z=[{value:"string",label:"字符串"},{value:"number",label:"数字"},{value:"boolean",label:"布尔值"},{value:"object",label:"对象"},{value:"array",label:"数组"}];C.formData.config.cBasicInfo==null&&(C.formData.config.cBasicInfo=[]);let X=vue.ref(C.formData.config.cBasicInfo);function ee(){X.value.push({name:"",type:"",default:""})}function te(re){let se=X.value.indexOf(re);se!==-1&&X.value.splice(se,1)}G.value=Q.value[0];function ne(re){if(["Mounted","Emit","Props","basicInfo","BeforeValidate","Exposed"].includes(re)&&Q.value.filter(ce=>ce.type==re).length==1){message.warning("已经存在一个"+re+",不能重复添加");return}const ae={key:"12323",name:"fun1",func:"",param:"",isasync:!1,type:re};switch(re){case"Props":ae.name="_props",ae.func="// {{name:'value',type:'string'}}";break;case"Mounted":ae.name="initMount";break;case"basicInfo":ae.name="变量";break;case"BeforeValidate":ae.name="onBeforeValidate";break}Q.value.push(ae),oe(Q.value.length-1)}function ie(re,se){if(["basicInfo"].includes(re.type)&&X.value.length>0){message.error("存在变量项,不能直接删除,请先删除变量项");return}Q.value.splice(se,1);const le=se-1;K.value=le,G.value=Q.value[le]}function oe(re){K.value=re,G.value=Q.value[re]}return(re,se)=>{const ae=vue.resolveComponent("a-button"),le=vue.resolveComponent("a-space"),ce=vue.resolveComponent("a-tooltip"),de=vue.resolveComponent("a-input"),ue=vue.resolveComponent("a-form-item"),he=vue.resolveComponent("a-col"),fe=vue.resolveComponent("a-select"),ge=vue.resolveComponent("a-row"),pe=vue.resolveComponent("a-switch"),me=vue.resolveComponent("a-form");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$j,[vue.createVNode(le,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(W,(ve,be)=>vue.createVNode(ae,{onClick:ye=>ne(ve.type)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ve.name),1)]),_:2},1032,["onClick"])),64)),(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(U,(ve,be)=>vue.createVNode(ae,{danger:"",onClick:ye=>ne(ve.type)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(ve.name),1)]),_:2},1032,["onClick"])),64))]),_:1}),vue.createElementVNode("div",_hoisted_2$c,[vue.createVNode(le,null,{default:vue.withCtx(()=>[vue.createVNode(ce,{color:"green",placement:"bottom"},{title:vue.withCtx(()=>[_hoisted_3$a]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(QuestionCircleOutlined$1),{style:{fontSize:"16px",color:"#1677ff"}})]),_:1})]),_:1})])]),vue.createElementVNode("div",_hoisted_4$8,[vue.createElementVNode("div",_hoisted_5$7,[vue.createElementVNode("ul",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q),(ve,be)=>(vue.openBlock(),vue.createElementBlock("li",{class:vue.normalizeClass(["menu-item",{active:vue.unref(K)==be}])},[vue.createElementVNode("div",null,[vue.createElementVNode("div",{style:{"padding-left":"5px",display:"inline-block",width:"230px"},onClick:ye=>oe(be)},[vue.createElementVNode("span",_hoisted_7$4,vue.toDisplayString(ve.type?ve.type:"Function"),1),vue.createTextVNode(" "+vue.toDisplayString(ve.name),1)],8,_hoisted_6$6),vue.createElementVNode("div",{style:{display:"inline-block",right:"5px",cursor:"pointer"},onClick:ye=>ie(ve,be)},[vue.createVNode(vue.unref(DeleteOutlined$1))],8,_hoisted_8$2)])],2))),256))])]),vue.unref(G)!=null?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$2,[vue.createElementVNode("div",_hoisted_10$2,[vue.unref(G).type=="Emit"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$2,[vue.createVNode(ue,{label:"Emit",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[0]||(se[0]=ve=>vue.unref(G).name=ve),placeholder:""},null,8,["value"]),_hoisted_12$2]),_:1})])):vue.unref(G).type=="Exposed"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$2,[vue.createVNode(ue,{label:"Exposed",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[1]||(se[1]=ve=>vue.unref(G).name=ve),placeholder:""},null,8,["value"]),_hoisted_14$2]),_:1})])):vue.unref(G).type=="Props"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$2,[vue.createVNode(monacoEditor,{modelValue:vue.unref(G).func,"onUpdate:modelValue":se[2]||(se[2]=ve=>vue.unref(G).func=ve),language:"typescript",style:{width:"100%"},height:"100%","update:modelValue":"eventScript.func"},null,8,["modelValue"])])):vue.unref(G).type=="basicInfo"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16$2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(X),(ve,be)=>(vue.openBlock(),vue.createBlock(ge,{style:{"padding-bottom":"5px"}},{default:vue.withCtx(()=>[vue.createVNode(he,{span:6},{default:vue.withCtx(()=>[vue.createVNode(de,{value:ve.name,"onUpdate:value":ye=>ve.name=ye,placeholder:"变量名称"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:6,offset:1},{default:vue.withCtx(()=>[vue.createVNode(fe,{value:ve.type,"onUpdate:value":ye=>ve.type=ye,options:Z,placeholder:"变量类型",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:6,offset:1},{default:vue.withCtx(()=>[vue.createVNode(de,{value:ve.default,"onUpdate:value":ye=>ve.default=ye,placeholder:"默认值"},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(he,{span:3,offset:1,style:{"line-height":"30px"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:ye=>te(ve),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4"}},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(ue,null,{default:vue.withCtx(()=>[vue.createVNode(ae,{type:"dashed",style:{width:"100%"},onClick:ee},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加自定义变量 ")]),_:1}),_hoisted_17$2]),_:1})])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_18$1,[vue.createVNode(me,{"label-col":{span:6},"wrapper-col":{span:18},style:{height:"100%"}},{default:vue.withCtx(()=>[vue.unref(G).name!="全局变量定义"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_19$1,[vue.createVNode(ue,{label:"Function Name",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).name,"onUpdate:value":se[3]||(se[3]=ve=>vue.unref(G).name=ve),readOnly:vue.unref(G).type=="Mounted"||vue.unref(G).type=="BeforeValidate"},null,8,["value","readOnly"])]),_:1}),vue.unref(G).name!="全局变量定义"&&vue.unref(G).type!="Computed"?(vue.openBlock(),vue.createBlock(ue,{key:0,label:"参数"},{default:vue.withCtx(()=>[vue.createVNode(de,{value:vue.unref(G).param,"onUpdate:value":se[4]||(se[4]=ve=>vue.unref(G).param=ve)},null,8,["value"])]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(ue,{label:"是否异步"},{default:vue.withCtx(()=>[vue.createVNode(pe,{checked:vue.unref(G).isasync,"onUpdate:checked":se[5]||(se[5]=ve=>vue.unref(G).isasync=ve),"checked-children":"是","un-checked-children":"否"},null,8,["checked"])]),_:1}),vue.createElementVNode("div",_hoisted_20,vue.toDisplayString(vue.unref(G).isasync?"async":"")+" Function(){ ",1)])):vue.createCommentVNode("",!0),vue.createVNode(monacoEditor,{modelValue:vue.unref(G).func,"onUpdate:modelValue":se[6]||(se[6]=ve=>vue.unref(G).func=ve),language:"typescript",style:{width:"100%"},height:"100%","update:modelValue":"eventScript.func"},null,8,["modelValue"]),vue.unref(G).name!="全局变量定义"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_21," } ")):vue.createCommentVNode("",!0)]),_:1})]))])])):vue.createCommentVNode("",!0)])],64)}}}),TypeScript_vue_vue_type_style_index_0_scoped_c9ea141a_lang="",TypeScript=_export_sfc(_sfc_main$D,[["__scopeId","data-v-c9ea141a"]]),TypeScript$1=Object.freeze(Object.defineProperty({__proto__:null,default:TypeScript},Symbol.toStringTag,{value:"Module"})),_sfc_main$C=vue.defineComponent({__name:"Form",setup(H){const C=useFormStore(),W=vue.ref(!1),U=vue.ref(""),K=vue.ref("");function G(Q){K.value=Q,Q=="datasource"?(U.value="数据源",W.value=!0):Q=="ts"?(U.value="脚本",W.value=!0):Q=="basets"&&(U.value="",W.value=!0)}return(Q,Z)=>{const X=vue.resolveComponent("a-input-number"),ee=vue.resolveComponent("a-form-item"),te=vue.resolveComponent("a-button"),ne=vue.resolveComponent("a-form"),ie=vue.resolveComponent("a-modal");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(ne,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(ee,{label:"表单文本宽度",name:"labelWidth"},{default:vue.withCtx(()=>[vue.createVNode(X,{min:"50",max:"300",defaultValue:"100",value:vue.unref(C).formData.config.labelWidth,"onUpdate:value":Z[0]||(Z[0]=oe=>vue.unref(C).formData.config.labelWidth=oe)},null,8,["value"])]),_:1}),vue.createVNode(ee,{label:"脚本"},{default:vue.withCtx(()=>[vue.createVNode(te,{onClick:Z[1]||(Z[1]=oe=>G("ts")),block:""},{default:vue.withCtx(()=>[vue.createTextVNode(" + ")]),_:1})]),_:1})]),_:1}),vue.createVNode(ie,{open:W.value,"onUpdate:open":Z[3]||(Z[3]=oe=>W.value=oe),title:U.value,width:"1000px"},{footer:vue.withCtx(()=>[]),default:vue.withCtx(()=>[W.value&&K.value=="datasource"?(vue.openBlock(),vue.createBlock(DataSource$1,{key:0})):vue.createCommentVNode("",!0),W.value&&K.value=="ts"?(vue.openBlock(),vue.createBlock(TypeScript,{key:1})):vue.createCommentVNode("",!0),W.value&&K.value=="basets"?(vue.openBlock(),vue.createBlock(monacoEditor,{key:2,modelValue:vue.unref(C).formData.config.baseScript,"onUpdate:modelValue":Z[2]||(Z[2]=oe=>vue.unref(C).formData.config.baseScript=oe),"update:modelValue":"formStore.formData.config.baseScript",language:"typescript",style:{width:"100%","padding-top":"20px"},height:"500px"},null,8,["modelValue"])):vue.createCommentVNode("",!0)]),_:1},8,["open","title"])],64)}}}),Form_vue_vue_type_style_index_0_scoped_be567b5d_lang="",CForm=_export_sfc(_sfc_main$C,[["__scopeId","data-v-be567b5d"]]),Form$1=Object.freeze(Object.defineProperty({__proto__:null,default:CForm},Symbol.toStringTag,{value:"Module"})),_hoisted_1$i={style:{"min-height":"500px"}},_hoisted_2$b={style:{"padding-top":"10px"}},_hoisted_3$9={style:{padding:"0 0 10px",color:"rgba(139,61,255)"}},_hoisted_4$7={key:0,style:{"background-color":"#fff",border:"1px solid #d9d9d9"}},_hoisted_5$6={style:{"font-weight":"600","padding-left":"20px"}},_hoisted_6$5={key:1},_hoisted_7$3={style:{padding:"15px 0 15px",color:"rgba(139,61,255)"}},placement="bottom",_sfc_main$B=vue.defineComponent({__name:"FormSetting",props:{open:{type:Boolean,default:!1},title:{type:String,default:"设置"},isedit:{type:Boolean,default:!1},data:{type:Object,default:()=>({name:"",ruleList:[],actionList:[]})}},emits:["onClose"],setup(H,{emit:C}){const W=H;let U=vue.ref(W.open);const K=useFormStore(),G=vue.ref(!1);let Q=vue.ref({});Q.value=W.data;const Z=vue.ref([]),X=vue.ref([]),ee=vue.ref(""),te=[{value:"eq",label:"等于"},{value:"neq",label:"不等于"},{value:"in",label:"包含"},{value:"notIn",label:"不包含"}],ne=[{value:"fix",label:"固定值"},{value:"field",label:"字段值"}],ie=[{value:"隐藏",label:"隐藏"},{value:"显示",label:"显示"},{value:"只读",label:"只读"},{value:"可编辑",label:"可编辑"},{value:"必填",label:"必填"}];function oe(fe){Q.value.actionList.push({actionType:fe.value,actionField:[]})}function re(fe,ge){if(ge.checked){let pe=Q.value.ruleList,me="当";pe.length>0&&(me="且"),pe.push({matchType:me,title:ge.node.name,field:ge.node.id,ruleType:"等于",selectType:"fix",ruleValue:""}),G.value=!G}}let se=vue.computed(()=>{let fe=[];return K.getFormDesignConfig.list.forEach(ge=>{le(fe,ge),ge.type=="grid"&&ae(ge,fe),ge.type=="collapse"&&ge.content.forEach(pe=>{switch(pe.type){case"grid":ae(pe,fe);break}})}),fe});function ae(fe,ge){fe.columns.forEach(pe=>{pe.list.forEach(me=>{le(ge,me)})})}function le(fe,ge){(ge.type=="input"||ge.type=="inputnumber"||ge.type=="radio")&&fe.push({id:ge.model==null?ge.id:ge.model,name:ge.name})}const ce=C;function de(){ce("onClose",{refresh:!0})}function ue(){W.isedit||(K.formData.config.formSetting==null&&(K.formData.config.formSetting=[]),K.formData.config.formSetting.push(Q.value)),ce("onClose",{refresh:!0})}let he=vue.ref(!1);return(fe,ge)=>{const pe=vue.resolveComponent("a-input"),me=vue.resolveComponent("a-form-item"),ve=vue.resolveComponent("a-tree"),be=vue.resolveComponent("a-menu-item"),ye=vue.resolveComponent("a-menu"),Ce=vue.resolveComponent("a-dropdown"),ke=vue.resolveComponent("a-col"),Se=vue.resolveComponent("a-row"),De=vue.resolveComponent("a-select"),Ne=vue.resolveComponent("a-button"),Ie=vue.resolveComponent("a-space"),Ee=vue.resolveComponent("a-drawer");return vue.openBlock(),vue.createBlock(Ee,{title:H.title,width:600,open:vue.unref(U),"onUpdate:open":ge[7]||(ge[7]=Te=>vue.isRef(U)?U.value=Te:U=Te),"body-style":{paddingBottom:"80px"},"footer-style":{textAlign:"right"},onClose:de},{extra:vue.withCtx(()=>[vue.createVNode(Ie,null,{default:vue.withCtx(()=>[vue.createVNode(Ne,{onClick:de},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1}),vue.createVNode(Ne,{type:"primary",onClick:ue},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1})]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$i,[vue.unref(he)?(vue.openBlock(),vue.createBlock(me,{key:0,label:"规则名称",name:"name",rules:[{required:!0,message:"规则名称"}]},{default:vue.withCtx(()=>[vue.createVNode(pe,{value:vue.unref(Q).name,"onUpdate:value":ge[0]||(ge[0]=Te=>vue.unref(Q).name=Te)},null,8,["value"])]),_:1})):vue.createCommentVNode("",!0),vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[1]||(ge[1]=()=>G.value=!G.value)},[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加条件 ")]),vue.createElementVNode("div",_hoisted_2$b,[vue.createElementVNode("h3",_hoisted_3$9,[vue.createTextVNode("当满足以下条件 "),vue.createVNode(vue.unref(ArrowRightOutlined$1))]),G.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$7,[vue.createVNode(pe,{value:ee.value,"onUpdate:value":ge[2]||(ge[2]=Te=>ee.value=Te),style:{"margin-bottom":"2px"}},{prefix:vue.withCtx(()=>[vue.createVNode(vue.unref(SearchOutlined$1))]),_:1},8,["value"]),vue.createVNode(ve,{selectedKeys:Z.value,"onUpdate:selectedKeys":ge[3]||(ge[3]=Te=>Z.value=Te),checkedKeys:X.value,"onUpdate:checkedKeys":ge[4]||(ge[4]=Te=>X.value=Te),checkable:"","tree-data":vue.unref(se),onCheck:re},{title:vue.withCtx(({name:Te,id:we})=>[vue.createElementVNode("span",null,vue.toDisplayString(Te),1)]),_:1},8,["selectedKeys","checkedKeys","tree-data"])])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).ruleList,(Te,we)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Se,{style:{margin:"8px 0"}},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:12},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Te.matchType),1),vue.createElementVNode("span",_hoisted_5$6,vue.toDisplayString(Te.title),1),vue.createVNode(Ce,{trigger:["click"],placement},{overlay:vue.withCtx(()=>[vue.createVNode(ye,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(te,(xe,Me)=>vue.createVNode(be,{key:Me,onClick:()=>Te.ruleType=xe.label},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(xe.label),1)]),_:2},1032,["onClick"])),64))]),_:2},1024)]),default:vue.withCtx(()=>[vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[5]||(ge[5]=vue.withModifiers(()=>{},["prevent"])),style:{"padding-left":"20px"}},[vue.createTextVNode(vue.toDisplayString(Te.ruleType)+" ",1),vue.createVNode(vue.unref(DownOutlined$1))])]),_:2},1024)]),_:2},1024),vue.createVNode(ke,{span:12})]),_:2},1024),vue.createVNode(Se,{gutter:[8,8]},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:5},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.selectType,"onUpdate:value":xe=>Te.selectType=xe,options:ne,allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ke,{span:19},{default:vue.withCtx(()=>[Te.selectType=="fix"?(vue.openBlock(),vue.createBlock(pe,{key:0,value:Te.ruleValue,"onUpdate:value":xe=>Te.ruleValue=xe},null,8,["value","onUpdate:value"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$5,[vue.createVNode(De,{value:Te.ruleValue,"onUpdate:value":xe=>Te.ruleValue=xe,options:vue.unref(se),"field-names":{label:"name",value:"id"},allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value","options"])]))]),_:2},1024)]),_:2},1024)],64))),256)),vue.createElementVNode("h3",_hoisted_7$3,[vue.createTextVNode("则执行以下动作 "),vue.createVNode(vue.unref(ArrowRightOutlined$1))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(Q).actionList,(Te,we)=>(vue.openBlock(),vue.createBlock(Se,{gutter:[8,8],style:{"margin-top":"5px","margin-bottom":"5px"}},{default:vue.withCtx(()=>[vue.createVNode(ke,{span:5},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.actionType,"onUpdate:value":xe=>Te.actionType=xe,options:ie,allowClear:"",style:{width:"100%"}},null,8,["value","onUpdate:value"])]),_:2},1024),vue.createVNode(ke,{span:19},{default:vue.withCtx(()=>[vue.createVNode(De,{value:Te.actionField,"onUpdate:value":xe=>Te.actionField=xe,options:vue.unref(se),"field-names":{label:"name",value:"name"},allowClear:"",style:{width:"100%"},mode:"tags"},null,8,["value","onUpdate:value","options"])]),_:2},1024)]),_:2},1024))),256)),vue.createVNode(Ce,{trigger:["click"],placement},{overlay:vue.withCtx(()=>[vue.createVNode(ye,null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(ie,(Te,we)=>vue.createVNode(be,{key:we,onClick:xe=>oe(Te)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Te.label),1)]),_:2},1032,["onClick"])),64))]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("a",{class:"ant-dropdown-link",onClick:ge[6]||(ge[6]=vue.withModifiers(()=>{},["prevent"]))},[vue.createVNode(vue.unref(PlusOutlined$1)),vue.createTextVNode(" 添加动作 ")])]),_:1})])])]),_:1},8,["title","open"])}}}),FormSetting_vue_vue_type_style_index_0_scoped_eecf4360_lang="",FormSetting=_export_sfc(_sfc_main$B,[["__scopeId","data-v-eecf4360"]]),FormSetting$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormSetting},Symbol.toStringTag,{value:"Module"})),_withScopeId$2=H=>(vue.pushScopeId("data-v-9462cb24"),H=H(),vue.popScopeId(),H),_hoisted_1$h=_withScopeId$2(()=>vue.createElementVNode("div",{class:"title"},"业务规则",-1)),_hoisted_2$a=_withScopeId$2(()=>vue.createElementVNode("div",{style:{"padding-bottom":"10px","font-size":"11px"}}," 添加业务规则可以规范化表单数据录入。当满足条件时,显示、隐藏、更改字段属性。 ",-1)),_hoisted_3$8={style:{"padding-top":"10px","font-size":"12px !important"}},_hoisted_4$6=["onClick"],_hoisted_5$5=_withScopeId$2(()=>vue.createElementVNode("span",{style:{"padding-left":"15px"}},"时",-1)),_hoisted_6$4={style:{right:"10px",position:"absolute"}},_hoisted_7$2=["onClick"],_sfc_main$A=vue.defineComponent({__name:"FormSettingIndex",setup(H){const C=useFormStore(),W=vue.ref(""),U=vue.ref(!1);let K=vue.ref({name:"",ruleList:[],actionList:[]}),G=vue.ref(!1);function Q(te){W.value="业务规则",K.value={name:"",ruleList:[],actionList:[]},U.value=!0}function Z(te){W.value="业务规则",K.value=te,G.value=!0,U.value=!0}function X(){U.value=!1}function ee(te){C.formData.config.formSetting.splice(C.formData.config.formSetting.indexOf(te),1)}return(te,ne)=>{const ie=vue.resolveComponent("a-button"),oe=vue.resolveComponent("a-col"),re=vue.resolveComponent("a-row"),se=vue.resolveComponent("a-divider");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[_hoisted_1$h,_hoisted_2$a,vue.createVNode(ie,{onClick:ne[0]||(ne[0]=ae=>Q()),type:"primary",icon:vue.h(vue.unref(PlusOutlined$1)),block:""},{default:vue.withCtx(()=>[vue.createTextVNode(" 添加规则 ")]),_:1},8,["icon"]),vue.createElementVNode("div",_hoisted_3$8,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).formData.config.formSetting,ae=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",{onClick:le=>Z(ae)},[vue.createVNode(re,null,{default:vue.withCtx(()=>[vue.createVNode(oe,{span:"6",style:{"text-align":"right",color:"#9e9e9e"}},{default:vue.withCtx(()=>[vue.createTextVNode("当满足条件")]),_:1}),vue.createVNode(oe,{span:"17",offset:"1"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ae.ruleList,le=>(vue.openBlock(),vue.createElementBlock("span",null,vue.toDisplayString(le.matchType)+"   "+vue.toDisplayString(le.title)+"   "+vue.toDisplayString(le.ruleType)+"   "+vue.toDisplayString(le.ruleValue),1))),256)),_hoisted_5$5]),_:2},1024)]),_:2},1024),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ae.actionList,(le,ce)=>(vue.openBlock(),vue.createBlock(re,null,{default:vue.withCtx(()=>[vue.createVNode(oe,{span:"6",style:{"text-align":"right",color:"#9e9e9e"}},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(le.actionType),1)]),_:2},1024),vue.createVNode(oe,{span:"17",offset:"1"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(le.actionField.join(", ")),1)]),_:2},1024)]),_:2},1024))),256))],8,_hoisted_4$6),vue.createElementVNode("div",_hoisted_6$4,[vue.createElementVNode("a",{onClick:le=>ee(ae)},"删除",8,_hoisted_7$2)]),vue.createVNode(se,{dashed:""})]))),256))]),U.value?(vue.openBlock(),vue.createBlock(FormSetting,{key:0,open:U.value,title:W.value,onOnClose:X,data:vue.unref(K),isedit:vue.unref(G)},null,8,["open","title","data","isedit"])):vue.createCommentVNode("",!0)],64)}}}),FormSettingIndex_vue_vue_type_style_index_0_scoped_9462cb24_lang="",CFormSettingIndex=_export_sfc(_sfc_main$A,[["__scopeId","data-v-9462cb24"]]),FormSettingIndex=Object.freeze(Object.defineProperty({__proto__:null,default:CFormSettingIndex},Symbol.toStringTag,{value:"Module"})),_sfc_main$z=vue.defineComponent({__name:"Tabs",props:{configData:{type:Object,default:{}}},setup(H){function C(){}function W(){}return(U,K)=>{const G=vue.resolveComponent("a-input"),Q=vue.resolveComponent("a-form-item"),Z=vue.resolveComponent("a-radio-button"),X=vue.resolveComponent("a-radio-group"),ee=vue.resolveComponent("a-textarea"),te=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(te,{class:"tabs-properties",layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(Q,{label:"宽度"},{default:vue.withCtx(()=>[vue.createVNode(G,{value:H.configData.width,"onUpdate:value":K[0]||(K[0]=ne=>H.configData.width=ne)},null,8,["value"])]),_:1}),vue.createVNode(Q,{label:"卡片样式"},{default:vue.withCtx(()=>[vue.createVNode(X,{value:H.configData.tabType,"onUpdate:value":K[1]||(K[1]=ne=>H.configData.tabType=ne)},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:"line"},{default:vue.withCtx(()=>[vue.createTextVNode("默认")]),_:1}),vue.createVNode(Z,{value:"card"},{default:vue.withCtx(()=>[vue.createTextVNode("卡片")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode(Q,{label:"子Tab属性"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(VueDraggableNext),{list:H.configData.panes,animation:"300",handle:".ant-input-group-addon",onStart:C,onEnd:W},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.panes,(ne,ie)=>(vue.openBlock(),vue.createBlock(G,{value:ne.title,"onUpdate:value":oe=>ne.title=oe,style:{"margin-bottom":"5px"}},{addonBefore:vue.withCtx(()=>[vue.createVNode(vue.unref(MenuOutlined$1))]),_:2},1032,["value","onUpdate:value"]))),256))]),_:1},8,["list"])]),_:1}),vue.createVNode(Q,{label:"切换面板事件"},{default:vue.withCtx(()=>[vue.createVNode(G,{value:H.configData.changeEvent,"onUpdate:value":K[2]||(K[2]=ne=>H.configData.changeEvent=ne)},null,8,["value"])]),_:1}),vue.createVNode(Q,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(ee,{value:H.configData.extended,"onUpdate:value":K[3]||(K[3]=ne=>H.configData.extended=ne),rows:5},null,8,["value"])]),_:1})]),_:1})}}}),Tabs_vue_vue_type_style_index_0_scoped_8924aeef_lang="",CTabs=_export_sfc(_sfc_main$z,[["__scopeId","data-v-8924aeef"]]),Tabs=Object.freeze(Object.defineProperty({__proto__:null,default:CTabs},Symbol.toStringTag,{value:"Module"})),_sfc_main$y=vue.defineComponent({__name:"Collapse",props:{configData:{type:Object,default:{}}},setup(H){return vue.ref(""),(C,W)=>{const U=vue.resolveComponent("a-input"),K=vue.resolveComponent("a-form-item"),G=vue.resolveComponent("a-select-option"),Q=vue.resolveComponent("a-select"),Z=vue.resolveComponent("a-radio-button"),X=vue.resolveComponent("a-radio-group"),ee=vue.resolveComponent("a-switch"),te=vue.resolveComponent("a-textarea"),ne=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(ne,{class:"collapse-properties",layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(K,{label:"宽度"},{default:vue.withCtx(()=>[vue.createVNode(U,{value:H.configData.width,"onUpdate:value":W[0]||(W[0]=ie=>H.configData.width=ie)},null,8,["value"])]),_:1}),vue.createVNode(K,{label:"标题"},{default:vue.withCtx(()=>[vue.createVNode(U,{value:H.configData.header,"onUpdate:value":W[1]||(W[1]=ie=>H.configData.header=ie)},null,8,["value"])]),_:1}),vue.createVNode(K,{label:"样式"},{default:vue.withCtx(()=>[vue.createVNode(Q,{value:H.configData.classname,"onUpdate:value":W[2]||(W[2]=ie=>H.configData.classname=ie)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)("class"),(ie,oe)=>(vue.openBlock(),vue.createBlock(G,{value:ie.value},{default:vue.withCtx(()=>[vue.createTextVNode(" 样式"+vue.toDisplayString(oe+1),1)]),_:2},1032,["value"]))),256))]),_:1},8,["value"])]),_:1}),vue.createVNode(K,{label:"触发折叠方式"},{default:vue.withCtx(()=>[vue.createVNode(X,{value:H.configData.collapseType,"onUpdate:value":W[3]||(W[3]=ie=>H.configData.collapseType=ie)},{default:vue.withCtx(()=>[vue.createVNode(Z,{value:"row"},{default:vue.withCtx(()=>[vue.createTextVNode("默认")]),_:1}),vue.createVNode(Z,{value:"icon"},{default:vue.withCtx(()=>[vue.createTextVNode("按钮")]),_:1}),vue.createVNode(Z,{value:"header"},{default:vue.withCtx(()=>[vue.createTextVNode("标题")]),_:1})]),_:1},8,["value"])]),_:1}),vue.createVNode(K,{label:"是否默认折叠"},{default:vue.withCtx(()=>[vue.createVNode(ee,{checked:H.configData.defaultCollapse,"onUpdate:checked":W[4]||(W[4]=ie=>H.configData.defaultCollapse=ie)},null,8,["checked"])]),_:1}),vue.createVNode(K,{label:"是否显示箭头"},{default:vue.withCtx(()=>[vue.createVNode(ee,{checked:H.configData.showArrow,"onUpdate:checked":W[5]||(W[5]=ie=>H.configData.showArrow=ie)},null,8,["checked"])]),_:1}),vue.createVNode(K,{label:"其他扩展"},{default:vue.withCtx(()=>[vue.createVNode(te,{value:H.configData.extended,"onUpdate:value":W[6]||(W[6]=ie=>H.configData.extended=ie),rows:3},null,8,["value"])]),_:1})]),_:1})}}}),Collapse=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$y},Symbol.toStringTag,{value:"Module"})),extendProperties$1=[{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:3}],headerProperties$1=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"样式",bind:"classname",type:"dic",placeholder:"",code:"class"},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]},{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:"5"}],labelProperties=[{title:"标题",bind:"name",type:"textarea",placeholder:"",rows:3,required:!0},{title:"是否必填",bind:"required",type:"switch",placeholder:""},{title:"大小",bind:"font",type:"inputnumber",placeholder:"",min:10,max:80},{title:"颜色",bind:"color",type:"input",placeholder:""},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]},{title:"样式扩展",bind:"cssextended",type:"textarea",placeholder:"",rows:3},...extendProperties$1],titleProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0}],baseProperties$1=[{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"默认值",bind:"defaultValue",type:"input",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"}],selectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!0},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"字典选项",bind:"dictType",type:"dicall",placeholder:""},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],btnProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!1},{title:"图标",bind:"beforeIcon",type:"iconselect",placeholder:""},{title:"按钮类型",bind:"buttonType",type:"buttonType",placeholder:""},...baseProperties$1,...extendProperties$1],radioProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"选项",bind:"defaultValue",type:"radio",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"操作属性",type:"czsx",options:["隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],checkProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"选项",bind:"defaultValue",type:"checkbox",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"操作属性",type:"czsx",options:["隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"pro"},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],inputProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏","去边框"]},{title:"前缀",bind:"prefix",type:"input",placeholder:""},{title:"后缀",bind:"suffix",type:"input",placeholder:""},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],textareaProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"行数",bind:"rows",type:"inputnumber",placeholder:"",min:1,max:10},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],inputNumberProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},...baseProperties$1,{title:"最小值",bind:"min",type:"inputNumberConfig",placeholder:""},{title:"最大值",bind:"max",type:"inputNumberConfig",placeholder:""},{title:"前缀",bind:"addonBefore",type:"input",placeholder:""},{title:"后缀",bind:"addonAfter",type:"input",placeholder:""},{title:"步长",bind:"step",type:"inputnumber",min:0,max:"Infinity",placeholder:""},{title:"精度",bind:"precision",type:"inputnumber",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],treeSelectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!1},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"数据来源",bind:"treedic",type:"treedic",placeholder:"",required:!0},{title:"多选标点",bind:"punctuation",type:"input",placeholder:"可填写变量名或者字符串,默认逗号"},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur","change"]},...extendProperties$1],cascaderProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"数据来源",bind:"casdic",type:"casdic",placeholder:"",required:!0},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],tableSelectProperties=[...titleProperties,{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"同步更新",bind:"syncField",type:"syncupdate",placeholder:"",required:!1},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"下拉表格宽度",bind:"dropMenuWidth",type:"input",placeholder:""},{title:"下拉表格高度",bind:"dropMenuHeight",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"数据来源",bind:"tableSource",type:"input",placeholder:"",required:!0},{title:"选中字段绑定(唯一)",bind:"tableKeyName",type:"input",placeholder:"",required:!0},{title:"显示字段绑定",bind:"tableLabelName",type:"input",placeholder:"",required:!0},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},{title:"校验",bind:"guize",type:"guize",placeholder:"",mode:"simple"},{title:"扩展事件",type:"eventextended",options:["blur","rowChange"]},...extendProperties$1],imageProperties=[...titleProperties,{title:"绑定查询",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"绑定更新",bind:"writeField",type:"dataupdate",placeholder:"",required:!0,mode:"tags"},{title:"静态地址",bind:"static",type:"input",placeholder:""},{title:"图片宽度",bind:"width",type:"input",placeholder:""},{title:"图片高度",bind:"height",type:"input",placeholder:""},...extendProperties$1],dateProperties=[...titleProperties,{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"类型",bind:"dateType",type:"select",placeholder:"",options:[{label:"年份",value:"year"},{label:"月份",value:"month"},{label:"日期",value:"date"}]},...baseProperties$1,{title:"操作属性",type:"czsx",options:["只读","显示清除按钮","隐藏"]},{title:"扩展事件",type:"eventextended",options:["blur"]},...extendProperties$1],childFormProperties=[{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"页面地址",bind:"filePath",type:"input",placeholder:"",required:!0},...extendProperties$1],baseProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"数据绑定",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"查询模式",bind:"searchType",type:"searchType",placeholder:"",required:!0},{title:"占位内容",bind:"placeholder",type:"input",placeholder:""},{title:"默认值",bind:"defaultValue",type:"input",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""}],extendProperties=[{title:"其它扩展",bind:"extended",type:"textarea",placeholder:"",rows:3}],rinputProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},{title:"前缀",bind:"prefix",type:"input",placeholder:""},{title:"后缀",bind:"suffix",type:"input",placeholder:""},...extendProperties],rtextareaProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},{title:"行数",bind:"rows",type:"inputnumber",placeholder:"",min:1,max:10},...extendProperties],rselectProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"数据绑定",bind:"model",type:"dataselect",placeholder:"",required:!0},{title:"查询模式",bind:"searchType",type:"searchType",placeholder:"",required:!0},{title:"宽度",bind:"width",type:"input",placeholder:""},{title:"允许多选",bind:"multiple",type:"switch",placeholder:""},{title:"字典选项",bind:"dictType",type:"dicall",placeholder:""},{title:"操作属性",type:"czsx",options:["只读","隐藏"]},...extendProperties],cdateProperties=[...baseProperties,{title:"操作属性",type:"czsx",options:["只读","清除","隐藏"]},...extendProperties],cbtnProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"图标",bind:"beforeIcon",type:"iconselect",placeholder:""},{title:"按钮类型",bind:"buttonType",type:"buttonType",placeholder:""},{title:"宽度",bind:"width",type:"input",placeholder:""},...extendProperties],headerProperties=[{title:"标题",bind:"name",type:"input",placeholder:"",required:!0},{title:"样式",bind:"classname",type:"dic",placeholder:"",code:"class"},{title:"位置",bind:"align",type:"radiogroup",children:[{title:"居左",value:"left"},{title:"居中",value:"center"},{title:"居右",value:"right"}]}],_withScopeId$1=H=>(vue.pushScopeId("data-v-71c699a3"),H=H(),vue.popScopeId(),H),_hoisted_1$g={key:6,class:"radio-properties"},_hoisted_2$9={key:7,class:"radio-properties"},_hoisted_3$7={key:8},_hoisted_4$5={key:9},_hoisted_5$4={key:10},_hoisted_6$3={key:14},_hoisted_7$1=_withScopeId$1(()=>vue.createElementVNode("span",{style:{color:"#1890ff"}},"必填",-1)),_hoisted_8$1={key:0,style:{"margin-top":"5px"}},_hoisted_9$1=_withScopeId$1(()=>vue.createElementVNode("span",{style:{color:"#1890ff"}},"高级",-1)),_hoisted_10$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_11$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_12$1=_withScopeId$1(()=>vue.createElementVNode("br",null,null,-1)),_hoisted_13$1={key:15},_hoisted_14$1={key:16},_hoisted_15$1={class:"icon-select-modal"},_hoisted_16$1=["onClick"],_hoisted_17$1={key:19,style:{display:"flex","align-items":"center"}},_hoisted_18={key:20},_hoisted_19=_withScopeId$1(()=>vue.createElementVNode("span",null,"只针对默认生成方法中扩展事件",-1)),_sfc_main$x=vue.defineComponent({__name:"Properties",props:{configData:{type:Object,default:{}}},setup(H){const C=useUserStore(),W=useDataStore(),U=vue.computed(()=>Object.keys(Object.assign({"/src/assets/svg/arrow.svg":()=>Promise.resolve().then(()=>arrow$1),"/src/assets/svg/btn.svg":()=>Promise.resolve().then(()=>btn$1),"/src/assets/svg/cascader.svg":()=>Promise.resolve().then(()=>cascader$1),"/src/assets/svg/checkbox.svg":()=>Promise.resolve().then(()=>checkbox$1),"/src/assets/svg/clear.svg":()=>Promise.resolve().then(()=>clear$1),"/src/assets/svg/code.svg":()=>Promise.resolve().then(()=>code$1),"/src/assets/svg/collapse.svg":()=>Promise.resolve().then(()=>collapse$1),"/src/assets/svg/date.svg":()=>Promise.resolve().then(()=>date$1),"/src/assets/svg/empty.svg":()=>Promise.resolve().then(()=>empty$1),"/src/assets/svg/formvue.svg":()=>Promise.resolve().then(()=>formvue$1),"/src/assets/svg/fx.svg":()=>Promise.resolve().then(()=>fx$1),"/src/assets/svg/grid.svg":()=>Promise.resolve().then(()=>grid$1),"/src/assets/svg/header.svg":()=>Promise.resolve().then(()=>header$1),"/src/assets/svg/image.svg":()=>Promise.resolve().then(()=>image$1),"/src/assets/svg/ing.svg":()=>Promise.resolve().then(()=>ing$1),"/src/assets/svg/input.svg":()=>Promise.resolve().then(()=>input$1),"/src/assets/svg/inputnumber.svg":()=>Promise.resolve().then(()=>inputnumber$1),"/src/assets/svg/json.svg":()=>Promise.resolve().then(()=>json$1),"/src/assets/svg/label.svg":()=>Promise.resolve().then(()=>label$1),"/src/assets/svg/placeholder.svg":()=>Promise.resolve().then(()=>placeholder$1),"/src/assets/svg/preview.svg":()=>Promise.resolve().then(()=>preview$1),"/src/assets/svg/radio.svg":()=>Promise.resolve().then(()=>radio$1),"/src/assets/svg/report.svg":()=>Promise.resolve().then(()=>report$1),"/src/assets/svg/save.svg":()=>Promise.resolve().then(()=>save$1),"/src/assets/svg/select.svg":()=>Promise.resolve().then(()=>select$1),"/src/assets/svg/table.svg":()=>Promise.resolve().then(()=>table$1),"/src/assets/svg/tableselect.svg":()=>Promise.resolve().then(()=>tableselect$1),"/src/assets/svg/tabs.svg":()=>Promise.resolve().then(()=>tabs$1),"/src/assets/svg/textarea.svg":()=>Promise.resolve().then(()=>textarea$1),"/src/assets/svg/tree.svg":()=>Promise.resolve().then(()=>tree$1),"/src/assets/svg/xx.svg":()=>Promise.resolve().then(()=>xx$1)})).map(me=>{let ve=me.split("/");return ve[ve.length-1].split(".")[0]}));let K=vue.ref(""),G=vue.computed(()=>W.getSelectData.filter(pe=>pe.isList==0)),Q=vue.computed(()=>W.getUpdateData.filter(pe=>pe.isList==0)),Z=vue.ref(!1);const X=H;function ee(){const pe=X.configData.model;Q.value.filter(ve=>ve.value.indexOf(pe)!==-1).length>0&&(X.configData.writeField=[pe])}function te(pe){let me=X.configData.options.indexOf(pe);me!==-1&&X.configData.options.splice(me,1)}vue.ref(!1);let ne=vue.ref([]),ie=X.configData.type;if(X.configData.compType=="report")switch(ie){case"input":ne.value=rinputProperties;break;case"textarea":ne.value=rtextareaProperties;break;case"select":ne.value=rselectProperties;break;case"datepicker":case"rangepicker":ne.value=cdateProperties;break;case"button":ne.value=cbtnProperties;break}else switch(ie){case"label":ne.value=labelProperties;break;case"header":ne.value=headerProperties$1;break;case"button":ne.value=btnProperties;break;case"select":ne.value=selectProperties;break;case"treeselect":ne.value=treeSelectProperties;break;case"radio":ne.value=radioProperties;break;case"checkbox":ne.value=checkProperties;break;case"input":ne.value=inputProperties;break;case"inputnumber":ne.value=inputNumberProperties;break;case"textarea":ne.value=textareaProperties;break;case"datepicker":case"rangepicker":ne.value=dateProperties;break;case"cascader":ne.value=cascaderProperties;break;case"tableselect":ne.value=tableSelectProperties;break;case"childform":ne.value=childFormProperties;break;case"image":ne.value=imageProperties;break;default:ne.value=[...titleProperties,...baseProperties$1,...extendProperties$1];break}let re=vue.ref("");vue.ref(""),vue.ref("");function se(pe){re.value=pe}vue.ref(X.configData.rules);function ae(pe,me){X.configData.rules.push({type:pe,message:"必须填写此项",ruleType:X.configData.ruleType})}function le(pe){pe.target.checked&&(X.configData.ruleType==null?X.configData.ruleType="data":X.configData.ruleType)}let ce=vue.reactive({type:null,required:null});vue.watch(()=>X.configData.dataTypeCheck,(pe,me)=>{pe||(ce.type=null,X.configData.dataType=null),de()}),vue.watch(()=>X.configData.dataTypeMessage,(pe,me)=>{ce.type={type:X.configData.dataType,message:pe,ruleType:X.configData.ruleType},de()}),vue.watch(()=>X.configData.dataType,(pe,me)=>{pe?ce.type={type:pe,message:X.configData.dataTypeMessage,ruleType:X.configData.ruleType}:ce.type=null,de()}),vue.watch(()=>X.configData.ruleType,(pe,me)=>{ce.type=null,X.configData.dataType=null,de()}),vue.watch(()=>X.configData.required,(pe,me)=>{pe?ce.required={type:"required",message:"不能为空"}:ce.required=null,de()});function de(){X.configData.rules=[],Object.keys(ce).forEach(pe=>{ce[pe]&&X.configData.rules.push(ce[pe])})}function ue(){X.configData.options.push({label:"新选项",value:"新选项"})}function he(pe,me){X.configData.options[me].label=pe.value}function fe(pe){K.value=pe,Z.value=!0}function ge(){let pe=ne.value.find(me=>me.type=="iconselect");pe&&X.configData&&X.configData[pe.bind]!==void 0&&(X.configData[pe.bind]=K.value),Z.value=!1}return(pe,me)=>{const ve=vue.resolveComponent("a-input"),be=vue.resolveComponent("a-textarea"),ye=vue.resolveComponent("a-input-number"),Ce=vue.resolveComponent("a-radio-button"),ke=vue.resolveComponent("a-radio-group"),Se=vue.resolveComponent("a-switch"),De=vue.resolveComponent("a-select"),Ne=vue.resolveComponent("a-radio"),Ie=vue.resolveComponent("a-form-item"),Ee=vue.resolveComponent("a-select-option"),Te=vue.resolveComponent("a-checkbox"),we=vue.resolveComponent("a-checkbox-group"),xe=vue.resolveComponent("svg-icon"),Me=vue.resolveComponent("a-modal"),Le=vue.resolveComponent("a-divider"),We=vue.resolveComponent("a-tooltip"),ze=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(ze,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(ne),($e,je)=>(vue.openBlock(),vue.createBlock(Ie,{label:$e.title,rules:[{required:$e.required}]},{default:vue.withCtx(()=>[$e.type=="input"?(vue.openBlock(),vue.createBlock(ve,{key:0,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,placeholder:$e.placeholder},null,8,["value","onUpdate:value","placeholder"])):$e.type=="textarea"?(vue.openBlock(),vue.createBlock(be,{key:1,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,placeholder:"",rows:$e.rows},null,8,["value","onUpdate:value","rows"])):$e.type=="inputnumber"?(vue.openBlock(),vue.createBlock(ye,{key:2,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,min:$e.min,max:$e.max},null,8,["value","onUpdate:value","min","max"])):$e.type=="radiogroup"?(vue.openBlock(),vue.createBlock(ke,{key:3,value:H.configData.align,"onUpdate:value":me[0]||(me[0]=Ae=>H.configData.align=Ae)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($e.children,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ce,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.title),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value"])):$e.type=="switch"?(vue.openBlock(),vue.createBlock(Se,{key:4,checked:H.configData[$e.bind],"onUpdate:checked":Ae=>H.configData[$e.bind]=Ae},null,8,["checked","onUpdate:checked"])):$e.type=="select"?(vue.openBlock(),vue.createBlock(De,{key:5,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"",options:$e.options},null,8,["value","onUpdate:value","options"])):$e.type=="radio"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.createVNode(ke,{value:H.configData.optionsType,"onUpdate:value":me[1]||(me[1]=Ae=>H.configData.optionsType=Ae),onChange:Ae=>H.configData[$e.bind]="","button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"static"},{default:vue.withCtx(()=>[vue.createTextVNode("静态数据")]),_:1}),vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1})]),_:2},1032,["value","onChange"]),H.configData.optionsType=="static"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(ke,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.options,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ne,{value:Ae.value,style:{"padding-bottom":"8px"}},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:Ae.value,"onUpdate:value":Ve=>Ae.value=Ve,placeholder:"选项名称",style:{width:"60%"},onChange:Ve=>he(Ae,Pe)},null,8,["value","onUpdate:value","onChange"]),vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:Ve=>te(Ae),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4","padding-left":"10px"}},null,8,["onClick"])]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"]),vue.createElementVNode("a",{style:{"margin-bottom":"10px",display:"block"},onClick:ue},"添加选项"),vue.createVNode(Ie,{style:{"margin-bottom":"0"},label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},null,8,["value","onUpdate:value"])]),_:2},1024)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[2]||(me[2]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.createVNode(Ie,{label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(H.configData.dic),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])]),_:2},1024)],64))])):$e.type=="checkbox"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$9,[vue.createVNode(ke,{value:H.configData.optionsType,"onUpdate:value":me[3]||(me[3]=Ae=>H.configData.optionsType=Ae),onChange:Ae=>H.configData[$e.bind]=void 0,"button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"static"},{default:vue.withCtx(()=>[vue.createTextVNode("静态数据")]),_:1}),vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1})]),_:2},1032,["value","onChange"]),H.configData.optionsType=="static"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(we,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.configData.options,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Te,{value:Ae.value,style:{"padding-bottom":"8px"}},{default:vue.withCtx(()=>[vue.createVNode(ve,{value:Ae.value,"onUpdate:value":Ve=>Ae.value=Ve,placeholder:"选项名称",style:{width:"60%"},onChange:Ve=>he(Ae,Pe)},null,8,["value","onUpdate:value","onChange"]),vue.createVNode(vue.unref(MinusCircleFilled$1),{onClick:Ve=>te(Ae),style:{"font-size":"16px",color:"#f56c6c","border-color":"#fbc4c4","padding-left":"10px"}},null,8,["onClick"])]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"]),vue.createElementVNode("a",{onClick:ue},"添加选项")],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[4]||(me[4]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.createVNode(Ie,{label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,mode:"multiple","allow-clear":""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(H.configData.dic),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])]),_:2},1024)],64))])):$e.type=="dicall"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$7,[vue.createVNode(ke,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,onChange:me[5]||(me[5]=Ae=>H.configData.dic=""),"button-style":"solid",style:{"margin-bottom":"10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("数据字典")]),_:1}),vue.createVNode(Ce,{value:"dynamic"},{default:vue.withCtx(()=>[vue.createTextVNode("动态字典")]),_:1})]),_:2},1032,["value","onUpdate:value"]),H.configData[$e.bind]=="dynamic"?(vue.openBlock(),vue.createBlock(De,{key:0,"show-search":"","allow-clear":"",value:H.configData.dic,"onUpdate:value":me[6]||(me[6]=Ae=>H.configData.dic=Ae),options:vue.unref(W).getSelectData},null,8,["value","options"])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(De,{value:H.configData.dic,"onUpdate:value":me[7]||(me[7]=Ae=>H.configData.dic=Ae),onChange:se,style:{"margin-bottom":"10px"},"show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllDicts,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label+"("+Ae.value+")",value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label+"("+Ae.value+")"),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["value"]),vue.unref(re)!=""?(vue.openBlock(),vue.createBlock(Ie,{key:0,label:"默认值"},{default:vue.withCtx(()=>[vue.createVNode(De,{checked:H.configData[$e.bind],"onUpdate:checked":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)(vue.unref(re)),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["checked","onUpdate:checked"])]),_:2},1024)):vue.createCommentVNode("",!0)],64))])):$e.type=="treedic"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$5,[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"","show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getAllCategory,(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label,value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["label","value"]))),256))]),_:2},1032,["value","onUpdate:value"])])):$e.type=="casdic"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$4,[vue.createVNode(De,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,"allow-clear":"","show-search":"",optionFilterProp:"label"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(casDicts),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{label:Ae.label,value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["label","value"]))),256))]),_:2},1032,["value","onUpdate:value"])])):$e.type=="dic"?(vue.openBlock(),vue.createBlock(De,{key:11,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(getDictItemsByCode)($e.code),(Ae,Pe)=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.label),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onUpdate:value"])):$e.type=="dataselect"||$e.type=="syncupdate"?(vue.openBlock(),vue.createBlock(De,{key:12,"show-search":"",allowClear:"",mode:$e.mode,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,options:vue.unref(G),onChange:ee},null,8,["mode","value","onUpdate:value","options"])):$e.type=="dataupdate"?(vue.openBlock(),vue.createBlock(De,{key:13,mode:$e.mode,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,options:vue.unref(Q)},null,8,["mode","value","onUpdate:value","options"])):$e.type=="guize"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$3,[vue.createVNode(Te,{checked:H.configData.required,"onUpdate:checked":me[8]||(me[8]=Ae=>H.configData.required=Ae)},{default:vue.withCtx(()=>[_hoisted_7$1]),_:1},8,["checked"]),$e.mode=="pro"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$1,[vue.createVNode(Te,{checked:H.configData.dataTypeCheck,"onUpdate:checked":me[9]||(me[9]=Ae=>H.configData.dataTypeCheck=Ae),onChange:le},{default:vue.withCtx(()=>[_hoisted_9$1]),_:1},8,["checked"]),_hoisted_10$1,H.configData.dataTypeCheck?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(ke,{value:H.configData.ruleType,"onUpdate:value":me[10]||(me[10]=Ae=>H.configData.ruleType=Ae),"button-style":"solid",style:{margin:"5px 0 10px"}},{default:vue.withCtx(()=>[vue.createVNode(Ce,{value:"data"},{default:vue.withCtx(()=>[vue.createTextVNode("校验规则")]),_:1}),vue.createVNode(Ce,{value:"dynamic"},{default:vue.withCtx(()=>[vue.createTextVNode("动态规则")]),_:1}),vue.createVNode(Ce,{value:"custom"},{default:vue.withCtx(()=>[vue.createTextVNode("变量输入")]),_:1})]),_:1},8,["value"]),H.configData.ruleType=="data"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(De,{value:H.configData.dataType,"onUpdate:value":me[11]||(me[11]=Ae=>H.configData.dataType=Ae),onChange:ae,"allow-clear":"",style:{width:"100%"},placeholder:"请选择",disabled:!H.configData.dataTypeCheck},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C).getValidateRuleList,Ae=>(vue.openBlock(),vue.createBlock(Ee,{value:Ae.ruleCode},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(Ae.ruleName),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","disabled"]),_hoisted_11$1,_hoisted_12$1],64)):H.configData.ruleType=="dynamic"?(vue.openBlock(),vue.createBlock(De,{key:1,"show-search":"","allow-clear":"",value:H.configData.dataType,"onUpdate:value":me[12]||(me[12]=Ae=>H.configData.dataType=Ae),options:vue.unref(W).getSelectData,onChange:ae},null,8,["value","options"])):(vue.openBlock(),vue.createBlock(ve,{key:2,value:H.configData.dataType,"onUpdate:value":me[13]||(me[13]=Ae=>H.configData.dataType=Ae)},null,8,["value"]))],64)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)])):$e.type=="czsx"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$1,[$e.options.includes("只读")?(vue.openBlock(),vue.createBlock(Te,{key:0,checked:H.configData.disabled,"onUpdate:checked":me[14]||(me[14]=Ae=>H.configData.disabled=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("只读")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("清除")?(vue.openBlock(),vue.createBlock(Te,{key:1,checked:H.configData.clearable,"onUpdate:checked":me[15]||(me[15]=Ae=>H.configData.clearable=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("清除")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("隐藏")?(vue.openBlock(),vue.createBlock(Te,{key:2,checked:H.configData.hidden,"onUpdate:checked":me[16]||(me[16]=Ae=>H.configData.hidden=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("隐藏")]),_:1},8,["checked"])):vue.createCommentVNode("",!0),$e.options.includes("去边框")?(vue.openBlock(),vue.createBlock(Te,{key:3,checked:H.configData.bordered,"onUpdate:checked":me[17]||(me[17]=Ae=>H.configData.bordered=Ae)},{default:vue.withCtx(()=>[vue.createTextVNode("去边框")]),_:1},8,["checked"])):vue.createCommentVNode("",!0)])):$e.type=="iconselect"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$1,[vue.createVNode(ve,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,allowClear:"",readOnly:"",class:"icon-select"},{addonAfter:vue.withCtx(()=>[vue.createVNode(vue.unref(SettingOutlined$1),{onClick:Ae=>fe(H.configData[$e.bind])},null,8,["onClick"])]),_:2},1032,["value","onUpdate:value"]),vue.createVNode(Me,{open:vue.unref(Z),"onUpdate:open":me[18]||(me[18]=Ae=>vue.isRef(Z)?Z.value=Ae:Z=Ae),title:"图标选择",onOk:ge},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_15$1,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(U.value,(Ae,Pe)=>(vue.openBlock(),vue.createElementBlock("div",{onClick:Ve=>vue.isRef(K)?K.value=Ae:K=Ae,class:vue.normalizeClass(["icon-item",vue.unref(K)==Ae?"active":""])},[vue.createVNode(xe,{name:Ae,width:"20",height:"20",color:"rgba(0,0,0,0.85)"},null,8,["name"])],10,_hoisted_16$1))),256))])]),_:1},8,["open"])])):$e.type=="buttonType"?(vue.openBlock(),vue.createBlock(De,{key:17,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[vue.createVNode(Ee,{value:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("主按钮")]),_:1}),vue.createVNode(Ee,{value:"default"},{default:vue.withCtx(()=>[vue.createTextVNode("默认按钮")]),_:1}),vue.createVNode(Ee,{value:"dashed"},{default:vue.withCtx(()=>[vue.createTextVNode("虚线按钮")]),_:1}),vue.createVNode(Ee,{value:"link"},{default:vue.withCtx(()=>[vue.createTextVNode("链接按钮")]),_:1})]),_:2},1032,["value","onUpdate:value"])):$e.type=="searchType"?(vue.openBlock(),vue.createBlock(De,{key:18,value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae},{default:vue.withCtx(()=>[vue.createVNode(Ee,{value:"eq"},{default:vue.withCtx(()=>[vue.createTextVNode("精确查询")]),_:1}),vue.createVNode(Ee,{value:"like"},{default:vue.withCtx(()=>[vue.createTextVNode("模糊匹配")]),_:1}),vue.createVNode(Ee,{value:"between"},{default:vue.withCtx(()=>[vue.createTextVNode("区间查询")]),_:1})]),_:2},1032,["value","onUpdate:value"])):$e.type=="inputNumberConfig"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_17$1,[vue.createVNode(ye,{value:H.configData[$e.bind],"onUpdate:value":Ae=>H.configData[$e.bind]=Ae,disabled:H.configData[$e.bind+"Check"]},null,8,["value","onUpdate:value","disabled"]),vue.createVNode(Le,{type:"vertical"}),vue.createVNode(Te,{checked:H.configData[$e.bind+"Check"],"onUpdate:checked":Ae=>H.configData[$e.bind+"Check"]=Ae},{default:vue.withCtx(()=>[vue.createTextVNode("不限")]),_:2},1032,["checked","onUpdate:checked"])])):$e.type=="eventextended"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_18,[vue.createVNode(We,null,{title:vue.withCtx(()=>[_hoisted_19]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(ExclamationCircleOutlined$1),{style:{position:"absolute",top:"-25px",left:"55px"}})]),_:1}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($e.options,Ae=>(vue.openBlock(),vue.createBlock(ve,{"addon-before":Ae,value:H.configData[Ae+"Event"],"onUpdate:value":Pe=>H.configData[Ae+"Event"]=Pe,style:{"margin-bottom":"5px"}},null,8,["addon-before","value","onUpdate:value"]))),256))])):vue.createCommentVNode("",!0)]),_:2},1032,["label","rules"]))),256))]),_:1})}}}),Properties_vue_vue_type_style_index_0_scoped_71c699a3_lang="",CProperties=_export_sfc(_sfc_main$x,[["__scopeId","data-v-71c699a3"]]),Properties=Object.freeze(Object.defineProperty({__proto__:null,default:CProperties},Symbol.toStringTag,{value:"Module"})),_sfc_main$w=vue.defineComponent({__name:"FX",props:{configData:{type:Object,default:{}}},setup(H){const C=useDataStore(),W=useFormStore();let U=vue.computed(()=>C.getUpdateData.filter(ee=>ee.isList==0)),K=vue.ref("求和");const G=[{value:"sum",label:"求和"},{value:"avg",label:"平均值"}];let Q=vue.computed(()=>{let ee=[];return W.getFormDesignConfig.list.forEach(te=>{te.type=="inputnumber"?Z(ee,te):te.type=="grid"&&te.columns.forEach(ne=>{ne.list.forEach(ie=>{ie.type=="inputnumber"&&Z(ee,ie)})})}),ee});function Z(ee,te){ee.push({value:te.model,label:te.name})}function X(ee,te){K.value=te.label}return(ee,te)=>{const ne=vue.resolveComponent("a-input"),ie=vue.resolveComponent("a-form-item"),oe=vue.resolveComponent("a-select"),re=vue.resolveComponent("a-switch"),se=vue.resolveComponent("a-form");return vue.openBlock(),vue.createBlock(se,{layout:"vertical",autocomplete:"off"},{default:vue.withCtx(()=>[vue.createVNode(ie,{label:"标题"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.name,"onUpdate:value":te[0]||(te[0]=ae=>H.configData.name=ae),placeholder:"请输入标题"},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:"绑定更新",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{value:H.configData.writeField,"onUpdate:value":te[1]||(te[1]=ae=>H.configData.writeField=ae),options:vue.unref(U)},null,8,["value","options"])]),_:1}),vue.createVNode(ie,{label:"显示边框",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(re,{checked:H.configData.bordered,"onUpdate:checked":te[2]||(te[2]=ae=>H.configData.bordered=ae),"checked-children":"是","un-checked-children":"否"},null,8,["checked"])]),_:1}),vue.createVNode(ie,{label:"计算方式",rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{value:H.configData.account,"onUpdate:value":te[3]||(te[3]=ae=>H.configData.account=ae),options:G,onChange:X},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:vue.unref(K),rules:[{required:!0}]},{default:vue.withCtx(()=>[vue.createVNode(oe,{mode:"tags",value:H.configData.accountField,"onUpdate:value":te[4]||(te[4]=ae=>H.configData.accountField=ae),options:vue.unref(Q),style:{height:"auto"}},null,8,["value","options"])]),_:1},8,["label"]),vue.createVNode(ie,{label:"前缀"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.prefix,"onUpdate:value":te[5]||(te[5]=ae=>H.configData.prefix=ae)},null,8,["value"])]),_:1}),vue.createVNode(ie,{label:"后缀"},{default:vue.withCtx(()=>[vue.createVNode(ne,{value:H.configData.suffix,"onUpdate:value":te[6]||(te[6]=ae=>H.configData.suffix=ae)},null,8,["value"])]),_:1})]),_:1})}}}),FX=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$w},Symbol.toStringTag,{value:"Module"})),_hoisted_1$f={key:0},_sfc_main$v=vue.defineComponent({__name:"index",props:{configData:{type:Object,default:[]}},setup(H){let C=vue.ref("1");const W=H;return(U,K)=>{const G=vue.resolveComponent("a-button"),Q=vue.resolveComponent("a-tab-pane"),Z=vue.resolveComponent("a-tabs");return vue.openBlock(),vue.createBlock(Z,{activeKey:vue.unref(C),"onUpdate:activeKey":K[0]||(K[0]=X=>vue.isRef(C)?C.value=X:C=X),style:{height:"100%","overflow-y":"auto"}},{default:vue.withCtx(()=>[vue.createVNode(Q,{key:"1",tab:"字段属性"},{default:vue.withCtx(()=>[W.configData.length!=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$f,[vue.createVNode(G,{class:"btn-type-css",size:"small"},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(CheckCircleTwoTone$1),{"two-tone-color":"#1890ff"})]),default:vue.withCtx(()=>[vue.createTextVNode(" "+vue.toDisplayString(H.configData.type),1)]),_:1}),H.configData.type=="grid"?(vue.openBlock(),vue.createBlock(CGrid,{key:0,configData:H.configData},null,8,["configData"])):H.configData.type=="table"?(vue.openBlock(),vue.createBlock(_sfc_main$G,{key:1,configData:H.configData},null,8,["configData"])):H.configData.type=="col"?(vue.openBlock(),vue.createBlock(_sfc_main$J,{key:2,configData:H.configData},null,8,["configData"])):H.configData.type=="tabs"?(vue.openBlock(),vue.createBlock(CTabs,{key:3,configData:H.configData},null,8,["configData"])):H.configData.type=="collapse"?(vue.openBlock(),vue.createBlock(_sfc_main$y,{key:4,configData:H.configData},null,8,["configData"])):H.configData.type=="fx"?(vue.openBlock(),vue.createBlock(_sfc_main$w,{key:5,configData:H.configData},null,8,["configData"])):(vue.openBlock(),vue.createBlock(CProperties,{configData:H.configData,key:H.configData.type},null,8,["configData"]))])):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(Q,{key:"2",tab:"表单属性","force-render":""},{default:vue.withCtx(()=>[vue.createVNode(CForm)]),_:1}),vue.createVNode(Q,{key:"3",tab:"表单设置","force-render":""},{default:vue.withCtx(()=>[vue.createVNode(CFormSettingIndex)]),_:1})]),_:1},8,["activeKey"])}}}),index_vue_vue_type_style_index_0_scoped_9cd4495a_lang="",formConfig$1=_export_sfc(_sfc_main$v,[["__scopeId","data-v-9cd4495a"]]),index$8=Object.freeze(Object.defineProperty({__proto__:null,default:formConfig$1},Symbol.toStringTag,{value:"Module"})),_hoisted_1$e={class:"container"},_sfc_main$u=vue.defineComponent({__name:"Code",props:{code:{type:String,default:""},language:{type:String,default:""}},setup(H){const C=H,W=useFormStore();let U=vue.ref("");return vue.onMounted(()=>{C.code!=null?U.value=C.code:U.value=JSON.stringify([W.formData],null," ")}),(K,G)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,[vue.createVNode(monacoEditor,{modelValue:vue.unref(U),"onUpdate:modelValue":G[0]||(G[0]=Q=>vue.isRef(U)?U.value=Q:U=Q),language:H.language,height:"500px"},null,8,["modelValue","language"])]))}}),Code=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$u},Symbol.toStringTag,{value:"Module"})),tableSelectProps={value:{type:[String,Number,Array]},mode:{type:String,default:""},keyName:{type:String,default:"name"}};function validateRequired(H){let C="不能为空";if(H!==void 0){if(typeof H=="string"){if(H.match(/^\s*$/))return C}else if(Array.isArray(H))return H.filter(U=>{if(U){if(typeof U=="string"&&U.trim())return U;if(typeof U=="object")return U}}).length?"":C;return""}else return C}function validateReg(H,C,W){let U,K=!0;switch(H){case"number":U=/^-?\d+(\.?\d+|\d?)$/;break;case"email":U=/^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/;break;case"lxdh":U=/^1(3|4|5|7|8)\d{9}$|^(0\d{2}-\d{8}(-\d{1,4})?)|(0\d{3}-\d{7,8}(-\d{1,4})?)$/;break}return U&&!W.match(U)&&(K=!1),K?"":C}let validateInfos=vue.reactive({});async function getData(H,C){C.value=!1;const W="/imaginform/zrzy-form/generate/select";await defHttp.post({url:W,data:{formId:64,param:{code:"liulu"}}},{withToken:!1}).then(U=>{U.result!="{}"&&(H.value=JSON.parse(U.result)),C.value=!0})}function onSubmitForm(H,C){let W,U=H.querySelectorAll("[write-field]");console.log("formDom",U);for(let K=0;K<U.length;K++)validateFun(U[K]);if(C&&C(),W=isValidateSuccess(),W){console.log("校验成功");let K={};return K=getUpdateData(U),K}else return!1}function getUpdateData(H){let C={};for(let W=0;W<H.length;W++){let U=getDomValue(H[W]);const G=getDomAttribute(H[W],"write-field").split(";");for(let Q=0;Q<G.length;Q++){const Z=G[Q].split("."),X=Z[0];C[X]=C[X]?C[X]:{},C[X][Z[1]]=U}}return C}function getDomValue(H,C,W){let U;if(W)U=W;else if(C)U=H.target.value;else{let K=H.classList;if(K.contains("ant-select"))U=H.__vueParentComponent.parent.props.value;else if(K.contains("ant-checkbox-group")||K.contains("ant-radio-group"))U=H.__vueParentComponent.props.value;else if(K.contains("ant-picker-range-custom")){let G=Array.from(H.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker-range"));U=Array.from(G.childNodes).filter(Z=>Z.classList&&Z.classList.contains("ant-picker-input")).map(Z=>Z.childNodes[0].value)}else if(K.contains("ant-picker-custom")){let G=Array.from(H.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker"));U=Array.from(G.childNodes).find(Z=>Z.classList&&Z.classList.contains("ant-picker-input")).childNodes[0].value}else U=H.value}return U}function getDomAttribute(H,C,W){let U;if(W){let K=H.target.classList,G=H.target.parentNode.classList;K.contains("ant-select-selection-search-input")||G.contains("ant-picker-input")?U=H.target.parentNode.parentNode.parentNode.__vnode.props[C]:U=H.target.__vnode.props[C]}else U=H.target?H.target.__vnode.props[C]:H.__vnode.props[C];return U}function validateFun(H,C,W){let U=getDomValue(H,C,W),K=getDomAttribute(H,"rules",C),G=getDomAttribute(H,"write-field",C),Q="";if(K&&G){for(let Z=0;Z<K.length;Z++)K[Z].type=="required"&&(Q+=validateRequired(U,K[Z].msg)),Q.length==0&&(Q+=validateReg(K[Z].type,K[Z].msg,U));validateInfos[G]||(validateInfos[G]={}),Q.length>0?(validateInfos[G].validateStatus="error",validateInfos[G].help=Q):(validateInfos[G].validateStatus="validating",validateInfos[G].help="")}}function isValidateSuccess(){let H=!0;for(const C in validateInfos)if(validateInfos[C].validateStatus=="error"){H=!1;break}return H}const syncChange=(H,C,W,U)=>{var K=U.split("."),G=W.split(".");C[G[0]][G[1]]=H.label,C[K[0]][K[1]]=H.value};function onTableSelectClear(H,C){let W=C.split(".");H[W[0]][W[1]]=""}function onTableSelectRowChange(H,C,W,U,K,G){let Q=W.split("."),Z=H.map(X=>X[U]);if(C[Q[0]][Q[1]]=Z?Z.join(","):void 0,K&&G){let X=K.split("."),ee=H.map(te=>te[G]);C[X[0]][X[1]]=ee?ee.join(","):void 0}}const getSelectAllCheck=(H,C)=>{let W=C?C.map(K=>K.value):[],U=H?H.includes(",")?H.split(","):[H]:[];return U.length==W.length&&U.length!==0&&W.length!==0},setSelectAllCheck=(H,C,W,U)=>{let K=H.target.checked,G=W?W.split("."):null;if(G){let Q=U?U.map(Z=>Z.value):[];C[G[0]][G[1]]=K?Q.join(","):null}};function getAccount(H,C,W){let U=0;switch(H){case"sum":U=sum(C,W);break;case"avg":U=sum(C,W)/C.split(",").length;break}return U}function sum(H,C){let W=0;if(H.indexOf(",")>-1){let U=H.split(",");for(let K=0;K<U.length;K++){let G=U[K].split("."),Q=C[G[0]][G[1]];Q==null&&(Q=0),W+=Q}}return W}function hideField(H,C,W){let U=!1;const K=H[W].ruleList[0],{field:G,selectType:Q,ruleValue:Z}=K,X=G.split(".");let ee=Z;if(Q=="field"){const te=Z.split(".");ee=C.value[te[0]][te[1]]}if(C.value!=null){const te=C.value[X[0]];te!=null&&te[X[1]]!=null&&(U=te[X[1]]===ee)}return U}const locale$2={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},CalendarLocale=locale$2,locale$1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},TimePicker=locale$1,locale={lang:_extends$1({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},CalendarLocale),timePickerLocale:_extends$1({},TimePicker)};locale.lang.ok="确定";const DatePicker=locale,typeTemplate="${label}不是一个有效的${type}",localeValues={locale:"zh-cn",Pagination:Pagination$2,DatePicker,TimePicker,Calendar:DatePicker,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:typeTemplate,method:typeTemplate,array:typeTemplate,object:typeTemplate,number:typeTemplate,date:typeTemplate,boolean:typeTemplate,integer:typeTemplate,float:typeTemplate,regexp:typeTemplate,email:typeTemplate,url:typeTemplate,hex:typeTemplate},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}},zhCN=localeValues,_sfc_main$t=vue.defineComponent({__name:"index",props:{title:{type:String,default:"标题"},width:{type:[String,Number],default:520},filePath:{type:String,default:"components/wonderform/free/PreviewDemo"},formData:{type:[Object,String,Number,Array]},okText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},onOk:{type:Function,default:null},onCancel:{type:Function,default:null},footer:{type:Boolean,default:!0}},setup(H,{expose:C}){const W=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)});let U=vue.ref(!1),K=vue.ref(!1),G=vue.ref(),Q=vue.ref(!1);const Z=vue.computed(()=>vue.defineAsyncComponent(W[`/src/${X.filePath}.vue`])),X=H,ee=vue.computed(()=>X.footer?"":{footer:null});C({setConfirmLoading:te,show:oe,close:re}),vue.onMounted(()=>{oe()});function te(ae){K.value=ae}function ne(){if(X.onOk&&typeof X.onOk=="function"){let ae=G.value;X.onOk(ae)}else U.value=!1}function ie(){if(X.onCancel&&typeof X.onCancel=="function"){let ae=G.value;X.onCancel(ae)}else U.value=!1}function oe(){U.value=!0}function re(){U.value=!1}function se(){Q.value=!Q.value}return(ae,le)=>{const ce=vue.resolveComponent("a-modal"),de=vue.resolveComponent("a-config-provider");return vue.openBlock(),vue.createBlock(de,{locale:vue.unref(zhCN)},{default:vue.withCtx(()=>[vue.createVNode(ce,vue.mergeProps({class:"commonModal",open:vue.unref(U),"onUpdate:open":le[0]||(le[0]=ue=>vue.isRef(U)?U.value=ue:U=ue),width:vue.unref(Q)?"100%":H.width,"wrap-class-name":vue.unref(Q)?"full-common-modal":"",confirmLoading:vue.unref(K),maskClosable:!1,okText:H.okText,cancelText:H.cancelText},ee.value,{onOk:ne,onCancel:ie}),{title:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(H.title)+" ",1),vue.createElementVNode("div",{class:"fullscreen-custom",onClick:se},[vue.unref(Q)?(vue.openBlock(),vue.createBlock(vue.unref(FullscreenExitOutlined$1),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(FullscreenOutlined$1),{key:1}))])]),default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Z.value),{formData:H.formData,ref_key:"link",ref:G},null,8,["formData"]))]),_:1},16,["open","width","wrap-class-name","confirmLoading","okText","cancelText"])]),_:1},8,["locale"])}}}),index_vue_vue_type_style_index_0_scoped_7fcccc1f_lang="",index_vue_vue_type_style_index_1_lang="",CommonModal=_export_sfc(_sfc_main$t,[["__scopeId","data-v-7fcccc1f"]]),index$7=Object.freeze(Object.defineProperty({__proto__:null,default:CommonModal},Symbol.toStringTag,{value:"Module"})),_hoisted_1$d=["xlink:href"],_sfc_main$s=vue.defineComponent({__name:"SvgIcon",props:{name:{type:String,required:!0},title:{type:String,required:!1},color:{type:String,default:""},width:{type:String,default:"16px"},height:{type:String,default:"16px"}},setup(H){const C=H,W=vue.computed(()=>`#icon-${C.name}`),U=vue.computed(()=>C.name?`svg-icon icon-${C.name}`:"svg-icon");return(K,G)=>(vue.openBlock(),vue.createElementBlock("svg",vue.mergeProps({class:U.value},K.$attrs,{style:{color:H.color,width:H.width,height:H.height}}),[vue.createElementVNode("title",null,vue.toDisplayString(H.title),1),vue.createElementVNode("use",{"xlink:href":W.value},null,8,_hoisted_1$d)],16))}}),SvgIcon_vue_vue_type_style_index_0_scoped_f02ffdf6_lang="",SvgIcon=_export_sfc(_sfc_main$s,[["__scopeId","data-v-f02ffdf6"]]),SvgIcon$1=Object.freeze(Object.defineProperty({__proto__:null,default:SvgIcon},Symbol.toStringTag,{value:"Module"})),_hoisted_1$c={class:"form-table-css"},_hoisted_2$8={class:"form-table-thead"},_hoisted_3$6={class:"form-table-tbody"},_hoisted_4$4={key:0},_hoisted_5$3=["colspan"],_hoisted_6$2={key:0,class:"form-table-pagination"},_sfc_main$r=vue.defineComponent({__name:"cTable",props:{columns:{type:Object,default:[]},datasource:{type:Object,default:[]},disabled:{type:Boolean,default:!1,require:!1},total:{type:Number,default:0,require:!1},current:{type:Number,default:1,require:!1},pageSize:{type:Number,default:2,require:!1},showTotal:{type:Function,default:H=>`共 ${H} 条`,require:!1}},setup(H){const C=H;let W=vue.ref(C.current),U=vue.ref(C.pageSize);debugger;const K=Q=>{W.value=Q},G=Q=>C.disabled?Q.slice((W.value-1)*C.pageSize,(W.value-1)*C.pageSize+C.pageSize):C.datasource;return(Q,Z)=>{const X=vue.resolveComponent("a-pagination");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("table",_hoisted_1$c,[vue.createElementVNode("thead",_hoisted_2$8,[vue.createElementVNode("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.columns,(ee,te)=>(vue.openBlock(),vue.createElementBlock("th",null,vue.toDisplayString(ee.title),1))),256))])]),vue.createElementVNode("tbody",_hoisted_3$6,[H.datasource.length==0?(vue.openBlock(),vue.createElementBlock("tr",_hoisted_4$4,[vue.createElementVNode("td",{colspan:H.columns.length,class:"td-empty-data"},"暂无数据",8,_hoisted_5$3)])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(G(H.datasource),(ee,te)=>(vue.openBlock(),vue.createElementBlock("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(H.columns,(ne,ie)=>(vue.openBlock(),vue.createElementBlock("td",null,vue.toDisplayString(ee[ne.model]),1))),256))]))),256))])]),H.disabled?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$2,[vue.createVNode(X,{current:vue.unref(W),"onUpdate:current":Z[0]||(Z[0]=ee=>vue.isRef(W)?W.value=ee:W=ee),pageSize:vue.unref(U),"onUpdate:pageSize":Z[1]||(Z[1]=ee=>vue.isRef(U)?U.value=ee:U=ee),total:H.datasource.length,"show-total":H.showTotal,onChange:K},null,8,["current","pageSize","total","show-total"])])):vue.createCommentVNode("",!0)])}}}),cTable=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$r},Symbol.toStringTag,{value:"Module"})),_sfc_main$q=vue.defineComponent({__name:"tableSelect",props:{value:{type:[String,Number,Array]},mode:{type:String,default:""},bindKeyName:{type:String,default:""},bindLabelName:{type:String,default:""},tableProps:{type:[Number,String,Object,Array]},dropMenuWidth:{type:[Number,String],default:""},dropMenuHeight:{type:[Number,String],default:""},filePath:{type:String,default:""}},emits:["update:value","rowChange"],setup(H,{emit:C}){const W=H;let U=vue.ref(!1),K=vue.ref();const G=vue.computed(()=>({allowClear:!0,...vue.useAttrs()}));vue.ref();let Q=vue.ref([]),Z=vue.computed({get(){return W.value},set(le){ie("update:value",le)}});const X=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)}),ee=vue.computed(()=>{if(W.filePath){let le=`/src/${W.filePath}.vue`;return W.filePath?Object.keys(X).includes(le):!1}else return!1}),te=vue.computed(()=>ee?vue.defineAsyncComponent(X[`/src/${W.filePath}.vue`]):null),ne=vue.computed(()=>{let le=W.dropMenuWidth,ce=W.dropMenuHeight,de=le==null||le==""?`width: ${oe.value}`:`width: ${typeof le=="number"?`${le}px`:`${le}`}`,ue=ce==null||ce==""?"":`height: ${typeof ce=="number"?`${ce}px`:`${ce}`}`;return de&&ue?de+";"+ue:de&&!ue?de:!de&&ue?ue:""}),ie=C,oe=vue.computed(()=>K.value?K.value.$el.offsetWidth+"px":"");vue.onMounted(()=>{U.value=!0,vue.nextTick(()=>{U.value=!1})});function re(){let le=G.value;le&&!le.disabled&&le.disabled!=""&&(U.value=!U.value)}function se(le){ie("rowChange",le)}function ae(le){le?Q.value=le.map(ce=>({label:ce[W.bindLabelName]||"",value:ce[W.bindKeyName]})):Q.value=[]}return(le,ce)=>{const de=vue.resolveComponent("a-select"),ue=vue.resolveComponent("a-empty"),he=vue.resolveComponent("a-dropdown");return vue.openBlock(),vue.createBlock(he,{overlayClassName:"table-select-dropdown",trigger:["click"],open:vue.unref(U),"onUpdate:open":ce[2]||(ce[2]=fe=>vue.isRef(U)?U.value=fe:U=fe),onClick:re},{overlay:vue.withCtx(()=>[vue.createElementVNode("div",{class:"table-select-content",style:vue.normalizeStyle(ne.value)},[ee.value&&te.value?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(te.value),{key:0,value:vue.unref(Z),"onUpdate:value":ce[1]||(ce[1]=fe=>vue.isRef(Z)?Z.value=fe:Z=fe),mode:H.mode,keyName:H.bindKeyName,tableProps:H.tableProps,onGetTable:ae,onRowChange:se},null,40,["value","mode","keyName","tableProps"])):(vue.openBlock(),vue.createBlock(ue,{key:1}))],4)]),default:vue.withCtx(()=>[vue.createVNode(de,vue.mergeProps({ref_key:"select",ref:K,value:vue.unref(Z),"onUpdate:value":ce[0]||(ce[0]=fe=>vue.isRef(Z)?Z.value=fe:Z=fe),options:vue.unref(Q),mode:H.mode},G.value,{open:!1}),null,16,["value","options","mode"])]),_:1},8,["open"])}}}),tableSelect_vue_vue_type_style_index_0_scoped_46d332d3_lang="",tableSelect_vue_vue_type_style_index_1_lang="",CTableSelect=_export_sfc(_sfc_main$q,[["__scopeId","data-v-46d332d3"]]),tableSelect=Object.freeze(Object.defineProperty({__proto__:null,default:CTableSelect},Symbol.toStringTag,{value:"Module"})),_sfc_main$p=vue.defineComponent({__name:"childForm",props:{filePath:{type:String,default:""}},setup(H){const C=Object.assign({"/src/App.vue":()=>Promise.resolve().then(()=>App),"/src/components/HelloWorld.vue":()=>Promise.resolve().then(()=>HelloWorld$1),"/src/components/cModal/index.vue":()=>Promise.resolve().then(()=>index$7),"/src/components/form-widget/widget/childForm.vue":()=>Promise.resolve().then(()=>childForm),"/src/components/form-widget/widget/collapsePanel.vue":()=>Promise.resolve().then(()=>collapsePanel),"/src/components/form-widget/widget/tableSelect.vue":()=>Promise.resolve().then(()=>tableSelect),"/src/components/form-widget/widget/tableSelectDemo.vue":()=>Promise.resolve().then(()=>tableSelectDemo$1),"/src/components/form-widget/widget/tableSelectDemo2.vue":()=>Promise.resolve().then(()=>tableSelectDemo2),"/src/components/generate/Demo.vue":()=>Promise.resolve().then(()=>Demo$1),"/src/components/generate/GenerateForm.vue":()=>Promise.resolve().then(()=>GenerateForm),"/src/components/generate/GenerateReport.vue":()=>Promise.resolve().then(()=>GenerateReport),"/src/components/icon/SvgIcon.vue":()=>Promise.resolve().then(()=>SvgIcon$1),"/src/components/monaco/monacoEditor.vue":()=>Promise.resolve().then(()=>monacoEditor$1),"/src/components/table/cTable.vue":()=>Promise.resolve().then(()=>cTable),"/src/components/wonderform/config/ReportIndex.vue":()=>Promise.resolve().then(()=>ReportIndex),"/src/components/wonderform/config/index.vue":()=>Promise.resolve().then(()=>index$8),"/src/components/wonderform/config/modules/Col.vue":()=>Promise.resolve().then(()=>Col),"/src/components/wonderform/config/modules/Collapse.vue":()=>Promise.resolve().then(()=>Collapse),"/src/components/wonderform/config/modules/DataSource.vue":()=>Promise.resolve().then(()=>DataSource$2),"/src/components/wonderform/config/modules/FX.vue":()=>Promise.resolve().then(()=>FX),"/src/components/wonderform/config/modules/Form.vue":()=>Promise.resolve().then(()=>Form$1),"/src/components/wonderform/config/modules/FormSetting.vue":()=>Promise.resolve().then(()=>FormSetting$1),"/src/components/wonderform/config/modules/FormSettingIndex.vue":()=>Promise.resolve().then(()=>FormSettingIndex),"/src/components/wonderform/config/modules/Grid.vue":()=>Promise.resolve().then(()=>Grid),"/src/components/wonderform/config/modules/Input-删除.vue":()=>Promise.resolve().then(()=>Input___),"/src/components/wonderform/config/modules/Label-删除.vue":()=>Promise.resolve().then(()=>Label___),"/src/components/wonderform/config/modules/Properties.vue":()=>Promise.resolve().then(()=>Properties),"/src/components/wonderform/config/modules/ReportProperties.vue":()=>Promise.resolve().then(()=>ReportProperties),"/src/components/wonderform/config/modules/Table.vue":()=>Promise.resolve().then(()=>Table$1),"/src/components/wonderform/config/modules/TableBtnModal.vue":()=>Promise.resolve().then(()=>TableBtnModal),"/src/components/wonderform/config/modules/TableColumn.vue":()=>Promise.resolve().then(()=>TableColumn$1),"/src/components/wonderform/config/modules/Tabs.vue":()=>Promise.resolve().then(()=>Tabs),"/src/components/wonderform/config/modules/TypeScript.vue":()=>Promise.resolve().then(()=>TypeScript$1),"/src/components/wonderform/design/Form.vue":()=>Promise.resolve().then(()=>Form),"/src/components/wonderform/design/index.vue":()=>Promise.resolve().then(()=>index$9),"/src/components/wonderform/design/modules/FormCol.vue":()=>Promise.resolve().then(()=>FormCol$1),"/src/components/wonderform/design/modules/FormCollapse.vue":()=>Promise.resolve().then(()=>FormCollapse$1),"/src/components/wonderform/design/modules/FormGrid.vue":()=>Promise.resolve().then(()=>FormGrid$1),"/src/components/wonderform/design/modules/FormGridCopy.vue":()=>Promise.resolve().then(()=>FormGridCopy$1),"/src/components/wonderform/design/modules/FormInput.vue":()=>Promise.resolve().then(()=>FormInput$1),"/src/components/wonderform/design/modules/FormReport.vue":()=>Promise.resolve().then(()=>FormReport$1),"/src/components/wonderform/design/modules/FormTable.vue":()=>Promise.resolve().then(()=>FormTable$1),"/src/components/wonderform/design/modules/FormTabs.vue":()=>Promise.resolve().then(()=>FormTabs$1),"/src/components/wonderform/design/modules/FormVue.vue":()=>Promise.resolve().then(()=>FormVue$1),"/src/components/wonderform/dsource/index.vue":()=>Promise.resolve().then(()=>index$6),"/src/components/wonderform/dsource/modules/SqlModule.vue":()=>Promise.resolve().then(()=>SqlModule),"/src/components/wonderform/header/Header.vue":()=>Promise.resolve().then(()=>Header),"/src/components/wonderform/header/modules/Code.vue":()=>Promise.resolve().then(()=>Code),"/src/components/wonderform/index.vue":()=>Promise.resolve().then(()=>index$5),"/src/components/wonderform/tool/index.vue":()=>Promise.resolve().then(()=>index$b),"/src/components/wonderreport/Demo.vue":()=>Promise.resolve().then(()=>Demo),"/src/components/wonderreport/ReportModule.vue":()=>Promise.resolve().then(()=>ReportModule),"/src/components/wonderreport/header/index.vue":()=>Promise.resolve().then(()=>index$4),"/src/components/wonderreport/index.vue":()=>Promise.resolve().then(()=>index$3),"/src/views/formTest.vue":()=>Promise.resolve().then(()=>formTest),"/src/views/sys/login/Login.vue":()=>Promise.resolve().then(()=>Login$1),"/src/views/workbench/index.vue":()=>Promise.resolve().then(()=>index$1)}),W=H,U=vue.computed(()=>{if(W.filePath){let G=`/src/${W.filePath}.vue`;return W.filePath?Object.keys(C).includes(G):!1}else return!1}),K=vue.computed(()=>U?vue.defineAsyncComponent(C[`/src/${W.filePath}.vue`]):null);return(G,Q)=>{const Z=vue.resolveComponent("a-empty"),X=vue.resolveComponent("a-card");return U.value?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(K.value),vue.normalizeProps(vue.mergeProps({key:0},vue.useAttrs)),null,16)):(vue.openBlock(),vue.createBlock(X,{key:1},{default:vue.withCtx(()=>[vue.createVNode(Z)]),_:1}))}}}),childForm=Object.freeze(Object.defineProperty({__proto__:null,default:_sfc_main$p},Symbol.toStringTag,{value:"Module"})),_hoisted_1$b={class:"collapsePanel"},_hoisted_2$7={key:0,class:"collapse-btn"},_hoisted_3$5={class:"collapse-form-list"},_sfc_main$o=vue.defineComponent({__name:"collapsePanel",props:{classname:{type:String,default:"title-css1"},header:{type:String,default:"标题"},showArrow:{type:Boolean,default:!0},defaultCollapse:{type:Boolean,default:!1},collapseType:{type:String,default:"row"}},setup(H){const C=H;let W=vue.ref(C.defaultCollapse);function U(K){K==C.collapseType&&(W.value=!W.value)}return(K,G)=>{const Q=vue.resolveComponent("svg-icon");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$b,[vue.createElementVNode("div",{class:vue.normalizeClass([H.classname,"title-between",H.collapseType=="row"?"clickPointer":"clickAuto"]),onClick:G[2]||(G[2]=Z=>U("row"))},[vue.createElementVNode("span",{class:vue.normalizeClass(H.collapseType=="icon"?"clickAuto":"clickPointer"),onClick:G[0]||(G[0]=Z=>U("header"))},vue.toDisplayString(H.header),3),H.showArrow?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,[vue.createVNode(Q,{class:vue.normalizeClass(H.collapseType=="header"?"clickAuto":"clickPointer"),style:vue.normalizeStyle(vue.unref(W)?{transform:"rotate(180deg)"}:{}),height:"24",name:"arrow",width:"24",onClick:G[1]||(G[1]=Z=>U("icon"))},null,8,["class","style"])])):vue.createCommentVNode("",!0)],2),vue.withDirectives(vue.createElementVNode("div",_hoisted_3$5,[vue.renderSlot(K.$slots,"default",{},void 0,!0)],512),[[vue.vShow,!vue.unref(W)]])])}}}),collapsePanel_vue_vue_type_style_index_0_scoped_191866ea_lang="",CCollapsePanel=_export_sfc(_sfc_main$o,[["__scopeId","data-v-191866ea"]]),collapsePanel=Object.freeze(Object.defineProperty({__proto__:null,default:CCollapsePanel},Symbol.toStringTag,{value:"Module"}));var zhCn={exports:{}};(function(H,C){(function(W,U){H.exports=U(dayjs_minExports)})(commonjsGlobal,function(W){function U(Q){return Q&&typeof Q=="object"&&"default"in Q?Q:{default:Q}}var K=U(W),G={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(Q,Z){return Z==="W"?Q+"周":Q+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(Q,Z){var X=100*Q+Z;return X<600?"凌晨":X<900?"早上":X<1100?"上午":X<1300?"中午":X<1800?"下午":"晚上"}};return K.default.locale(G,null,!0),G})})(zhCn),dayjs.locale("zh-cn");function registerGlobComp(H){H.component("svg-icon",SvgIcon),H.component("c-table",_sfc_main$r),H.component("c-table-select",CTableSelect),H.component("c-child-form",_sfc_main$p),H.component("c-collapse-panel",CCollapsePanel),H.use(Layout).use(Input).use(Row).use(Col$1).use(Form$3).use(Empty$1).use(Tabs$1).use(Modal).use(InputNumber$1).use(Button$2).use(Table$2).use(Pagination).use(ConfigProvider$1).use(Switch$1).use(Select$1).use(Radio).use(Slider$1).use(Dropdown$1).use(Menu$1).use(Divider$1).use(DatePicker$2).use(Collapse$1).use(Checkbox).use(Tree).use(TreeSelect$1).use(Space$1).use(List$2).use(Popconfirm$1).use(Cascader$1).use(Card$1).use(Flex).use(Drawer$1).use(Tooltip)}function cModal(H){let C,W,U;C=document.createElement("div"),H&&!H.onCancel&&(H.onCancel=()=>{Z()}),H&&!H.onOk&&(H.onOk=()=>{Z()}),W=vue.createApp(CommonModal,{...H}),registerGlobComp(W),U=W.mount(C);function K(X){U&&U.setConfirmLoading(X)}function G(){U&&U.show()}function Q(){U&&U.close()}function Z(){Q(),setTimeout(()=>{U=W.unmount()},200)}return{setConfirmLoading:K,show:G,close:Q,destroy:Z}}/*!
1848
1848
  * vue-router v4.2.5
1849
1849
  * (c) 2023 Eduardo San Martin Morote
1850
1850
  * @license MIT