"no use strict";
!(function(window) {
if (typeof window.window != "undefined" && window.document)
return;
if (window.require && window.define)
return;
if (!window.console) {
window.console = function() {
var msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
};
window.console.error =
window.console.warn =
window.console.log =
window.console.trace = window.console;
}
window.window = window;
window.ace = window;
window.onerror = function(message, file, line, col, err) {
postMessage({type: "error", data: {
message: message,
data: err.data,
file: file,
line: line,
col: col,
stack: err.stack
}});
};
window.normalizeModule = function(parentId, moduleName) {
// normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
// normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
moduleName = (base ? base + "/" : "") + moduleName;
while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
return moduleName;
};
window.require = function require(parentId, id) {
if (!id) {
id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
id = window.normalizeModule(parentId, id);
var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
module.exports = module.factory().exports;
}
return module.exports;
}
if (!window.require.tlns)
return console.log("unable to load " + id);
var path = resolveModuleId(id, window.require.tlns);
if (path.slice(-3) != ".js") path += ".js";
window.require.id = id;
window.require.modules[id] = {}; // prevent infinite loop on broken modules
importScripts(path);
return window.require(parentId, id);
};
function resolveModuleId(id, paths) {
var testPath = id, tail = "";
while (testPath) {
var alias = paths[testPath];
if (typeof alias == "string") {
return alias + tail;
} else if (alias) {
return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
} else if (alias === false) {
return "";
}
var i = testPath.lastIndexOf("/");
if (i === -1) break;
tail = testPath.substr(i) + tail;
testPath = testPath.slice(0, i);
}
return id;
}
window.require.modules = {};
window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
deps = [];
id = window.require.id;
}
if (typeof factory != "function") {
window.require.modules[id] = {
exports: factory,
initialized: true
};
return;
}
if (!deps.length)
// If there is no dependencies, we inject "require", "exports" and
// "module" as dependencies, to provide CommonJS compatibility.
deps = ["require", "exports", "module"];
var req = function(childId) {
return window.require(id, childId);
};
window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) {
switch (dep) {
// Because "require", "exports" and "module" aren't actual
// dependencies, we must handle them seperately.
case "require": return req;
case "exports": return module.exports;
case "module": return module;
// But for all other dependencies, we can just go ahead and
// require them.
default: return req(dep);
}
}));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
window.define.amd = {};
require.tlns = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
for (var i in topLevelNamespaces)
require.tlns[i] = topLevelNamespaces[i];
};
window.initSender = function initSender() {
var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
var oop = window.require("ace/lib/oop");
var Sender = function() {};
(function() {
oop.implement(this, EventEmitter);
this.callback = function(data, callbackId) {
postMessage({
type: "call",
id: callbackId,
data: data
});
};
this.emit = function(name, data) {
postMessage({
type: "event",
name: name,
data: data
});
};
}).call(Sender.prototype);
return new Sender();
};
var main = window.main = null;
var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
if (msg.event && sender) {
sender._signal(msg.event, msg.data);
}
else if (msg.command) {
if (main[msg.command])
main[msg.command].apply(main, msg.args);
else if (window[msg.command])
window[msg.command].apply(window, msg.args);
else
throw new Error("Unknown command:" + msg.command);
}
else if (msg.init) {
window.initBaseUrls(msg.tlns);
sender = window.sender = window.initSender();
var clazz = require(msg.module)[msg.classname];
main = window.main = new clazz(sender);
}
};
})(this);
ace.define("ace/lib/oop",[], function(require, exports, module) {
"use strict";
exports.inherits = function(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
exports.mixin = function(obj, mixin) {
for (var key in mixin) {
obj[key] = mixin[key];
}
return obj;
};
exports.implement = function(proto, mixin) {
exports.mixin(proto, mixin);
};
});
ace.define("ace/range",[], function(require, exports, module) {
"use strict";
var comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
};
var Range = function(startRow, startColumn, endRow, endColumn) {
this.start = {
row: startRow,
column: startColumn
};
this.end = {
row: endRow,
column: endColumn
};
};
(function() {
this.isEqual = function(range) {
return this.start.row === range.start.row &&
this.end.row === range.end.row &&
this.start.column === range.start.column &&
this.end.column === range.end.column;
};
this.toString = function() {
return ("Range: [" + this.start.row + "/" + this.start.column +
"] -> [" + this.end.row + "/" + this.end.column + "]");
};
this.contains = function(row, column) {
return this.compare(row, column) == 0;
};
this.compareRange = function(range) {
没有合适的资源?快使用搜索试试~ 我知道了~
基于Web的代码编辑器依赖库ace.js
共2000个文件
js:1733个
css:43个
html:21个
需积分: 0 2 下载量 199 浏览量
2024-07-17
20:51:49
上传
评论
收藏 10.97MB ZIP 举报
温馨提示
基于Web的代码编辑器依赖库ace.js。博主亲测可用,能上github的可访问https://github.com/ajaxorg/ace-builds/releases下载,本附件就是其中最新的releases版库。如何使用也可参考ace官网https://ace.c9.io的教程。
资源推荐
资源详情
资源评论
收起资源包目录
基于Web的代码编辑器依赖库ace.js (2000个子文件)
abap.abap 1KB
abc.abc 5KB
ada.ada 99B
autohotkey.ahk 720B
alda.alda 248B
apex.apex 2KB
aql.aql 67B
actionscript.as 1KB
asciidoc.asciidoc 218KB
assembly_x86.asm 506B
batchfile.bat 260B
bro.bro 689B
c9search.c9search_results 817B
haskell_cabal.cabal 3KB
cobol.CBL 1KB
coldfusion.cfm 86B
cirru.cirru 520B
clojure.clj 794B
coffee.coffee 403B
c_cpp.cpp 808B
crystal.cr 746B
csharp.cs 83B
csound_document.csd 173B
razor.cshtml 68B
ace.css 21KB
ambiance.css 4KB
style.css 3KB
tomorrow_night_bright.css 3KB
katzenmilch.css 3KB
tomorrow_night_eighties.css 3KB
dreamweaver.css 3KB
tomorrow_night_blue.css 3KB
chaos.css 3KB
sqlserver.css 3KB
terminal.css 3KB
tomorrow_night.css 3KB
crimson_editor.css 3KB
mono_industrial.css 3KB
chrome.css 2KB
iplastic.css 2KB
one_dark.css 2KB
pastel_on_dark.css 2KB
textmate.css 2KB
dracula.css 2KB
tomorrow.css 2KB
twilight.css 2KB
merbivore_soft.css 2KB
clouds_midnight.css 2KB
gob.css 2KB
monokai.css 2KB
cobalt.css 2KB
solarized_light.css 2KB
kr_theme.css 2KB
solarized_dark.css 2KB
dawn.css 2KB
idle_fingers.css 2KB
merbivore.css 2KB
vibrant_ink.css 2KB
github.css 2KB
nord_dark.css 2KB
kuroir.css 2KB
styles.css 2KB
eclipse.css 2KB
clouds.css 2KB
xcode.css 2KB
gruvbox.css 1KB
css.css 738B
curly.curly 301B
d.d 324B
dart.dart 489B
diff.diff 2KB
Dockerfile 2KB
dot.dot 6KB
drools.drl 3KB
asl.dsl 2KB
eiffel.e 375B
edifact.edi 541B
html_elixir.eex 595B
ejs.ejs 752B
elm.elm 487B
puppet.epp 1KB
html_ruby.erb 518B
erlang.erl 487B
elixir.ex 692B
fortran.f90 713B
gherkin.feature 699B
forth.frt 979B
fsharp.fsi 390B
fsl.fsl 1KB
ftl.ftl 1017B
gobstones.gbs 4KB
gcode.gcode 521B
.gitignore 127B
glsl.glsl 512B
golang.go 641B
graphqlschema.gql 1KB
groovy.groovy 1KB
haml.haml 1KB
handlebars.hbs 173B
hjson.hjson 319B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
聆听-往昔
- 粉丝: 199
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- NSArgumentNullException如何解决.md
- VueError解决办法.md
- buvid、did参数生成算法
- tiny-cuda-cnn.zip
- 关于月度总结的PPT模板
- 手表品牌与型号数据集,手表型号数据
- 基于Java实现(IDEA)的贪吃蛇游戏-源码+jar文件+项目报告
- 数字按键3.2考试代码
- 颜色拾取器 for Windows
- 台球检测40-YOLO(v5至v11)、COCO、CreateML、Paligemma、TFRecord、VOC数据集合集.rar
- # 基于MATLAB的导航科学计算库
- Qt源码ModbusTCP 主机客户端通信程序 基于QT5 QWidget, 实现ModbusTCP 主机客户端通信,支持以下功能: 1、支持断线重连 2、通过INI文件配置自定义服务器I
- tesseract ocr 训练相关的环境部署包,包括jdk-8u331-windows-x64.exe、jTessBoxEditorFX-2.6.0.zip 等
- 好用的Linux终端管理工具,支持自定义多行脚本命令,密码保存、断链续接,SFTP等功能
- 大学毕业设计写作与答辩指南:选题、研究方法及PPT制作
- 小偏差线性化模型,航空发动机线性化,非线性系统线性化,求解线性系统具体参数,最小二乘拟合 MATLAB Simulink 航空发动机,非线性,线性,非线性系统,线性系统,最小二乘,拟合,小偏差,系统辨
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功