filesbox/web/dist/89084.99111393.async.js
2024-07-26 14:10:54 +08:00

10 lines
21 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[89084],{89084:function(){(function(a){if(typeof a.window!="undefined"&&a.document||a.require&&a.define)return;a.console||(a.console=function(){var c=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:c})},a.console.error=a.console.warn=a.console.log=a.console.trace=a.console),a.window=a,a.ace=a,a.onerror=function(c,i,t,e,o){postMessage({type:"error",data:{message:c,data:o&&o.data,file:i,line:t,col:e,stack:o&&o.stack}})},a.normalizeModule=function(c,i){if(i.indexOf("!")!==-1){var t=i.split("!");return a.normalizeModule(c,t[0])+"!"+a.normalizeModule(c,t[1])}if(i.charAt(0)=="."){var e=c.split("/").slice(0,-1).join("/");for(i=(e?e+"/":"")+i;i.indexOf(".")!==-1&&o!=i;){var o=i;i=i.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},a.require=function(i,t){if(t||(t=i,i=null),!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");t=a.normalizeModule(i,t);var e=a.require.modules[t];if(e)return e.initialized||(e.initialized=!0,e.exports=e.factory().exports),e.exports;if(!a.require.tlns)return console.log("unable to load "+t);var o=f(t,a.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),a.require.id=t,a.require.modules[t]={},importScripts(o),a.require(i,t)};function f(c,i){for(var t=c,e="";t;){var o=i[t];if(typeof o=="string")return o+e;if(o)return o.location.replace(/\/*$/,"/")+(e||o.main||o.name);if(o===!1)return"";var r=t.lastIndexOf("/");if(r===-1)break;e=t.substr(r)+e,t=t.slice(0,r)}return c}a.require.modules={},a.require.tlns={},a.define=function(c,i,t){if(arguments.length==2?(t=i,typeof c!="string"&&(i=c,c=a.require.id)):arguments.length==1&&(t=c,i=[],c=a.require.id),typeof t!="function"){a.require.modules[c]={exports:t,initialized:!0};return}i.length||(i=["require","exports","module"]);var e=function(o){return a.require(c,o)};a.require.modules[c]={exports:{},factory:function(){var o=this,r=t.apply(this,i.slice(0,t.length).map(function(n){switch(n){case"require":return e;case"exports":return o.exports;case"module":return o;default:return e(n)}}));return r&&(o.exports=r),o}}},a.define.amd={},a.require.tlns={},a.initBaseUrls=function(i){for(var t in i)this.require.tlns[t]=i[t]},a.initSender=function(){var i=a.require("ace/lib/event_emitter").EventEmitter,t=a.require("ace/lib/oop"),e=function(){};return function(){t.implement(this,i),this.callback=function(o,r){postMessage({type:"call",id:r,data:o})},this.emit=function(o,r){postMessage({type:"event",name:o,data:r})}}.call(e.prototype),new e};var v=a.main=null,l=a.sender=null;a.onmessage=function(c){var i=c.data;if(i.event&&l)l._signal(i.event,i.data);else if(i.command)if(v[i.command])v[i.command].apply(v,i.args);else if(a[i.command])a[i.command].apply(a,i.args);else throw new Error("Unknown command:"+i.command);else if(i.init){a.initBaseUrls(i.tlns),l=a.sender=a.initSender();var t=this.require(i.module)[i.classname];v=a.main=new t(l)}}})(this),ace.define("ace/lib/oop",[],function(a,f,v){"use strict";f.inherits=function(l,c){l.super_=c,l.prototype=Object.create(c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}})},f.mixin=function(l,c){for(var i in c)l[i]=c[i];return l},f.implement=function(l,c){f.mixin(l,c)}}),ace.define("ace/apply_delta",[],function(a,f,v){"use strict";function l(t,e){throw console.log("Invalid Delta:",t),"Invalid Delta: "+e}function c(t,e){return e.row>=0&&e.row<t.length&&e.column>=0&&e.column<=t[e.row].length}function i(t,e){e.action!="insert"&&e.action!="remove"&&l(e,"delta.action must be 'insert' or 'remove'"),e.lines instanceof Array||l(e,"delta.lines must be an Array"),(!e.start||!e.end)&&l(e,"delta.start/end must be an present");var o=e.start;c(t,e.start)||l(e,"delta.start must be contained in document");var r=e.end;e.action=="remove"&&!c(t,r)&&l(e,"delta.end must contained in document for 'remove' actions");var n=r.row-o.row,s=r.column-(n==0?o.column:0);(n!=e.lines.length-1||e.lines[n].length!=s)&&l(e,"delta.range must match delta lines")}f.applyDelta=function(t,e,o){var r=e.start.row,n=e.start.column,s=t[r]||"";switch(e.action){case"insert":var u=e.lines;if(u.length===1)t[r]=s.substring(0,n)+e.lines[0]+s.substring(n);else{var h=[r,1].concat(e.lines);t.splice.apply(t,h),t[r]=s.substring(0,n)+t[r],t[r+e.lines.length-1]+=s.substring(n)}break;case"remove":var p=e.end.column,m=e.end.row;r===m?t[r]=s.substring(0,n)+s.substring(p):t.splice(r,m-r+1,s.substring(0,n)+t[m].substring(p));break}}}),ace.define("ace/lib/event_emitter",[],function(a,f,v){"use strict";var l={},c=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};l._emit=l._dispatchEvent=function(t,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[t]||[],r=this._defaultHandlers[t];if(!(!o.length&&!r)){(typeof e!="object"||!e)&&(e={}),e.type||(e.type=t),e.stopPropagation||(e.stopPropagation=c),e.preventDefault||(e.preventDefault=i),o=o.slice();for(var n=0;n<o.length&&(o[n](e,this),!e.propagationStopped);n++);if(r&&!e.defaultPrevented)return r(e,this)}},l._signal=function(t,e){var o=(this._eventRegistry||{})[t];if(!!o){o=o.slice();for(var r=0;r<o.length;r++)o[r](e,this)}},l.once=function(t,e){var o=this;if(this.on(t,function r(){o.off(t,r),e.apply(null,arguments)}),!e)return new Promise(function(r){e=r})},l.setDefaultHandler=function(t,e){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[t]){var r=o[t],n=o._disabled_[t];n||(o._disabled_[t]=n=[]),n.push(r);var s=n.indexOf(e);s!=-1&&n.splice(s,1)}o[t]=e},l.removeDefaultHandler=function(t,e){var o=this._defaultHandlers;if(!!o){var r=o._disabled_[t];if(o[t]==e)r&&this.setDefaultHandler(t,r.pop());else if(r){var n=r.indexOf(e);n!=-1&&r.splice(n,1)}}},l.on=l.addEventListener=function(t,e,o){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[t];return r||(r=this._eventRegistry[t]=[]),r.indexOf(e)==-1&&r[o?"unshift":"push"](e),e},l.off=l.removeListener=l.removeEventListener=function(t,e){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[t];if(!!o){var r=o.indexOf(e);r!==-1&&o.splice(r,1)}},l.removeAllListeners=function(t){t||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[t]=void 0),this._defaultHandlers&&(this._defaultHandlers[t]=void 0)},f.EventEmitter=l}),ace.define("ace/range",[],function(a,f,v){"use strict";var l=function(i,t){return i.row-t.row||i.column-t.column},c=function(){function i(t,e,o,r){this.start={row:t,column:e},this.end={row:o,column:r}}return i.prototype.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},i.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},i.prototype.contains=function(t,e){return this.compare(t,e)==0},i.prototype.compareRange=function(t){var e,o=t.end,r=t.start;return e=this.compare(o.row,o.column),e==1?(e=this.compare(r.row,r.column),e==1?2:e==0?1:0):e==-1?-2:(e=this.compare(r.row,r.column),e==-1?-1:e==1?42:0)},i.prototype.comparePoint=function(t){return this.compare(t.row,t.column)},i.prototype.containsRange=function(t){return this.comparePoint(t.start)==0&&this.comparePoint(t.end)==0},i.prototype.intersects=function(t){var e=this.compareRange(t);return e==-1||e==0||e==1},i.prototype.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},i.prototype.isStart=function(t,e){return this.start.row==t&&this.start.column==e},i.prototype.setStart=function(t,e){typeof t=="object"?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},i.prototype.setEnd=function(t,e){typeof t=="object"?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},i.prototype.inside=function(t,e){return this.compare(t,e)==0?!(this.isEnd(t,e)||this.isStart(t,e)):!1},i.prototype.insideStart=function(t,e){return this.compare(t,e)==0?!this.isEnd(t,e):!1},i.prototype.insideEnd=function(t,e){return this.compare(t,e)==0?!this.isStart(t,e):!1},i.prototype.compare=function(t,e){return!this.isMultiLine()&&t===this.start.row?e<this.start.column?-1:e>this.end.column?1:0:t<this.start.row?-1:t>this.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0},i.prototype.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},i.prototype.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},i.prototype.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},i.prototype.clipRows=function(t,e){if(this.end.row>e)var o={row:e+1,column:0};else if(this.end.row<t)var o={row:t,column:0};if(this.start.row>e)var r={row:e+1,column:0};else if(this.start.row<t)var r={row:t,column:0};return i.fromPoints(r||this.start,o||this.end)},i.prototype.extend=function(t,e){var o=this.compare(t,e);if(o==0)return this;if(o==-1)var r={row:t,column:e};else var n={row:t,column:e};return i.fromPoints(r||this.start,n||this.end)},i.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},i.prototype.isMultiLine=function(){return this.start.row!==this.end.row},i.prototype.clone=function(){return i.fromPoints(this.start,this.end)},i.prototype.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},i.prototype.toScreenRange=function(t){var e=t.documentToScreenPosition(this.start),o=t.documentToScreenPosition(this.end);return new i(e.row,e.column,o.row,o.column)},i.prototype.moveBy=function(t,e){this.start.row+=t,this.start.column+=e,this.end.row+=t,this.end.column+=e},i}();c.fromPoints=function(i,t){return new c(i.row,i.column,t.row,t.column)},c.comparePoints=l,c.comparePoints=function(i,t){return i.row-t.row||i.column-t.column},f.Range=c}),ace.define("ace/anchor",[],function(a,f,v){"use strict";var l=a("./lib/oop"),c=a("./lib/event_emitter").EventEmitter,i=function(){function o(r,n,s){this.$onChange=this.onChange.bind(this),this.attach(r),typeof s=="undefined"?this.setPosition(n.row,n.column):this.setPosition(n,s)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(r){if(!(r.start.row==r.end.row&&r.start.row!=this.row)&&!(r.start.row>this.row)){var n=e(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.prototype.setPosition=function(r,n,s){var u;if(s?u={row:r,column:n}:u=this.$clipPositionToDocument(r,n),!(this.row==u.row&&this.column==u.column)){var h={row:this.row,column:this.column};this.row=u.row,this.column=u.column,this._signal("change",{old:h,value:u})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(r,n){var s={};return r>=this.document.getLength()?(s.row=Math.max(0,this.document.getLength()-1),s.column=this.document.getLine(s.row).length):r<0?(s.row=0,s.column=0):(s.row=r,s.column=Math.min(this.document.getLine(s.row).length,Math.max(0,n))),n<0&&(s.column=0),s},o}();i.prototype.$insertRight=!1,l.implement(i.prototype,c);function t(o,r,n){var s=n?o.column<=r.column:o.column<r.column;return o.row<r.row||o.row==r.row&&s}function e(o,r,n){var s=o.action=="insert",u=(s?1:-1)*(o.end.row-o.start.row),h=(s?1:-1)*(o.end.column-o.start.column),p=o.start,m=s?p:o.end;return t(r,p,n)?{row:r.row,column:r.column}:t(m,r,!n)?{row:r.row+u,column:r.column+(r.row==m.row?h:0)}:{row:p.row,column:p.column}}f.Anchor=i}),ace.define("ace/document",[],function(a,f,v){"use strict";var l=a("./lib/oop"),c=a("./apply_delta").applyDelta,i=a("./lib/event_emitter").EventEmitter,t=a("./range").Range,e=a("./anchor").Anchor,o=function(){function r(n){this.$lines=[""],n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)}return r.prototype.setValue=function(n){var s=this.getLength()-1;this.remove(new t(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},n||"")},r.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},r.prototype.createAnchor=function(n,s){return new e(this,n,s)},r.prototype.$detectNewLine=function(n){var s=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=s?s[1]:`
`,this._signal("changeNewLineMode")},r.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},r.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},r.prototype.getNewLineMode=function(){return this.$newLineMode},r.prototype.isNewLine=function(n){return n==`\r
`||n=="\r"||n==`
`},r.prototype.getLine=function(n){return this.$lines[n]||""},r.prototype.getLines=function(n,s){return this.$lines.slice(n,s+1)},r.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},r.prototype.getLength=function(){return this.$lines.length},r.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},r.prototype.getLinesForRange=function(n){var s;if(n.start.row===n.end.row)s=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{s=this.getLines(n.start.row,n.end.row),s[0]=(s[0]||"").substring(n.start.column);var u=s.length-1;n.end.row-n.start.row==u&&(s[u]=s[u].substring(0,n.end.column))}return s},r.prototype.insertLines=function(n,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,s)},r.prototype.removeLines=function(n,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,s)},r.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},r.prototype.insert=function(n,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(n,this.$split(s))},r.prototype.insertInLine=function(n,s){var u=this.clippedPos(n.row,n.column),h=this.pos(n.row,n.column+s.length);return this.applyDelta({start:u,end:h,action:"insert",lines:[s]},!0),this.clonePos(h)},r.prototype.clippedPos=function(n,s){var u=this.getLength();n===void 0?n=u:n<0?n=0:n>=u&&(n=u-1,s=void 0);var h=this.getLine(n);return s==null&&(s=h.length),s=Math.min(Math.max(s,0),h.length),{row:n,column:s}},r.prototype.clonePos=function(n){return{row:n.row,column:n.column}},r.prototype.pos=function(n,s){return{row:n,column:s}},r.prototype.$clipPosition=function(n){var s=this.getLength();return n.row>=s?(n.row=Math.max(0,s-1),n.column=this.getLine(s-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},r.prototype.insertFullLines=function(n,s){n=Math.min(Math.max(n,0),this.getLength());var u=0;n<this.getLength()?(s=s.concat([""]),u=0):(s=[""].concat(s),n--,u=this.$lines[n].length),this.insertMergedLines({row:n,column:u},s)},r.prototype.insertMergedLines=function(n,s){var u=this.clippedPos(n.row,n.column),h={row:u.row+s.length-1,column:(s.length==1?u.column:0)+s[s.length-1].length};return this.applyDelta({start:u,end:h,action:"insert",lines:s}),this.clonePos(h)},r.prototype.remove=function(n){var s=this.clippedPos(n.start.row,n.start.column),u=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:s,end:u,action:"remove",lines:this.getLinesForRange({start:s,end:u})}),this.clonePos(s)},r.prototype.removeInLine=function(n,s,u){var h=this.clippedPos(n,s),p=this.clippedPos(n,u);return this.applyDelta({start:h,end:p,action:"remove",lines:this.getLinesForRange({start:h,end:p})},!0),this.clonePos(h)},r.prototype.removeFullLines=function(n,s){n=Math.min(Math.max(0,n),this.getLength()-1),s=Math.min(Math.max(0,s),this.getLength()-1);var u=s==this.getLength()-1&&n>0,h=s<this.getLength()-1,p=u?n-1:n,m=u?this.getLine(p).length:0,g=h?s+1:s,d=h?0:this.getLine(g).length,y=new t(p,m,g,d),L=this.$lines.slice(n,s+1);return this.applyDelta({start:y.start,end:y.end,action:"remove",lines:this.getLinesForRange(y)}),L},r.prototype.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},r.prototype.replace=function(n,s){if(n instanceof t||(n=t.fromPoints(n.start,n.end)),s.length===0&&n.isEmpty())return n.start;if(s==this.getTextRange(n))return n.end;this.remove(n);var u;return s?u=this.insert(n.start,s):u=n.start,u},r.prototype.applyDeltas=function(n){for(var s=0;s<n.length;s++)this.applyDelta(n[s])},r.prototype.revertDeltas=function(n){for(var s=n.length-1;s>=0;s--)this.revertDelta(n[s])},r.prototype.applyDelta=function(n,s){var u=n.action=="insert";(u?n.lines.length<=1&&!n.lines[0]:!t.comparePoints(n.start,n.end))||(u&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(c(this.$lines,n,s),this._signal("change",n)))},r.prototype.$safeApplyDelta=function(n){var s=this.$lines.length;(n.action=="remove"&&n.start.row<s&&n.end.row<s||n.action=="insert"&&n.start.row<=s)&&this.applyDelta(n)},r.prototype.$splitAndapplyLargeDelta=function(n,s){for(var u=n.lines,h=u.length-s+1,p=n.start.row,m=n.start.column,g=0,d=0;g<h;g=d){d+=s-1;var y=u.slice(g,d);y.push(""),this.applyDelta({start:this.pos(p+g,m),end:this.pos(p+d,m=0),action:n.action,lines:y},!0)}n.lines=u.slice(g),n.start.row=p+g,n.start.column=m,this.applyDelta(n,!0)},r.prototype.revertDelta=function(n){this.$safeApplyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})},r.prototype.indexToPosition=function(n,s){for(var u=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,p=s||0,m=u.length;p<m;p++)if(n-=u[p].length+h,n<0)return{row:p,column:n+u[p].length+h};return{row:m-1,column:n+u[m-1].length+h}},r.prototype.positionToIndex=function(n,s){for(var u=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,p=0,m=Math.min(n.row,u.length),g=s||0;g<m;++g)p+=u[g].length+h;return p+n.column},r}();o.prototype.$split="aaa".split(/a/).length===0?function(r){return r.replace(/\r\n|\r/g,`
`).split(`
`)}:function(r){return r.split(/\r\n|\r|\n/)},o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",l.implement(o.prototype,i),f.Document=o}),ace.define("ace/lib/lang",[],function(a,f,v){"use strict";f.last=function(i){return i[i.length-1]},f.stringReverse=function(i){return i.split("").reverse().join("")},f.stringRepeat=function(i,t){for(var e="";t>0;)t&1&&(e+=i),(t>>=1)&&(i+=i);return e};var l=/^\s\s*/,c=/\s\s*$/;f.stringTrimLeft=function(i){return i.replace(l,"")},f.stringTrimRight=function(i){return i.replace(c,"")},f.copyObject=function(i){var t={};for(var e in i)t[e]=i[e];return t},f.copyArray=function(i){for(var t=[],e=0,o=i.length;e<o;e++)i[e]&&typeof i[e]=="object"?t[e]=this.copyObject(i[e]):t[e]=i[e];return t},f.deepCopy=function i(t){if(typeof t!="object"||!t)return t;var e;if(Array.isArray(t)){e=[];for(var o=0;o<t.length;o++)e[o]=i(t[o]);return e}if(Object.prototype.toString.call(t)!=="[object Object]")return t;e={};for(var o in t)e[o]=i(t[o]);return e},f.arrayToMap=function(i){for(var t={},e=0;e<i.length;e++)t[i[e]]=1;return t},f.createMap=function(i){var t=Object.create(null);for(var e in i)t[e]=i[e];return t},f.arrayRemove=function(i,t){for(var e=0;e<=i.length;e++)t===i[e]&&i.splice(e,1)},f.escapeRegExp=function(i){return i.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},f.escapeHTML=function(i){return(""+i).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},f.getMatchOffsets=function(i,t){var e=[];return i.replace(t,function(o){e.push({offset:arguments[arguments.length-2],length:o.length})}),e},f.deferredCall=function(i){var t=null,e=function(){t=null,i()},o=function(r){return o.cancel(),t=setTimeout(e,r||0),o};return o.schedule=o,o.call=function(){return this.cancel(),i(),o},o.cancel=function(){return clearTimeout(t),t=null,o},o.isPending=function(){return t},o},f.delayedCall=function(i,t){var e=null,o=function(){e=null,i()},r=function(n){e==null&&(e=setTimeout(o,n||t))};return r.delay=function(n){e&&clearTimeout(e),e=setTimeout(o,n||t)},r.schedule=r,r.call=function(){this.cancel(),i()},r.cancel=function(){e&&clearTimeout(e),e=null},r.isPending=function(){return e},r}}),ace.define("ace/worker/mirror",[],function(a,f,v){"use strict";var l=a("../document").Document,c=a("../lib/lang"),i=f.Mirror=function(t){this.sender=t;var e=this.doc=new l(""),o=this.deferredUpdate=c.delayedCall(this.onUpdate.bind(this)),r=this;t.on("change",function(n){var s=n.data;if(s[0].start)e.applyDeltas(s);else for(var u=0;u<s.length;u+=2){var h,p;if(Array.isArray(s[u+1])?h={action:"insert",start:s[u],lines:s[u+1]}:h={action:"remove",start:s[u],end:s[u+1]},(h.action=="insert"?h.start:h.end).row>=e.$lines.length)throw p=new Error("Invalid delta"),p.data={path:r.$path,linesLength:e.$lines.length,start:h.start,end:h.end},p;e.applyDelta(h,!0)}if(r.$timeout)return o.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(t){this.$timeout=t},this.setValue=function(t){this.doc.setValue(t),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(t){this.sender.callback(this.doc.getValue(),t)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(i.prototype)})}}]);