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