filesbox/web/dist/45905.195b76fb.async.js

52 lines
24 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[45905],{45905:function(M,O,w){M=w.nmd(M),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(p,f,b){"use strict";var $=this&&this.__extends||function(){var l=function(s,u){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,e){h.__proto__=e}||function(h,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(h[n]=e[n])},l(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(s,u);function h(){this.constructor=s}s.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}(),y=p("./lib/oop"),k=p("./search").Search,v=p("./edit_session").EditSession,C=p("./search_highlight").SearchHighlight,c=function(l){$(s,l);function s(){return l!==null&&l.apply(this,arguments)||this}return s.prototype.enter=function(u,h){if(!h.needle)return!1;var e=u.getCursorPosition();this.displayOccurContent(u,h);var n=this.originalToOccurPosition(u.session,e);return u.moveCursorToPosition(n),!0},s.prototype.exit=function(u,h){var e=h.translatePosition&&u.getCursorPosition(),n=e&&this.occurToOriginalPosition(u.session,e);return this.displayOriginalContent(u),n&&u.moveCursorToPosition(n),!0},s.prototype.highlight=function(u,h){var e=u.$occurHighlight=u.$occurHighlight||u.addDynamicMarker(new C(null,"ace_occur-highlight","text"));e.setRegexp(h),u._emit("changeBackMarker")},s.prototype.displayOccurContent=function(u,h){this.$originalSession=u.session;var e=this.matchingLines(u.session,h),n=e.map(function(o){return o.content}),a=new v(n.join(`
`));a.$occur=this,a.$occurMatchingLines=e,u.setSession(a),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,a.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(a,h.re),a._emit("changeBackMarker")},s.prototype.displayOriginalContent=function(u){u.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},s.prototype.originalToOccurPosition=function(u,h){var e=u.$occurMatchingLines,n={row:0,column:0};if(!e)return n;for(var a=0;a<e.length;a++)if(e[a].row===h.row)return{row:a,column:h.column};return n},s.prototype.occurToOriginalPosition=function(u,h){var e=u.$occurMatchingLines;return!e||!e[h.row]?h:{row:e[h.row].row,column:h.column}},s.prototype.matchingLines=function(u,h){if(h=y.mixin({},h),!u||!h.needle)return[];var e=new k;return e.set(h),e.findAll(u).reduce(function(n,a){var o=a.start.row,r=n[n.length-1];return r&&r.row===o?n:n.concat({row:o,content:u.getLine(o)})},[])},s}(k),m=p("./lib/dom");m.importCssString(`.ace_occur-highlight {
border-radius: 4px;
background-color: rgba(87, 255, 8, 0.25);
position: absolute;
z-index: 4;
box-sizing: border-box;
box-shadow: 0 0 4px rgb(91, 255, 50);
}
.ace_dark .ace_occur-highlight {
background-color: rgb(80, 140, 85);
box-shadow: 0 0 4px rgb(60, 120, 70);
}
`,"incremental-occur-highlighting",!1),f.Occur=c}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(p,f,b){var $=p("../config"),y=p("../occur").Occur,k={name:"occur",exec:function(l,s){var u=!!l.session.$occur,h=new y().enter(l,s);h&&!u&&m.installIn(l)},readOnly:!0},v=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(l){var s=l.session.$occur;!s||(s.exit(l,{}),l.session.$occur||m.uninstallFrom(l))},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(l){var s=l.session.$occur;!s||(s.exit(l,{translatePosition:!0}),l.session.$occur||m.uninstallFrom(l))},readOnly:!0}],C=p("../keyboard/hash_handler").HashHandler,c=p("../lib/oop");function m(){}c.inherits(m,C),function(){this.isOccurHandler=!0,this.attach=function(s){C.call(this,v,s.commands.platform),this.$editor=s};var l=this.handleKeyboard;this.handleKeyboard=function(s,u,h,e){var n=l.call(this,s,u,h,e);return n&&n.command?n:void 0}}.call(m.prototype),m.installIn=function(l){var s=new this;l.keyBinding.addKeyboardHandler(s),l.commands.addCommands(v)},m.uninstallFrom=function(l){l.commands.removeCommands(v);var s=l.getKeyboardHandler();s.isOccurHandler&&l.keyBinding.removeKeyboardHandler(s)},f.occurStartCommand=k}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(p,f,b){var $=p("../config"),y=p("../lib/oop"),k=p("../keyboard/hash_handler").HashHandler,v=p("./occur_commands").occurStartCommand;f.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(c,m){$.loadModule(["core","ace/incremental_search"],function(l){var s=l.iSearch=l.iSearch||new l.IncrementalSearch;s.activate(c,m.backwards),m.jumpToFirstMatch&&s.next(m)})},readOnly:!0},{name:"iSearchBackwards",exec:function(c,m){c.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(c,m){c.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(c){c.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],f.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(c){c.cancelSearch(!0)}},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(c,m){m.useCurrentOrPrevSearch=!0,c.next(m)}},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(c,m){m.useCurrentOrPrevSearch=!0,m.backwards=!0,c.next(m)}},{name:"extendSearchTerm",exec:function(c,m){c.addString(m)}},{name:"extendSearchTermSpace",bindKey:"space",exec:function(c){c.addString(" ")}},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(c){c.removeChar()}},{name:"confirmSearch",bindKey:"return",exec:function(c){c.deactivate()}},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(c){c.deactivate(!0)}},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(c){var m=y.mixin({},c.$options);c.deactivate(),v.exec(c.$editor,m)}},{name:"yankNextWord",bindKey:"Ctrl-w",exec:function(c){var m=c.$editor,l=m.selection.getRangeOfMovements(function(u){u.moveCursorWordRight()}),s=m.session.getTextRange(l);c.addString(s)}},{name:"yankNextChar",bindKey:"Ctrl-Alt-y",exec:function(c){var m=c.$editor,l=m.selection.getRangeOfMovements(function(u){u.moveCursorRight()}),s=m.session.getTextRange(l);c.addString(s)}},{name:"recenterTopBottom",bindKey:"Ctrl-l",exec:function(c){c.$editor.execCommand("recenterTopBottom")}},{name:"selectAllMatches",bindKey:"Ctrl-space",exec:function(c){var m=c.$editor,l=m.session.$isearchHighlight,s=l&&l.cache?l.cache.reduce(function(u,h){return u.concat(h||[])},[]):[];c.deactivate(!1),s.forEach(m.selection.addRange.bind(m.selection))}},{name:"searchAsRegExp",bindKey:"Alt-r",exec:function(c){c.convertNeedleToRegExp()}}].map(function(c){return
.ace_marker-layer .ace_isearch-result {
position: absolute;
z-index: 6;
box-sizing: border-box;
}
div.ace_isearch-result {
border-radius: 4px;
background-color: rgba(255, 200, 0, 0.5);
box-shadow: 0 0 4px rgb(255, 200, 0);
}
.ace_dark div.ace_isearch-result {
background-color: rgb(100, 110, 160);
box-shadow: 0 0 4px rgb(80, 90, 140);
}`,"incremental-search-highlighting",!1);var n=p("./commands/command_manager");(function(){this.setupIncrementalSearch=function(o,r){if(this.usesIncrementalSearch!=r){this.usesIncrementalSearch=r;var t=C.iSearchStartCommands,i=r?"addCommands":"removeCommands";this[i](t)}}}).call(n.CommandManager.prototype);var a=p("./editor").Editor;p("./config").defineOptions(a.prototype,"editor",{useIncrementalSearch:{set:function(o){this.keyBinding.$handlers.forEach(function(r){r.setupIncrementalSearch&&r.setupIncrementalSearch(this,o)}),this._emit("incrementalSearchSettingChanged",{isEnabled:o})}}})}),ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(p,f,b){"use strict";var $=p("../lib/dom");p("../incremental_search");var y=p("../commands/incremental_search_commands"),k=p("./hash_handler").HashHandler;f.handler=new k,f.handler.isEmacs=!0,f.handler.$id="ace/keyboard/emacs",$.importCssString(`
.emacs-mode .ace_cursor{
border: 1px rgba(50,250,50,0.8) solid!important;
box-sizing: border-box!important;
background-color: rgba(0,250,0,0.9);
opacity: 0.5;
}
.emacs-mode .ace_hidden-cursors .ace_cursor{
opacity: 1;
background-color: transparent;
}
.emacs-mode .ace_overwrite-cursors .ace_cursor {
opacity: 1;
background-color: transparent;
border-width: 0 0 2px 2px !important;
}
.emacs-mode .ace_text-layer {
z-index: 4
}
.emacs-mode .ace_cursor-layer {
z-index: 2
}`,"emacsMode");var v,C;f.handler.attach=function(e){v=e.session.$selectLongWords,e.session.$selectLongWords=!0,C=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(n){this.session.$emacsMark=n},e.pushEmacsMark=function(n,a){var o=this.session.$emacsMark;o&&this.session.$emacsMarkRing.push(o),!n||a?this.setEmacsMark(n):this.session.$emacsMarkRing.push(n)},e.popEmacsMark=function(){var n=this.emacsMark();return n?(this.setEmacsMark(null),n):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(n){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.emacsMarkForSelection=function(n){var a=this.selection,o=this.multiSelect?this.multiSelect.getAllRanges().length:1,r=a.index||0,t=this.session.$emacsMarkRing,i=t.length-(o-r),g=t[i]||a.anchor;return n&&t.splice(i,1,"row"in n&&"column"in n?n:void 0),g},e.on("click",m),e.on("changeSession",c),e.renderer.$blockCursor=!0,e.setStyle("emacs-mode"),e.commands.addCommands(h),f.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.on("copy",this.onCopy),e.on("paste",this.onPaste)},f.handler.detach=function(e){e.renderer.$blockCursor=!1,e.session.$selectLongWords=v,e.session.$useEmacsStyleLineStart=C,e.off("click",m),e.off("changeSession",c),e.unsetStyle("emacs-mode"),e.commands.removeCommands(h),e.off("copy",this.onCopy),e.off("paste",this.onPaste),e.$emacsModeHandler=null};var c=function(e){e.oldSession&&(e.oldSession.$selectLongWords=v,e.oldSession.$useEmacsStyleLineStart=C),v=e.session.$selectLongWords,e.session.$selectLongWords=!0,C=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},m=function(e){e.editor.session.$emacsMark=null},l=p("../lib/keys").KEY_MODS,s={C:"ctrl",S:"shift",M:"alt",CMD:"command"},u=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];u.forEach(function(e){var n=0;e.split("-").forEach(function(a){n=n|l[s[a]]}),s[n]=e.toLowerCase()+"-"}),f.handler.onCopy=function(e,n){n.$handlesEmacsOnCopy||(n.$handlesEmacsOnCopy=!0,f.handler.commands.killRingSave.exec(n),n.$handlesEmacsOnCopy=!1)},f.handler.onPaste=function(e,n){n.pushEmacsMark(n.getCursorPosition())},f.handler.bindKey=function(e,n){if(typeof e=="object"&&(e=e[this.platform]),!!e){var a=this.commandKeyBinding;e.split("|").forEach(function(o){o=o.toLowerCase(),a[o]=n;var r=o.split(" ").slice(0,-1);r.reduce(function(t,i,g){var d=t[g-1]?t[g-1]+" ":"";return t.concat([d+i])},[]).forEach(function(t){a[t]||(a[t]="null")})},this)}},f.handler.getStatusText=function(e,n){var a="";return n.count&&(a+=n.count),n.keyChain&&(a+=" "+n.keyChain),a},f.handler.handleKeyboard=function(e,n,a,o){if(o!==-1){var r=e.editor;if(r._signal("changeStatus"),n==-1&&(r.pushEmacsMark(),e.count)){var t=new Array(e.count+1).join(a);return e.count=null,{command:"insertstring",args:t}}var i=s[n];if(i=="c-"||e.count){var g=parseInt(a[a.length-1]);if(typeof g=="number"&&!isNaN(g))return e.count=Math.max(e.count,0)||0,e.count=10*e.count+g,{command:"null"}}i&&(a=i+a),e.keyChain&&(a=e.keyChain+=" "+a);var d=this.commandKeyBinding[a];if(e.keyChain=d=="null"?a:"",!!d){if(d==="null")return{command:"null"};if(d==="universalArgument")return e.count=-4,{command:"null"};var S;if(typeof d!="string"&&(S=d.args,d.command&&(d=d.command),d==="goorselect"&&(d=r.emacsMark()?S[1]:S[0],S=null)),!(typeof d=="string"&&((d==="insertstring"||d==="splitline"||d==="togglecomment")&&r.pushEmacsMark(),d=this.commands[d]||r.commands.commands[d],!d))){if(!d.readOnly&&!d.isYank&&(e.lastCommand=null),!d.readOnly&&r.emacsMark()&&r.setEmacsMark(null),e.count){var g=e.count;if(e.count=0,!d||!d.handlesCount)return{args:S,command:{exec:function(E,R){for(var x=0;x<g;x++)d.exec(E,R)},multiSelectAction:d.multiSelectAction}};S||(S={}),typeof S=="object
`},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w|C-S-W":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},f.handler.bindKeys(f.emacsKeys),f.handler.addCommands({recenterTopBottom:function(e){var n=e.renderer,a=n.$cursorLayer.getPixelPosition(),o=n.$size.scrollerHeight-n.lineHeight,r=n.scrollTop;Math.abs(a.top-r)<2?r=a.top-o:Math.abs(a.top-r-o*.5)<2?r=a.top:r=a.top-o*.5,e.session.setScrollTop(r)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,n){if(n&&n.count){e.inMultiSelectMode?e.forEachSelection(g):g(),g();return}var a=e.emacsMark(),o=e.selection.getAllRanges(),r=o.map(function(d){return{row:d.start.row,column:d.start.column}}),t=!0,i=o.every(function(d){return d.isEmpty()});if(t&&(a||!i)){e.inMultiSelectMode?e.forEachSelection({exec:e.clearSelection.bind(e)}):e.clearSelection(),a&&e.pushEmacsMark(null);return}if(!a){r.forEach(function(d){e.pushEmacsMark(d)}),e.setEmacsMark(r[r.length-1]);return}function g(){var d=e.popEmacsMark();d&&e.moveCursorToPosition(d)}},readOnly:!0,handlesCount:!0},exchangePointAndMark:{exec:function(n,a){var o=n.selection;if(!a.count&&!o.isEmpty()){o.setSelectionRange(o.getRange(),!o.isBackwards());return}if(a.count){var r={row:o.lead.row,column:o.lead.column};o.clearSelection(),o.moveCursorToPosition(n.emacsMarkForSelection(r))}else o.selectToPosition(n.emacsMarkForSelection())},readOnly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var a=e.getSelectionRange(),o=e.session.getTextRange(a);f.killRing.add(o),e.session.remove(a),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null),e.clearSelection();var n=e.getSelectionRange(),a=e.session.getLine(n.start.row);n.end.column=a.length,a=a.substr(n.start.column);var o=e.session.getFoldLine(n.start.row);o&&n.end.row!=o.end.row&&(n.end.row=o.end.row,a="x"),/^\s*$/.test(a)&&(n.end.row++,a=e.session.getLine(n.end.row),n.end.column=/^\s*$/.test(a)?a.length:0);var r=e.session.getTextRange(n);e.prevOp.command==this?f.killRing.append(r):f.killRing.add(r),e.session.remove(n),e.clearSelection()},yank:function(e){e.onPaste(f.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){e.keyBinding.$data.lastCommand=="yank"&&(e.undo(),e.session.$emacsMarkRing.pop(),e.onPaste(f.killRing.rotate()),e.keyBinding.$data.lastCommand="yank")},killRegion:{exec:function(e){f.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e),e.setEmacsMark(null)},readOnly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){e.$handlesEmacsOnCopy=!0;var n=e.session.$emacsMarkRing.slice(),a=[];f.killRing.add(e.getCopyText()),setTimeout(function(){function o(){var r=e.selection,t=r.getRange(),i=r.isBackwards()?t.end:t.start;a.push({row:i.row,column:i.column}),r.clearSelection()}e.$handlesEmacsOnCopy=!1,e.inMultiSelectMode?e.forEachSelection({exec:o}):o(),e.setEmacsMark(null),e.session.$emacsMarkRing=n.concat(a.reverse())},0)},readOnly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null),e.keyBinding.$data.count=null},focusCommandLine:function(e,n){e.showCommandLine&&e.showCommandLine(n)}}),f.handler.addCommands(y.iSearchStartCommands);var h=f.handler.commands;h.yank.isYank=!0,h.yankRotate.isYank=!0,f.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},append:function(e){var n=this.$data.length-1,a=this.$data[n]||"";e&&(a+=e),a&&(this.$data[n]=a)},get:function(e){return e=e||1,this.$data.slice(thi
`)},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}),function(){ace.require(["ace/keyboard/emacs"],function(p){M&&(M.exports=p)})}()}}]);