${KOD_VERSION} release
parent
f5bcdaddf4
commit
ab6361bff9
15
ChangeLog.md
15
ChangeLog.md
|
@ -1,3 +1,14 @@
|
|||
|
||||
|
||||
### ver4.45 `2021/04/07`
|
||||
- 更新检测文件多种引入方式;
|
||||
- php7.4,php8兼容
|
||||
- x-senffile 下载加速支持
|
||||
- 对话框打开url; https协议不同时新窗口打开;
|
||||
- 上传合并优化加速处理;
|
||||
- 解压 构造漏洞修复;
|
||||
后端加密方式优化
|
||||
|
||||
### ver4.40 `2019/3/21`
|
||||
-----
|
||||
#### update:
|
||||
|
@ -831,7 +842,7 @@
|
|||
- 新建office文档;office文档预览(所有支持的列表);内网实现预览(服务端转换——pdf)
|
||||
- 虚拟目录多选操作右键菜单:收藏夹;我所在的组、全部组;我的共享
|
||||
- 虚拟目录选中(多选)快捷键操作:屏蔽删除、复制、剪切、重命名
|
||||
- 文件图标排列时,高度自适应,文件名最高四行文字
;(桌面特殊处理);拖动到指定文件夹放大效果
|
||||
- 文件图标排列时,高度自适应,文件名最高四行文字;(桌面特殊处理);拖动到指定文件夹放大效果
|
||||
- xxs问题优化:文件名特殊处理,对应地址栏、树目录、重命名展示、分享等展示的地方统一做处理
|
||||
- 新建文件,重命名文件;(icon,自动高度后 优化;图标和列表模式)
|
||||
- 不同类型目录之间切换:单选、多选;右键菜单还原(目录、回收站、分享目录、收藏夹、所有群组、我的群组等)
|
||||
|
@ -1000,7 +1011,7 @@
|
|||
- 全局字体调整;用em作单位
|
||||
- 各种错误提示优化,更好的兼容php各种环境;
|
||||
- 首次登陆目录不可写提示,登陆页面多语言选择
|
||||
- 登陆页面密码找回提示;管理员密码快速找回;
|
||||
- 登陆页面密码找回提示;管理员密码快速找回;
|
||||
- 验证码复杂性增强
|
||||
- 没有GD库则【关闭验证码;图片直接输出-不生成缩略图】
|
||||
- 登陆:ajax方式(成功&失败)[失败原因码——验证码:换图片;输入框焦点设置]
|
||||
|
|
|
@ -119,7 +119,7 @@ class app extends Controller{
|
|||
|
||||
public function getUrlTitle(){
|
||||
$html = curl_get_contents($this->in['url']);
|
||||
$result = matching($html,"<title>(.*)<\/title>");
|
||||
$result = match_text($html,"<title>(.*)<\/title>");
|
||||
if (strlen($result)>50) {
|
||||
$result = mb_substr($result,0,50,'utf-8');
|
||||
}
|
||||
|
|
|
@ -89,7 +89,11 @@ class explorer extends Controller{
|
|||
unset($data['downloadPath']);
|
||||
}
|
||||
if($data['size'] < 100*1024|| isset($this->in['getMd5'])){//100kb
|
||||
$data['fileMd5'] = @md5_file($file);
|
||||
if($data['size'] <= 1024*1024*100){
|
||||
$data['fileMd5'] = @md5_file($file);
|
||||
}else{
|
||||
$data['fileMd5'] = "---";
|
||||
}
|
||||
}else{
|
||||
$data['fileMd5'] = "...";
|
||||
}
|
||||
|
@ -184,8 +188,8 @@ class explorer extends Controller{
|
|||
}
|
||||
}
|
||||
Hook::trigger("explorer.mkdirBefore",$path);
|
||||
if(mk_dir($path,DEFAULT_DIR_PERRMISSIONS)){
|
||||
chmod_path($path,DEFAULT_DIR_PERRMISSIONS);
|
||||
if(mk_dir($path,DEFAULT_PERRMISSIONS)){
|
||||
chmod_path($path,DEFAULT_PERRMISSIONS);
|
||||
Hook::trigger("explorer.mkdirAfter",$path);
|
||||
return true;
|
||||
}
|
||||
|
@ -948,7 +952,7 @@ class explorer extends Controller{
|
|||
}
|
||||
}
|
||||
}
|
||||
$zipFile = $this->zip($userTemp,rand_string(9).'-',fasle);//下载文件夹删除;不检测和记录空间变更
|
||||
$zipFile = $this->zip($userTemp,rand_string(9).'-',false);//下载文件夹删除;不检测和记录空间变更
|
||||
show_json(LNG('zip_success'),true,get_path_this($zipFile));
|
||||
}
|
||||
public function zip($zipPath='',$namePre = "",$checkSpaceChange = true){
|
||||
|
@ -998,7 +1002,7 @@ class explorer extends Controller{
|
|||
$info = LNG('zip_success').LNG('size').":".size_format(filesize($zipname));
|
||||
show_json($info,true,_DIR_OUT(iconv_app($zipname)) );
|
||||
}else{
|
||||
show_json(LNG.error,false);
|
||||
show_json(LNG('error'),false);
|
||||
}
|
||||
}else{
|
||||
return iconv_app($zipname);
|
||||
|
@ -1272,13 +1276,6 @@ class explorer extends Controller{
|
|||
$GLOBALS['kodPathAuthCheck'] = true;//组权限发生变更。导致访问groupPath 无权限退出问题
|
||||
foreach($favList as $key => $val){
|
||||
$thePath = _DIR($val['path']);
|
||||
$hasChildren = path_haschildren($thePath,$checkFile);
|
||||
if( !isset($val['type'])){
|
||||
$val['type'] = 'folder';
|
||||
}
|
||||
if( $val['type'] == 'folder' && $val['ext'] != 'tree-fav'){
|
||||
$hasChildren = true;
|
||||
}
|
||||
$cell = array(
|
||||
'name' => $val['name'],
|
||||
'ext' => $val['ext'],
|
||||
|
|
|
@ -89,7 +89,7 @@ class setting extends Controller{
|
|||
}
|
||||
show_json(LNG('success'),true);
|
||||
}
|
||||
private function clearSession(){
|
||||
private function _clearSession(){
|
||||
del_dir(KOD_SESSION);
|
||||
}
|
||||
private function _clearCache(){
|
||||
|
|
|
@ -15,7 +15,7 @@ class share extends Controller{
|
|||
parent::__construct();
|
||||
$auth = systemRole::getInfo(1);//经过role检测
|
||||
|
||||
$arrNotCheck = array('commonJs');
|
||||
$arrNotCheck = array('commonJs','manifest','manifestJS');
|
||||
if(substr($this->in['fileUrl'],0,4) == 'http'){
|
||||
$arrNotCheck[] = 'fileGet';
|
||||
}
|
||||
|
@ -278,7 +278,24 @@ class share extends Controller{
|
|||
}
|
||||
echo 'LNG='.$lang.';G.useTime='.$useTime.';';
|
||||
}
|
||||
|
||||
//chrome安装: 必须https;serviceWorker引入处理;manifest配置; [manifest.json配置目录同sw.js引入];
|
||||
public function manifest(){
|
||||
$json = file_get_contents(BASIC_PATH.'static/others/app/manifest.json');
|
||||
$name = stristr(I18n::getType(),'zh') ? '可道云':'kodExplorer';
|
||||
$static = STATIC_PATH == './static/' ? APP_HOST.'static/':STATIC_PATH;
|
||||
$assign = array(
|
||||
"{{name}}" => $name,
|
||||
"{{appDesc}}" => LNG('common.copyright.name'),
|
||||
"{{static}}" => $static,
|
||||
);
|
||||
$json = str_replace(array_keys($assign),array_values($assign),$json);
|
||||
header("Content-Type: application/javascript; charset=utf-8");
|
||||
echo $json;
|
||||
}
|
||||
public function manifestJS(){
|
||||
header("Content-Type: application/javascript; charset=utf-8");
|
||||
echo file_get_contents(BASIC_PATH.'static/others/app/sw.js');
|
||||
}
|
||||
|
||||
|
||||
//========ajax function============
|
||||
|
|
|
@ -28,7 +28,7 @@ class user extends Controller{
|
|||
$this->notCheckST = array('share','debug');
|
||||
$this->notCheckACT = array(
|
||||
'loginFirst','login','logout','loginSubmit',
|
||||
'checkCode','publicLink','qrcode','sso');
|
||||
'checkCode','publicLink','qrcode','sso','appConfig');
|
||||
|
||||
$this->notCheckApp = array();//'pluginApp.to'
|
||||
if(!$this->user){
|
||||
|
@ -42,6 +42,7 @@ class user extends Controller{
|
|||
|
||||
public function bindHook(){
|
||||
$this->loadModel('Plugin')->init();
|
||||
$this->bindCheckPassword();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -154,6 +155,42 @@ class user extends Controller{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function _loginCheckPassword($user,$password){
|
||||
if($this->checkPassword($password)) return;
|
||||
if($user['role'] == '1'){ // 管理员,提示修改;
|
||||
if(isset($_SESSION['adminPasswordTips'])) return;
|
||||
@session_start();
|
||||
$_SESSION['adminPasswordTips']= 1;
|
||||
@session_write_close();
|
||||
show_tips("安全提示:<br/><br/>密码长度必须大于6,同时包含英文和数字;<br/>强烈建议登陆后修改密码!",false);
|
||||
}
|
||||
show_tips("密码长度必须大于6,同时包含英文和数字;<br/>请联系管理员修改后再试!",false);
|
||||
}
|
||||
private function checkPassword($password){
|
||||
if(INSTALL_CHANNEL =='hikvision.com'){
|
||||
$this->config['settingSystemDefault']['passwordCheck'] = '1';
|
||||
}
|
||||
if($this->config['settingSystemDefault']['passwordCheck'] == '0') return true;
|
||||
|
||||
$hasNumber = preg_match('/\d/',$password);
|
||||
$hasChar = preg_match('/[A-Za-z]/',$password);
|
||||
if( strlen($password) >= 6 && $hasNumber && $hasChar) return true;
|
||||
return false;
|
||||
}
|
||||
private function bindCheckPassword(){
|
||||
$action = strtolower(ST.'.'.ACT);
|
||||
$check = array(
|
||||
'user.changepassword' => 'passwordNew',
|
||||
'systemmember.edit' => 'password',
|
||||
'systemmember.add' => 'password',
|
||||
);
|
||||
if(!isset($check[$action])) return;
|
||||
|
||||
$password = $this->in[$check[$action]];
|
||||
if($this->checkPassword($password)) return;
|
||||
show_json("密码长度必须大于6,同时包含英文和数字;<br/>请联系管理员修改后再试!",false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 共享kod登陆并跳转
|
||||
|
@ -443,6 +480,7 @@ class user extends Controller{
|
|||
}
|
||||
|
||||
//首次登陆,初始化app 没有最后登录时间
|
||||
$this->_loginCheckPassword($user,$password);
|
||||
$this->_loginSuccess($user);//登陆成功
|
||||
if(!$user['lastLogin']){
|
||||
$app = init_controller('app');
|
||||
|
@ -606,7 +644,7 @@ class user extends Controller{
|
|||
ob_get_clean();
|
||||
QRcode::png($this->in['url']);
|
||||
}else{
|
||||
header('location: http://qr.topscan.com/api.php?text='.rawurlencode($url));
|
||||
header('location: https://demo.kodcloud.com/?user/view/qrcode&url='.rawurlencode($url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -348,24 +348,6 @@ function array_try($array, $callback){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 求多个数组的并集
|
||||
function array_union(){
|
||||
$argsCount = func_num_args();
|
||||
if ($argsCount < 2) {
|
||||
return false;
|
||||
} else if (2 === $argsCount) {
|
||||
list($arr1, $arr2) = func_get_args();
|
||||
|
||||
while ((list($k, $v) = each($arr2))) {
|
||||
if (!in_array($v, $arr1)) $arr1[] = $v;
|
||||
}
|
||||
return $arr1;
|
||||
} else { // 三个以上的数组合并
|
||||
$arg_list = func_get_args();
|
||||
$all = call_user_func_array('array_union', $arg_list);
|
||||
return array_union($arg_list[0], $all);
|
||||
}
|
||||
}
|
||||
// 取出数组中第n项
|
||||
function array_get_index($arr,$index){
|
||||
|
@ -446,7 +428,7 @@ function fatalErrorHandler(){
|
|||
}
|
||||
|
||||
function show_tips($message,$url= '', $time = 3,$title = '',$exit = true){
|
||||
ob_get_clean();
|
||||
ob_get_clean();$time=500;
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$goto = "content='$time;url=$url'";
|
||||
$info = "{$time}s 后自动跳转, <a href='$url'>立即跳转</a>";
|
||||
|
@ -669,9 +651,9 @@ function show_json($data,$code = true,$info=''){
|
|||
|
||||
function show_trace(){
|
||||
echo '<pre>';
|
||||
var_dump(func_get_args());
|
||||
var_dump(json_encode(func_get_args()));
|
||||
echo '<hr/>';
|
||||
echo get_caller_info();
|
||||
print_r(get_caller_info());
|
||||
echo '</pre>';
|
||||
exit;
|
||||
}
|
||||
|
@ -759,7 +741,7 @@ function html2txt($document){
|
|||
}
|
||||
|
||||
// 获取内容第一条
|
||||
function matching($content, $preg){
|
||||
function match_text($content, $preg){
|
||||
$preg = "/" . $preg . "/isU";
|
||||
preg_match($preg, $content, $result);
|
||||
return $result[1];
|
||||
|
@ -837,7 +819,7 @@ function get_utf8_str($string, $length, $dot = '...'){
|
|||
* @param string $suffix 截断显示字符
|
||||
* @return string
|
||||
*/
|
||||
function msubstr($str, $start = 0, $length = 0, $charset = "utf-8", $suffix = true){
|
||||
function msubstr($str, $start = 0, $length, $charset = "utf-8", $suffix = true){
|
||||
if (function_exists("mb_substr")) {
|
||||
$i_str_len = mb_strlen($str);
|
||||
$s_sub_str = mb_substr($str, $start, $length, $charset);
|
||||
|
@ -912,25 +894,12 @@ function dump(){call_user_func('pr',func_get_args());}
|
|||
function debug_out(){call_user_func('pr',func_get_args());}
|
||||
|
||||
/**
|
||||
* 取$from~$to范围内的随机数
|
||||
*
|
||||
* @param $from 下限
|
||||
* @param $to 上限
|
||||
* @return unknown_type
|
||||
* 取$from~$to范围内的随机数,包含$from,$to;
|
||||
*/
|
||||
function rand_from_to($from, $to){
|
||||
$size = $to - $from; //数值区间
|
||||
$max = 30000; //最大
|
||||
if ($size < $max) {
|
||||
return $from + mt_rand(0, $size);
|
||||
} else {
|
||||
if ($size % $max) {
|
||||
return $from + random_from_to(0, $size / $max) * $max + mt_rand(0, $size % $max);
|
||||
} else {
|
||||
return $from + random_from_to(0, $size / $max) * $max + mt_rand(0, $max);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mt_rand($from,$to);
|
||||
// return $from + mt_rand(0, $to - $from);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产生随机字串,可用来自动生成密码 默认长度6位 字母和数字混合
|
||||
|
@ -1036,4 +1005,4 @@ function pkcs5_unpad($text){
|
|||
function pkcs5_pad($text, $block = 8){
|
||||
$pad = $block - (strlen($text) % $block);
|
||||
return $text . str_repeat(chr($pad), $pad);
|
||||
}
|
||||
}
|
|
@ -80,51 +80,50 @@ function path_filter($path){
|
|||
//filesize 解决大于2G 大小问题
|
||||
//http://stackoverflow.com/questions/5501451/php-x86-how-to-get-filesize-of-2-gb-file-without-external-program
|
||||
function get_filesize($path){
|
||||
$result = false;
|
||||
$fp = fopen($path,"r");
|
||||
if(! $fp = fopen($path,"r")) return $result;
|
||||
if(PHP_INT_SIZE >= 8 ){ //64bit
|
||||
$result = (float)(abs(sprintf("%u",@filesize($path))));
|
||||
return (float)(abs(sprintf("%u",@filesize($path))));
|
||||
}
|
||||
|
||||
$fp = fopen($path,"r");
|
||||
if(!$fp) return $result;
|
||||
if (fseek($fp, 0, SEEK_END) === 0) {
|
||||
$result = 0.0;
|
||||
$step = 0x7FFFFFFF;
|
||||
while ($step > 0) {
|
||||
if (fseek($fp, - $step, SEEK_CUR) === 0) {
|
||||
$result += floatval($step);
|
||||
} else {
|
||||
$step >>= 1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (fseek($fp, 0, SEEK_END) === 0) {
|
||||
$result = 0.0;
|
||||
$step = 0x7FFFFFFF;
|
||||
while ($step > 0) {
|
||||
if (fseek($fp, - $step, SEEK_CUR) === 0) {
|
||||
$result += floatval($step);
|
||||
} else {
|
||||
$step >>= 1;
|
||||
}
|
||||
static $iswin;
|
||||
if (!isset($iswin)) {
|
||||
$iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
|
||||
}
|
||||
static $exec_works;
|
||||
if (!isset($exec_works)) {
|
||||
$exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC');
|
||||
}
|
||||
if ($iswin && class_exists("COM")) {
|
||||
try {
|
||||
$fsobj = new COM('Scripting.FileSystemObject');
|
||||
$f = $fsobj->GetFile( realpath($path) );
|
||||
$size = $f->Size;
|
||||
} catch (Exception $e) {
|
||||
$size = null;
|
||||
}
|
||||
if (is_numeric($size)) {
|
||||
$result = $size;
|
||||
}
|
||||
}else if ($exec_works){
|
||||
$cmd = ($iswin) ? "for %F in (\"$path\") do @echo %~zF" : "stat -c%s \"$path\"";
|
||||
@exec($cmd, $output);
|
||||
if (is_array($output) && is_numeric($size = trim(implode("\n", $output)))) {
|
||||
$result = $size;
|
||||
}
|
||||
}else{
|
||||
static $iswin;
|
||||
if (!isset($iswin)) {
|
||||
$iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
|
||||
}
|
||||
static $exec_works;
|
||||
if (!isset($exec_works)) {
|
||||
$exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC');
|
||||
}
|
||||
if ($iswin && class_exists("COM")) {
|
||||
try {
|
||||
$fsobj = new COM('Scripting.FileSystemObject');
|
||||
$f = $fsobj->GetFile( realpath($path) );
|
||||
$size = $f->Size;
|
||||
} catch (Exception $e) {
|
||||
$size = null;
|
||||
}
|
||||
if (is_numeric($size)) {
|
||||
$result = $size;
|
||||
}
|
||||
}else if ($exec_works){
|
||||
$cmd = ($iswin) ? "for %F in (\"$path\") do @echo %~zF" : "stat -c%s \"$path\"";
|
||||
@exec($cmd, $output);
|
||||
if (is_array($output) && is_numeric($size = trim(implode("\n", $output)))) {
|
||||
$result = $size;
|
||||
}
|
||||
}else{
|
||||
$result = filesize($path);
|
||||
}
|
||||
$result = filesize($path);
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
|
@ -424,10 +423,12 @@ function path_haschildren($dir,$checkFile=false){
|
|||
$fullpath = $dir.$file;
|
||||
if ($checkFile) {//有子目录或者文件都说明有子内容
|
||||
if(@is_file($fullpath) || is_dir($fullpath.'/')){
|
||||
closedir($dh);
|
||||
return true;
|
||||
}
|
||||
}else{//只检查有没有文件
|
||||
if(@is_dir($fullpath.'/')){//解决部分主机报错问题
|
||||
closedir($dh);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +600,7 @@ function move_path($source,$dest,$repeat_add='',$repeat_type='replace'){
|
|||
$file_success += move_file($f,$path,$repeat_add,$repeat_type);
|
||||
}
|
||||
foreach($dirs as $f){
|
||||
rmdir($f);
|
||||
@rmdir($f);
|
||||
}
|
||||
@rmdir($source);
|
||||
if($file_success == count($files)){
|
||||
|
@ -1038,25 +1039,26 @@ function file_put_out($file,$download=-1,$downFilename=false){
|
|||
header("X-Powered-By: kodExplorer.");
|
||||
header("X-FileSize: ".$file_size);
|
||||
|
||||
//调用webserver下载
|
||||
$server = strtolower($_SERVER['SERVER_SOFTWARE']);
|
||||
if($server && $GLOBALS['config']['settings']['httpSendFile']){
|
||||
if(strstr($server,'nginx')){//nginx
|
||||
header('X-Accel-Redirect: '.$file);
|
||||
}else if(strstr($server,'apache')){ //apache
|
||||
header("X-Sendfile: ".$file);
|
||||
}else if(strstr($server,'http')){//light http
|
||||
header( "X-LIGHTTPD-send-file: " . $file);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//远程路径不支持断点续传;打开zip内部文件
|
||||
if(!file_exists($file)){
|
||||
header('HTTP/1.1 200 OK');
|
||||
header('Content-Length: '.($end+1));
|
||||
return;
|
||||
}
|
||||
|
||||
//调用webserver下载
|
||||
$server = strtolower($_SERVER['SERVER_SOFTWARE']);
|
||||
if($server && $GLOBALS['config']['settings']['httpSendFile']){
|
||||
if(strstr($server,'nginx')){//nginx
|
||||
header("X-Accel-Redirect: ".$file);
|
||||
}else if(strstr($server,'apache')){ //apache
|
||||
header('X-Sendfile: '.$file);
|
||||
}else if(strstr($server,'http')){//light http
|
||||
header( "X-LIGHTTPD-send-file: " . $file);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
header("Accept-Ranges: bytes");
|
||||
if (isset($_SERVER['HTTP_RANGE'])){
|
||||
if (preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches)){
|
||||
|
@ -1211,8 +1213,10 @@ function kod_move_uploaded_file($fromPath,$savePath){
|
|||
show_json('move uploaded file error!',false);
|
||||
}
|
||||
}
|
||||
|
||||
$result = rename($tempPath,$savePath);
|
||||
if(!$result = rename($tempPath,$savePath)){
|
||||
del_file($savePath);
|
||||
$result = rename($tempPath,$savePath);
|
||||
}
|
||||
chmod_path($savePath,DEFAULT_PERRMISSIONS);
|
||||
return $result;
|
||||
}
|
||||
|
@ -1447,4 +1451,4 @@ function write_log($log, $type = 'default', $level = 'log'){
|
|||
}
|
||||
clearstatcache();
|
||||
return error_log("$now_time $log\n", 3, $target);
|
||||
}
|
||||
}
|
|
@ -59,16 +59,19 @@ function zip_pre_name($fileName,$toCharset=false){
|
|||
return $result;
|
||||
}
|
||||
|
||||
//解压缩文件名检测
|
||||
function unzip_filter_ext($name){
|
||||
$add = '.txt';
|
||||
if(checkExt($name)){//允许
|
||||
if( checkExt($name) &&
|
||||
!stristr($name,'user.ini') &&
|
||||
!stristr($name,'.htaccess')
|
||||
){//允许
|
||||
return $name;
|
||||
}
|
||||
return $name.$add;
|
||||
}
|
||||
//解压到kod,文件名处理;识别编码并转换到当前系统编码
|
||||
function unzip_pre_name($fileName){
|
||||
$fileName = str_replace(array('../','..\\',''),'',$fileName);
|
||||
if (!function_exists('iconv')){
|
||||
return unzip_filter_ext($fileName);
|
||||
}
|
||||
|
@ -226,7 +229,7 @@ function file_upload_size(){
|
|||
}
|
||||
|
||||
function check_list_dir(){
|
||||
$url = APP_HOST.'lib/core/';
|
||||
$url = APP_HOST.'app/core/';
|
||||
$find = "Application.class.php";
|
||||
|
||||
@ini_set('default_socket_timeout',1);
|
||||
|
@ -275,7 +278,7 @@ function php_env_check(){
|
|||
function check_cache(){
|
||||
//检查是否更新失效
|
||||
$content = file_get_contents(BASIC_PATH.'config/version.php');
|
||||
$result = matching($content,"'KOD_VERSION','(.*)'");
|
||||
$result = match_text($content,"'KOD_VERSION','(.*)'");
|
||||
if($result != KOD_VERSION){
|
||||
show_tips("您服务器开启了php缓存,文件更新尚未生效;
|
||||
请关闭缓存,或稍后1分钟刷新页面再试!
|
||||
|
|
|
@ -153,7 +153,7 @@ class Services_JSON
|
|||
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
||||
}
|
||||
|
||||
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
||||
$bytes = (ord($utf16[0]) << 8) | ord($utf16[1]);
|
||||
|
||||
switch(true) {
|
||||
case ((0x7F & $bytes) == $bytes):
|
||||
|
@ -206,17 +206,17 @@ class Services_JSON
|
|||
case 2:
|
||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
||||
| (0x3F & ord($utf8{1})));
|
||||
return chr(0x07 & (ord($utf8[0]) >> 2))
|
||||
. chr((0xC0 & (ord($utf8[0]) << 6))
|
||||
| (0x3F & ord($utf8[1])));
|
||||
|
||||
case 3:
|
||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
||||
| (0x7F & ord($utf8{2})));
|
||||
return chr((0xF0 & (ord($utf8[0]) << 4))
|
||||
| (0x0F & (ord($utf8[1]) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8[1]) << 6))
|
||||
| (0x7F & ord($utf8[2])));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
|
@ -609,7 +609,7 @@ class Services_JSON
|
|||
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
||||
// array, or object notation
|
||||
|
||||
if ($str{0} == '[') {
|
||||
if ($str[0]== '[') {
|
||||
$stk = array(SERVICES_JSON_IN_ARR);
|
||||
$arr = array();
|
||||
} else {
|
||||
|
|
|
@ -598,7 +598,7 @@ function url_header($url){
|
|||
if (strstr($name,'=')) $name = substr($name,strrpos($name,'=')+1);
|
||||
if (!$name) $name = 'file.data';
|
||||
}
|
||||
if(isset($header['x-outfilename'])){
|
||||
if(!empty($header['x-outfilename'])){
|
||||
$name = $header['x-outfilename'];
|
||||
}
|
||||
$name = rawurldecode(trim($name,'"'));
|
||||
|
@ -663,7 +663,8 @@ function parse_url_query($url){
|
|||
$params = array();
|
||||
foreach ($queryParts as $param) {
|
||||
$item = explode('=', $param);
|
||||
$params[$item[0]] = $item[1];
|
||||
$key = $item[0]; unset($item[0]);
|
||||
$params[$key] = implode('=', $item);
|
||||
}
|
||||
return $params;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class PluginBase{
|
|||
if(!is_array($systemConfig['pluginList'])){
|
||||
$systemConfig['pluginList'] = array();
|
||||
}
|
||||
if(is_array($systemConfig['pluginList'][$name])){
|
||||
if(is_array($systemConfig['pluginList'][$id])){
|
||||
$systemConfig['pluginList'][$id]['regiest'] = $array;
|
||||
}else{
|
||||
$systemConfig['pluginList'][$id] = array(
|
||||
|
|
|
@ -30,12 +30,12 @@ class MyCaptcha{
|
|||
for($i=0;$i<$fontfile_width && $symbol<$alphabet_length;$i++){
|
||||
$transparent = (imagecolorat($font, $i, 0) >> 24) == 127;
|
||||
if(!$reading_symbol && !$transparent){
|
||||
$font_metrics[$alphabet[$symbol]]=array('start'=>$i);
|
||||
$font_metrics[$alphabet{$symbol}]=array('start'=>$i);
|
||||
$reading_symbol=true;
|
||||
continue;
|
||||
}
|
||||
if($reading_symbol && $transparent){
|
||||
$font_metrics[$alphabet[$symbol]]['end']=$i;
|
||||
$font_metrics[$alphabet{$symbol}]['end']=$i;
|
||||
$reading_symbol=false;
|
||||
$symbol++;
|
||||
continue;
|
||||
|
@ -51,7 +51,7 @@ class MyCaptcha{
|
|||
$odd=mt_rand(0,1);
|
||||
if($odd==0) $odd=-1;
|
||||
for($i=0;$i<$length;$i++){
|
||||
$m=$font_metrics[$this->keystring[$i]];
|
||||
$m=$font_metrics[$this->keystring{$i}];
|
||||
|
||||
$y=(($i%2)*$fluctuation_amplitude - $fluctuation_amplitude/2)*$odd
|
||||
+ mt_rand(-round($fluctuation_amplitude/3), round($fluctuation_amplitude/3))
|
||||
|
@ -149,7 +149,7 @@ class MyCaptcha{
|
|||
while(true){
|
||||
$str = '';
|
||||
for($i=0;$i<$length;$i++){
|
||||
$str .= $allowed_symbols[mt_rand(0,strlen($allowed_symbols)-1)];
|
||||
$str .= $allowed_symbols{mt_rand(0,strlen($allowed_symbols)-1)};
|
||||
}
|
||||
if(!preg_match('/cp|cb|ck|c6|c9|rn|rm|mm|co|do|cl|db|qp|qb|dp|ww/',$str)) break;
|
||||
}
|
||||
|
|
|
@ -2535,7 +2535,7 @@ class lessc_parser {
|
|||
// whitespace after the operator for it to be an expression
|
||||
$needWhite = $whiteBefore && !$this->inParens;
|
||||
|
||||
if ($this->matching(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
|
||||
if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
|
||||
if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) {
|
||||
foreach (self::$supressDivisionProps as $pattern) {
|
||||
if (preg_match($pattern, $this->env->currentProperty)) {
|
||||
|
@ -2662,7 +2662,7 @@ class lessc_parser {
|
|||
}
|
||||
|
||||
// css hack: \0
|
||||
if ($this->literal('\\') && $this->matching('([0-9]+)', $m)) {
|
||||
if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
|
||||
$value = array('keyword', '\\'.$m[1]);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -2766,7 +2766,7 @@ class lessc_parser {
|
|||
$nestingLevel = 0;
|
||||
|
||||
$content = array();
|
||||
while ($this->matching($patt, $m, false)) {
|
||||
while ($this->match($patt, $m, false)) {
|
||||
if (!empty($m[1])) {
|
||||
$content[] = $m[1];
|
||||
if ($nestingOpen) {
|
||||
|
@ -2835,7 +2835,7 @@ class lessc_parser {
|
|||
$oldWhite = $this->eatWhiteDefault;
|
||||
$this->eatWhiteDefault = false;
|
||||
|
||||
while ($this->matching($patt, $m, false)) {
|
||||
while ($this->match($patt, $m, false)) {
|
||||
$content[] = $m[1];
|
||||
if ($m[2] == "@{") {
|
||||
$this->count -= strlen($m[2]);
|
||||
|
@ -2894,7 +2894,7 @@ class lessc_parser {
|
|||
if (!ctype_digit($char) && $char != ".") return false;
|
||||
}
|
||||
|
||||
if ($this->matching('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) {
|
||||
if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) {
|
||||
$unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]);
|
||||
return true;
|
||||
}
|
||||
|
@ -2903,7 +2903,7 @@ class lessc_parser {
|
|||
|
||||
// a # color
|
||||
protected function color(&$out) {
|
||||
if ($this->matching('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) {
|
||||
if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) {
|
||||
if (strlen($m[1]) > 7) {
|
||||
$out = array("string", "", array($m[1]));
|
||||
} else {
|
||||
|
@ -3066,7 +3066,7 @@ class lessc_parser {
|
|||
break; // get out early
|
||||
}
|
||||
|
||||
if ($this->matching('\s+', $m)) {
|
||||
if ($this->match('\s+', $m)) {
|
||||
$attrParts[] = " ";
|
||||
continue;
|
||||
}
|
||||
|
@ -3093,7 +3093,7 @@ class lessc_parser {
|
|||
}
|
||||
|
||||
// operator, handles attr namespace too
|
||||
if ($this->matching('[|-~\$\*\^=]+', $m)) {
|
||||
if ($this->match('[|-~\$\*\^=]+', $m)) {
|
||||
$attrParts[] = $m[0];
|
||||
continue;
|
||||
}
|
||||
|
@ -3133,7 +3133,7 @@ class lessc_parser {
|
|||
$this->eatWhiteDefault = false;
|
||||
|
||||
while (true) {
|
||||
if ($this->matching('(['.$chars.'0-9]['.$chars.']*)', $m)) {
|
||||
if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) {
|
||||
$parts[] = $m[1];
|
||||
if ($simple) break;
|
||||
|
||||
|
@ -3184,7 +3184,7 @@ class lessc_parser {
|
|||
protected function func(&$func) {
|
||||
$s = $this->seek();
|
||||
|
||||
if ($this->matching('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
|
||||
if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
|
||||
$fname = $m[1];
|
||||
|
||||
$sPreArgs = $this->seek();
|
||||
|
@ -3253,7 +3253,7 @@ class lessc_parser {
|
|||
|
||||
// consume a keyword
|
||||
protected function keyword(&$word) {
|
||||
if ($this->matching('([\w_\-\*!"][\w\-_"]*)', $m)) {
|
||||
if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) {
|
||||
$word = $m[1];
|
||||
return true;
|
||||
}
|
||||
|
@ -3350,7 +3350,7 @@ class lessc_parser {
|
|||
self::$literalCache[$what] = lessc::preg_quote($what);
|
||||
}
|
||||
|
||||
return $this->matching(self::$literalCache[$what], $m, $eatWhitespace);
|
||||
return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
|
||||
}
|
||||
|
||||
protected function genericList(&$out, $parseItem, $delim="", $flatten=true) {
|
||||
|
@ -3387,14 +3387,14 @@ class lessc_parser {
|
|||
} else {
|
||||
$validChars = $allowNewline ? "." : "[^\n]";
|
||||
}
|
||||
if (!$this->matching('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) return false;
|
||||
if (!$this->match('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) return false;
|
||||
if ($until) $this->count -= strlen($what); // give back $what
|
||||
$out = $m[1];
|
||||
return true;
|
||||
}
|
||||
|
||||
// try to match something on head of buffer
|
||||
protected function matching($regex, &$out, $eatWhitespace = null) {
|
||||
protected function match($regex, &$out, $eatWhitespace = null) {
|
||||
if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;
|
||||
|
||||
$r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
|
||||
|
@ -3420,7 +3420,7 @@ class lessc_parser {
|
|||
}
|
||||
return $gotWhite;
|
||||
} else {
|
||||
$this->matching("", $m);
|
||||
$this->match("", $m);
|
||||
return strlen($m[0]) > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,5 +43,6 @@
|
|||
[ /^(.*\.(?:css|js))(.*)$/i,'$1$2?ver='+G.version]
|
||||
]
|
||||
});
|
||||
if(navigator.serviceWorker){navigator.serviceWorker.register('./?share/manifestJS');}
|
||||
</script>
|
||||
<?php Hook::trigger('templateCommonFooter');?>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<link href="<?php echo STATIC_PATH;?>images/common/ico.png?ver=<?php echo KOD_VERSION;?>" rel="icon" type="image/x-icon">
|
||||
<link href="<?php echo STATIC_PATH;?>style/common.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet"/>
|
||||
<link href="./static/style/font-awesome/css/font-awesome.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">
|
||||
<link rel="manifest" href="./static/manifest.json">
|
||||
<link href="./?share/manifest" rel="manifest" />
|
||||
<!--[if IE 7]>
|
||||
<link rel="stylesheet" href="./static/style/font-awesome/css/font-awesome-ie7.css">
|
||||
<![endif]-->
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
$login_info = str_replace(array("{0}","{1}","{2}"),array('admin','demo/demo','guest/guest'),LNG('install_user_default'));
|
||||
echo LNG('install_login'),'<br/>'.$login_info.'</div>';
|
||||
echo '<div class="inputs admin-password"><input type="password" placeholder="'.LNG('login_root_password').'" autocomplete="off"/></div><div class="inputs admin-password-repeat"><input type="password" placeholder="'.LNG('login_root_password_repeat').'" autocomplete="off"/></div>';
|
||||
echo '<div class="inputs admin-password"><input type="password" placeholder="'.LNG('login_root_password').'"/></div><div class="inputs admin-password-repeat"><input type="password" placeholder="'.LNG('login_root_password_repeat').'"/></div>';
|
||||
echo '<div class="guest"><a href="javascript:void(0);" class="start">'.$login.'</a></div>';
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class='info'><?php echo LNG('copyright_contact');?></div>
|
||||
</div>
|
||||
<div class="form" style="padding: 10px 20px;">
|
||||
<div class="inputs admin-password"><input type="text" placeholder="LICENSE KEY" autocomplete="off"/></div>
|
||||
<div class="inputs admin-password"><input type="text" placeholder="LICENSE KEY"/></div>
|
||||
<a href="javascript:void(0);" class="LICENSE_SUBMIT btn btn-primary">注册授权</a>
|
||||
<div class="links">
|
||||
<a href="./index.php?user/versionInstall&reset=1" class="btn btn-link license-use-free"><?php echo LNG('use_free');?></a>
|
||||
|
|
|
@ -43,11 +43,12 @@
|
|||
<i class="font-icon icon-key"></i>
|
||||
<input id="password" name='password' type="password" placeholder="<?php echo LNG('password');?>"
|
||||
required autocomplete="on" disabled/>
|
||||
<input type='hidden' name='csrfLogin' value="<?php echo $_SESSION['csrfLogin'];?>"/>
|
||||
</div>
|
||||
<?php if(need_check_code()){?>
|
||||
<div class='check-code'>
|
||||
<i class="font-icon icon-unlock-alt"></i>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required autocomplete="off"/>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required/>
|
||||
<img src='./index.php?user/checkCode' onclick="this.src='./index.php?user/checkCode'" />
|
||||
</div>
|
||||
<?php }?>
|
||||
|
|
|
@ -26,12 +26,13 @@
|
|||
<i class="font-icon icon-key"></i>
|
||||
<input id="password" name='password' type="password" placeholder="<?php echo LNG('password');?>"
|
||||
required disabled/>
|
||||
<input type='hidden' name='csrfLogin' value="<?php echo $_SESSION['csrfLogin'];?>"/>
|
||||
</div>
|
||||
|
||||
<?php if(need_check_code()){?>
|
||||
<div class='check-code'>
|
||||
<i class="font-icon icon-unlock-alt"></i>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required autocomplete="off"/>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required/>
|
||||
<img src='./index.php?user/checkCode' onclick="this.src='./index.php?user/checkCode'" />
|
||||
</div>
|
||||
<?php }?>
|
||||
|
|
|
@ -63,9 +63,7 @@ function updateCheck(){
|
|||
|
||||
function unzipRepeat(){
|
||||
$zipFile = THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip';
|
||||
if(!file_exists($zip_file)){
|
||||
return;
|
||||
}
|
||||
if(!file_exists($zipFile)) return;
|
||||
$zip = new PclZip($zipFile);
|
||||
$result = $zip->extract(PCLZIP_OPT_PATH,THE_BASIC_PATH,PCLZIP_OPT_REPLACE_NEWER);
|
||||
}
|
||||
|
@ -93,7 +91,7 @@ function updateClear(){
|
|||
function check_version_ok(){
|
||||
//检查是否更新失效
|
||||
$content = file_get_contents(BASIC_PATH.'config/version.php');
|
||||
$result = match($content,"'KOD_VERSION','(.*)'");
|
||||
$result = match_text($content,"'KOD_VERSION','(.*)'");
|
||||
if($result != KOD_VERSION){
|
||||
show_tips("您服务器开启了php缓存,文件更新尚未生效;
|
||||
请关闭缓存,或稍后1分钟刷新页面再试!
|
||||
|
|
|
@ -18,12 +18,12 @@ if(GLOBAL_DEBUG){
|
|||
define('STATIC_JS','_dev'); //_dev||app
|
||||
define('STATIC_LESS','less');//less||css
|
||||
@ini_set("display_errors","on");
|
||||
@error_reporting(E_ALL^E_NOTICE);//
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED);//
|
||||
}else{
|
||||
define('STATIC_JS','app'); //app
|
||||
define('STATIC_LESS','css');//css
|
||||
@ini_set("display_errors","on");//on off
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING);// 0
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED);// 0
|
||||
}
|
||||
|
||||
//header('HTTP/1.1 200 Ok');//兼容部分lightHttp服务器环境; php5.1以下会输出异常;暂屏蔽
|
||||
|
@ -38,14 +38,13 @@ define('FUNCTION_DIR', LIB_DIR .'function/'); //函数库目录
|
|||
define('CLASS_DIR', LIB_DIR .'kod/'); //工具类目录
|
||||
define('CORER_DIR', LIB_DIR .'core/'); //核心目录
|
||||
define('SDK_DIR', LIB_DIR .'sdks/'); //
|
||||
define('DEFAULT_PERRMISSIONS',0640); //新建文件、解压文件默认权限
|
||||
define('DEFAULT_DIR_PERRMISSIONS',0750);//新建目录
|
||||
define('DEFAULT_PERRMISSIONS',0755); //新建文件、解压文件默认权限,777 部分虚拟主机限制了777;
|
||||
|
||||
/*
|
||||
* 可以数据目录;移到web目录之外,可以使程序更安全, 就不用限制用户的扩展名权限了;
|
||||
* 1. 需要先将data文件夹移到别的地方 例如将data文件夹拷贝到D:/
|
||||
* 2. 在config文件夹下新建define.php 新增一行 <?php define('DATA_PATH','D:/data/');
|
||||
* 注意:路径不能写错;其次php需要有权限访问移动后的目录(设置了防跨站需要关闭)
|
||||
* 注意:路径不能写错;其次php需要有权限访问移动后的目录(设置了防跨站需要关闭) 路径结尾/斜杠绝对不能缺少
|
||||
*/
|
||||
if(file_exists(BASIC_PATH.'config/define.php')){
|
||||
include(BASIC_PATH.'config/define.php');
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<?php define ('DATA_PATH', '/opt/kodexplorer-data/');
|
File diff suppressed because it is too large
Load Diff
|
@ -801,4 +801,4 @@ return array(
|
|||
"Explorer.UI.appTypeAll" => "Toutes les applications",
|
||||
"kodApp.oexe.edit" => "Modifier l'application",
|
||||
"kodApp.oexe.open" => "Ouvrez l'application"
|
||||
);
|
||||
);
|
|
@ -801,4 +801,4 @@ return array(
|
|||
"Explorer.UI.appTypeAll" => "所有程式",
|
||||
"kodApp.oexe.edit" => "編輯輕程式",
|
||||
"kodApp.oexe.open" => "打開輕程式"
|
||||
);
|
||||
);
|
|
@ -57,7 +57,8 @@ $config['settingSystemDefault'] = array(
|
|||
'pathHidden' => "Thumb.db,.DS_Store,.gitignore,.git",//目录列表隐藏的项
|
||||
'autoLogin' => "0", // 是否自动登录;登录用户为guest
|
||||
'needCheckCode' => "0", // 登陆是否开启验证码;默认关闭
|
||||
'firstIn' => "explorer", // 登录后默认进入[explorer desktop,editor]
|
||||
'firstIn' => "explorer", // 登录后默认进入[explorer desktop,editor]
|
||||
'passwordCheck' => '0', // 是否强制要求密码强度: 长度大于6,包含数字和英文字母;
|
||||
|
||||
'newUserApp' => "trello,一起写office,微信,365日历,石墨文档,ProcessOn,计算器,icloud,OfficeConverter",
|
||||
'newUserFolder' => "document,desktop,pictures,music",
|
||||
|
@ -78,7 +79,7 @@ $config['settingSystemDefault'] = array(
|
|||
$config['settingSystemDefault']['menu'] = array(
|
||||
array('name'=>'desktop','type'=>'system','url'=>'index.php?desktop','target'=>'_self','use'=>'1'),
|
||||
array('name'=>'explorer','type'=>'system','url'=>'index.php?explorer','target'=>'_self','use'=>'1'),
|
||||
array('name'=>'editor','type'=>'system','url'=>'index.php?editor','target'=>'_self','use'=>'1')
|
||||
// array('name'=>'editor','type'=>'system','url'=>'index.php?editor','target'=>'_self','use'=>'1')
|
||||
);
|
||||
if( strstr(I18n::defaultLang(),'zh') || strstr(I18n::getType(),'zh') ){
|
||||
$config['settingSystemDefault']['newGroupFolder'] = "share,文档,图片资料,视频资料";
|
||||
|
@ -199,7 +200,7 @@ $config['pathRoleDefine'] = array(
|
|||
'list' => array('explorer.index','explorer.pathList','explorer.treeList','editor.index','pluginApp.to'),
|
||||
'info' => array('explorer.pathInfo','explorer.search'),
|
||||
'copy' => array('explorer.pathCopy'),
|
||||
'preview'=>array('explorer.image','explorer.unzipList','explorer.fileProxy','explorer.officeView','editor.fileGet'),
|
||||
'preview'=>array('explorer.image','explorer.unzipList','explorer.fileProxy','explorer.officeView','editor.fileGet','explorer.fileView'),
|
||||
'download'=>array('explorer.fileDownload','explorer.zipDownload','explorer.fileDownloadRemove'),
|
||||
),
|
||||
'write' => array(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
define('KOD_VERSION','4.40');
|
||||
define('KOD_VERSION','4.45');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id":"DPlayer",
|
||||
"name":"DPlayer播放器",
|
||||
"title":"DPlayer播放器",
|
||||
"version":"1.07",
|
||||
"version":"1.08",
|
||||
"source":{
|
||||
"icon":"{{pluginHost}}static/images/icon.png",
|
||||
},
|
||||
|
|
|
@ -38,8 +38,35 @@ define(function(require, exports) {
|
|||
url:core.path2url(vedioInfo.path+'.vtt')
|
||||
}
|
||||
}
|
||||
new DPlayer(playerOption);
|
||||
var player = new DPlayer(playerOption);
|
||||
resetSize(player,$target);
|
||||
}
|
||||
var resetSize = function(player,$player){
|
||||
var reset = function(){
|
||||
// $player.css({position:'absolute'});
|
||||
var vWidth = $player.width();
|
||||
var vHeight = $player.height();
|
||||
var wWidth = $(window).width() * 0.9;
|
||||
var wHeight = $(window).height() * 0.9;
|
||||
if(vHeight >= wHeight){
|
||||
vWidth = (wHeight * vWidth) / vHeight;
|
||||
vHeight = wHeight;
|
||||
}
|
||||
if( vWidth >= wWidth ){
|
||||
vHeight = (wWidth * vHeight) / vWidth;
|
||||
vWidth = wWidth;
|
||||
}
|
||||
|
||||
var dialog = $player.parents('.dplayer-dialog').data('artDialog');
|
||||
var left = ($(window).width() - vWidth) / 2;
|
||||
var top = ($(window).height() - vHeight) / 2;
|
||||
// console.log(22,[vWidth,vHeight],[left,top]);
|
||||
if(!dialog) return;
|
||||
dialog.size(vWidth,vHeight).position(left,top);
|
||||
}
|
||||
// $player.css({position:'absolute'});
|
||||
player.on('loadeddata',reset);
|
||||
};
|
||||
var createDialog = function(title,ext){
|
||||
var size = {width:'70%',height:'60%'};
|
||||
if(ext == 'mp3'){
|
||||
|
|
|
@ -10,7 +10,7 @@ https://raw.github.com/vrana/adminer/master/designs/ng9/adminer.css
|
|||
*
|
||||
* adminer.php :allow in iframe( if($b->headers()){header("X-Frame-Options: deny");header("X-XSS-Protection: 0");} )
|
||||
*/
|
||||
::-webkit-scrollbar-track-piece{
|
||||
::-webkit-scrollbar-track-piece{
|
||||
background-color: rgba(180,180,180,0.06);
|
||||
border-radius:3px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
"id":"adminer",
|
||||
"name":"Adminer",
|
||||
"title":"{{LNG.Adminer.meta.title}}",
|
||||
"version":"4.71",
|
||||
"version":"4.77",
|
||||
"source":{
|
||||
"thumb":"",
|
||||
"className":"font-icon icon-bar-chart bg-blue-7",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -35,15 +35,16 @@ class yzOfficePlugin extends PluginBase{
|
|||
}
|
||||
|
||||
//获取页面
|
||||
$result = $app->task['steps'][count($app->task['steps']) - 1]['result'];
|
||||
if( !is_array($result['data']) ){
|
||||
$step = count($app->task['steps']) - 1;
|
||||
$infoData = $app->task['steps'][$step]['result'];
|
||||
if( !is_array($infoData['data']) ){
|
||||
$app->clearChche();
|
||||
show_tips($result);
|
||||
show_tips($infoData['message']);
|
||||
}
|
||||
$html = $result['data'][0];
|
||||
$pageFile = $app->cachePath.md5($html).'.'.get_path_ext($html);
|
||||
$link = $infoData['data'][0];
|
||||
$pageFile = $app->cachePath.md5($link).'.html.temp';
|
||||
if(!file_exists($pageFile)){
|
||||
$result = url_request($html,'GET');
|
||||
$result = url_request($link,'GET');
|
||||
if($result['code'] == 200){
|
||||
$title = '<title>永中文档转换服务</title>';
|
||||
$content = str_replace($title,'<title>'.$fileName.'</title>',$result['data']);
|
||||
|
@ -59,19 +60,21 @@ class yzOfficePlugin extends PluginBase{
|
|||
$app->clearChche();
|
||||
show_tips("请求转换异常,请重试!");
|
||||
}
|
||||
|
||||
|
||||
//替换内容
|
||||
$config = $this->getConfig();
|
||||
$pagePath = get_path_father($html);
|
||||
$pageID = $this->str_rtrim(get_path_this($html),'.html').'.files';
|
||||
$urlTo = $pagePath.'/'.$pageID.'/';
|
||||
//show_json(array($pageID,$pagePath,$urlTo),false);
|
||||
if($config['cacheFile']){ //始终使用缓存
|
||||
$urlTo = $this->pluginApi.'getFile&path='.rawurlencode($this->in['path']).'&file='.rawurlencode($urlTo);
|
||||
if(!$config['cacheFile']){
|
||||
header("Location: ".$html);
|
||||
exit;
|
||||
}
|
||||
$content = str_replace($pageID,$urlTo,$content);
|
||||
$content = str_replace('./http','http',$content);
|
||||
$name = str_replace(".html",'',get_path_this($link));
|
||||
$urlReplaceFrom = './'.$name.".files";
|
||||
$urlReplaceTo = $this->pluginApi.'getFile&path='.rawurlencode($this->in['path']).
|
||||
$urlReplaceTo .= '&file='.rawurlencode($urlReplaceFrom);
|
||||
// show_json(array($result,$urlReplaceFrom,$urlReplaceTo),false);
|
||||
|
||||
$content = str_replace($urlReplaceFrom,$urlReplaceTo,$content);
|
||||
$content = str_replace('"'.$name.'.files','"'.$urlReplaceTo,$content);
|
||||
$content = str_replace(array('<!DOCTYPE html>','<html>','<head>','</html>'),'',$content);
|
||||
include('php/assign/header.php');
|
||||
echo $content;
|
||||
|
@ -106,7 +109,7 @@ class yzOfficePlugin extends PluginBase{
|
|||
//官网用户demo;
|
||||
//http://www.yozodcs.com/examples.html 2M上传限制;
|
||||
//http://dcs.yozosoft.com/examples.html
|
||||
require_once($this->pluginPath.'php/yzOffice2.class.php');
|
||||
require_once($this->pluginPath.'php/yzOffice.class.php');
|
||||
return new yzOffice2($this,$path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id":"yzOffice",
|
||||
"name":"{{LNG.yzOffice.meta.name}}",
|
||||
"title":"{{LNG.yzOffice.meta.title}}",
|
||||
"version":"1.35",
|
||||
"version":"1.36",
|
||||
"category":"file",
|
||||
"source":{
|
||||
"icon":"{{pluginHost}}static/images/icon.png"
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
}
|
||||
clearInterval(repeatTimer);
|
||||
taskStatus();
|
||||
repeatTimer = setInterval(taskStatus,600);
|
||||
repeatTimer = setInterval(taskStatus,1000);
|
||||
};
|
||||
var loadSuccess = function(data){
|
||||
window.location.reload();
|
||||
|
|
|
@ -5,20 +5,26 @@
|
|||
* @copyright warlee 2014.(Shanghai)Co.,Ltd
|
||||
* @license http://kodcloud.com/tools/license/license.txt
|
||||
*/
|
||||
// 文档分享预览
|
||||
// http://yozodoc.com/
|
||||
class yzOffice{
|
||||
//官网用户demo
|
||||
//http://www.yozodcs.com/examples.html
|
||||
class yzOffice2{
|
||||
public $cachePath = 'yzOffice/';
|
||||
public $plugin;
|
||||
public $filePath;
|
||||
public $task;
|
||||
public $taskFile;
|
||||
public $api;
|
||||
public function __construct($plugin,$filePath){
|
||||
$this->plugin = $plugin;
|
||||
$this->filePath = $filePath;
|
||||
//新版本,加入了文件上传2M的限制; http://dcs.yozosoft.com/examples.html
|
||||
$this->api = array(
|
||||
'upload' => "http://dcs.yozosoft.com/testUpload",
|
||||
'convert' => "http://dcs.yozosoft.com/convert",
|
||||
);
|
||||
if($filePath === -1) return;
|
||||
if(!$filePath || !file_exists($filePath)){
|
||||
show_json('path '.LNG('error'),false);
|
||||
show_json('path '.LNG('not_exist'),false);
|
||||
}
|
||||
|
||||
$config = $plugin->getConfig();
|
||||
|
@ -30,7 +36,7 @@ class yzOffice{
|
|||
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
||||
$this->task = is_array($task_has)?$task_has:false;
|
||||
}
|
||||
//show_json($this->upload(),false);
|
||||
// show_json($this->upload(),false);
|
||||
}
|
||||
public function runTask(){
|
||||
$task = array(
|
||||
|
@ -40,7 +46,7 @@ class yzOffice{
|
|||
'hideData' => array(),
|
||||
'steps' => array(
|
||||
array('name'=>'upload','process'=>'uploadProcess','status'=>0,'result'=>''),
|
||||
// array('name'=>'convert','process'=>'convert','status'=>0,'result'=>''),
|
||||
array('name'=>'convert','process'=>'convert','status'=>0,'result'=>''),
|
||||
)
|
||||
);
|
||||
if(is_array($this->task)){
|
||||
|
@ -59,14 +65,11 @@ class yzOffice{
|
|||
$this->saveData();
|
||||
$function = $item['name'];
|
||||
$result = $this->$function();
|
||||
if(is_array($result['data'])){
|
||||
if(isset($result['data'])){
|
||||
$item['result'] = $result['data'];
|
||||
$item['status'] = 2;
|
||||
$task['currentStep'] += 1;
|
||||
|
||||
if( $item['name'] == $item['process'] && !$result['data']['success']){//转换完成
|
||||
$item['status'] = 0;//自我检测步骤没完成
|
||||
}
|
||||
//最后一步完成
|
||||
if( $item['status'] == 2 && $task['currentStep'] > count($task['steps'])-1 ){
|
||||
$task['success'] = 1;
|
||||
|
@ -82,14 +85,13 @@ class yzOffice{
|
|||
}else if(is_array($result) && is_string($result['data']) ){
|
||||
$error = $result['data'];
|
||||
}
|
||||
show_json($error,false,$result);
|
||||
show_json($error,false,array($function,$result));
|
||||
}
|
||||
}else if($item['status'] == 1){
|
||||
$function = $item['process'];
|
||||
if($function){
|
||||
$item['result'] = $this->$function();
|
||||
if($item['name'] == 'upload' && !$item['result']){
|
||||
//del_file($taskFile);//下载终止
|
||||
show_json($item['result'],false);
|
||||
}
|
||||
$this->saveData();
|
||||
|
@ -107,33 +109,54 @@ class yzOffice{
|
|||
$config = $this->plugin->getConfig();
|
||||
$ext = get_path_ext($this->filePath);
|
||||
$mode = $config['preview'];
|
||||
if(in_array($ext,array("xls","xlsb","xlsx","xlt","xlsm","csv"))){
|
||||
if(in_array($ext,array("xls","xlsb","xlsx","xlt","xlsm","csv",'ppt','pptx'))){
|
||||
$mode = '1';//excle不支持高清模式,自动切换
|
||||
}
|
||||
return $mode;
|
||||
}
|
||||
|
||||
//非高清预览【返回上传后直接转换过的文件】
|
||||
public function upload(){
|
||||
$api = "http://yozodoc.com/upload";
|
||||
$post = array(
|
||||
"file" => "@".$this->filePath,
|
||||
"convertType" => $this->convertMode(),
|
||||
"isShowTitle" => "0"
|
||||
"convertType" => $this->convertMode()
|
||||
);
|
||||
curl_progress_bind($this->filePath,$this->task['taskUuid']);//上传进度监听id
|
||||
$result = url_request($api,'POST',$post,false,false,true,3600);
|
||||
$result = url_request($this->api['upload'],'POST',$post,false,false,true,3600);
|
||||
if(is_array($result) && $result['data']){
|
||||
return $result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function convert($tempFile=false){
|
||||
$headers = array("Content-Type: application/x-www-form-urlencoded; charset=UTF-8");
|
||||
$stepInfo = $this->task['steps'][0]['result'];
|
||||
$tempFile = $tempFile?$tempFile:$stepInfo['data'];
|
||||
if(!$tempFile){
|
||||
show_json("操作失败: ".$stepInfo['message'],false,$this->task);
|
||||
}
|
||||
|
||||
$postArr = array(
|
||||
"inputDir" => $tempFile,
|
||||
"sourceFolder" => rtrim(get_path_father($tempFile),'/'),
|
||||
"convertType" => $this->convertMode(),
|
||||
"isAsync" => 1,
|
||||
"isDownload" => 0,
|
||||
"isSignature" => 0,
|
||||
);
|
||||
|
||||
$post = http_build_query($postArr);//post默认用array发送;content-type为x-www-form-urlencoded时用key=1&key=2的形式
|
||||
// show_json([$stepInfo,$postArr,$post],false);
|
||||
$result = url_request($this->api['convert'],'POST',$post,$headers,false,true,5);
|
||||
if(is_array($result) && is_array($result['data'])){
|
||||
return $result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function convert(){
|
||||
del_dir($this->cachePath);
|
||||
}
|
||||
|
||||
public function clearChche(){
|
||||
del_dir($this->cachePath);
|
||||
}
|
||||
|
||||
public function uploadProcess(){
|
||||
return curl_progress_get($this->filePath,$this->task['taskUuid']);
|
||||
}
|
||||
|
@ -145,16 +168,14 @@ class yzOffice{
|
|||
file_put_out($cacheFile,false);
|
||||
return;
|
||||
}
|
||||
$result = url_request($file,'GET');
|
||||
$step = count($this->task['steps']) - 1;
|
||||
$infoData = $this->task['steps'][$step]['result'];
|
||||
$link = $infoData['data'][0];
|
||||
$linkFile = get_path_father($link) . str_replace('./','',$file);
|
||||
$result = url_request($linkFile,'GET',false);
|
||||
if($result['code'] == 200){
|
||||
if($ext == 'svg'){
|
||||
$result['data'] = str_replace('永中DCS','',$result['data']);
|
||||
$from = '/clip-path="url\(#clipPath\d+\)" width="18\d+" xlink:href="/';
|
||||
$result['data'] = preg_replace($from,'sr="',$result['data']);
|
||||
}
|
||||
file_put_contents($cacheFile, $result['data']);
|
||||
file_put_out($cacheFile,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,172 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* @link http://kodcloud.com/
|
||||
* @author warlee | e-mail:kodcloud@qq.com
|
||||
* @copyright warlee 2014.(Shanghai)Co.,Ltd
|
||||
* @license http://kodcloud.com/tools/license/license.txt
|
||||
*/
|
||||
//官网用户demo
|
||||
//http://www.yozodcs.com/examples.html
|
||||
class yzOffice2{
|
||||
public $cachePath = 'yzOffice/';
|
||||
public $plugin;
|
||||
public $filePath;
|
||||
public $task;
|
||||
public $taskFile;
|
||||
public $api;
|
||||
public function __construct($plugin,$filePath,$oldVersion=true){
|
||||
$this->plugin = $plugin;
|
||||
$this->filePath = $filePath;
|
||||
//新版本,加入了文件上传2M的限制; http://dcs.yozosoft.com/examples.html
|
||||
$this->api = array(
|
||||
'upload' => "http://www.yozodcs.com/testUpload",
|
||||
'convert' => "http://www.yozodcs.com/convert",
|
||||
);
|
||||
|
||||
if($filePath === -1) return;
|
||||
if(!$filePath || !file_exists($filePath)){
|
||||
show_json('path '.LNG('not_exist'),false);
|
||||
}
|
||||
|
||||
$config = $plugin->getConfig();
|
||||
$mode = $config['preview'];
|
||||
$this->cachePath = TEMP_PATH.$this->cachePath.hash_path($this->filePath).$mode.'/';
|
||||
$this->taskFile = $this->cachePath.'info.json';
|
||||
mk_dir($this->cachePath);
|
||||
if(file_exists($this->taskFile)){
|
||||
$task_has = json_decode(file_get_contents($this->taskFile),true);
|
||||
$this->task = is_array($task_has)?$task_has:false;
|
||||
}
|
||||
//show_json($this->upload(),false);
|
||||
}
|
||||
public function runTask(){
|
||||
$task = array(
|
||||
'currentStep' => 0,
|
||||
'success' => 0,
|
||||
'taskUuid' => md5($this->filePath.rand_string(20)),
|
||||
'hideData' => array(),
|
||||
'steps' => array(
|
||||
array('name'=>'upload','process'=>'uploadProcess','status'=>0,'result'=>''),
|
||||
array('name'=>'convert','process'=>'convert','status'=>0,'result'=>''),
|
||||
)
|
||||
);
|
||||
if(is_array($this->task)){
|
||||
$task = &$this->task;
|
||||
}else{
|
||||
$this->task = &$task;
|
||||
}
|
||||
|
||||
$item = &$task['steps'][$task['currentStep']];
|
||||
if($item['status'] == 0){
|
||||
$item['status'] = 1;
|
||||
if(!$item['process'] ||
|
||||
$item['name'] == $item['process']){ //单步没有定时检测;相等则自我查询进度;0=>2之间跳转
|
||||
$item['status'] = 0;
|
||||
}
|
||||
$this->saveData();
|
||||
$function = $item['name'];
|
||||
$result = $this->$function();
|
||||
if(isset($result['data'])){
|
||||
$item['result'] = $result['data'];
|
||||
$item['status'] = 2;
|
||||
$task['currentStep'] += 1;
|
||||
|
||||
//最后一步完成
|
||||
if( $item['status'] == 2 && $task['currentStep'] > count($task['steps'])-1 ){
|
||||
$task['success'] = 1;
|
||||
}
|
||||
if($task['currentStep'] >= count($task['steps'])-1 ){
|
||||
$task['currentStep'] = count($task['steps'])-1;
|
||||
}
|
||||
$this->saveData();
|
||||
}else{
|
||||
$error = LNG('error');
|
||||
if(is_array($result) && $result['code'] == 100){
|
||||
$error = LNG('uploadError');
|
||||
}else if(is_array($result) && is_string($result['data']) ){
|
||||
$error = $result['data'];
|
||||
}
|
||||
show_json($error,false,$result);
|
||||
}
|
||||
}else if($item['status'] == 1){
|
||||
$function = $item['process'];
|
||||
if($function){
|
||||
$item['result'] = $this->$function();
|
||||
//show_json($item,false,123);
|
||||
if($item['name'] == 'upload' && !$item['result']){
|
||||
show_json($item['result'],false);
|
||||
}
|
||||
$this->saveData();
|
||||
}
|
||||
}
|
||||
unset($task['hideData']);
|
||||
show_json($task);
|
||||
}
|
||||
public function saveData(){
|
||||
$data = json_encode_force($this->task);
|
||||
file_put_contents($this->taskFile,$data);
|
||||
}
|
||||
|
||||
private function convertMode(){
|
||||
$config = $this->plugin->getConfig();
|
||||
$ext = get_path_ext($this->filePath);
|
||||
$mode = $config['preview'];
|
||||
if(in_array($ext,array("xls","xlsb","xlsx","xlt","xlsm","csv",'ppt','pptx'))){
|
||||
$mode = '1';//excle不支持高清模式,自动切换
|
||||
}
|
||||
return $mode;
|
||||
}
|
||||
|
||||
//非高清预览【返回上传后直接转换过的文件】
|
||||
public function upload(){
|
||||
$post = array(
|
||||
"file" => "@".$this->filePath,
|
||||
"convertType" => $this->convertMode()
|
||||
);
|
||||
curl_progress_bind($this->filePath,$this->task['taskUuid']);//上传进度监听id
|
||||
$result = url_request($this->api['upload'],'POST',$post,false,false,true,3600);
|
||||
if(is_array($result) && $result['data']){
|
||||
return $result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function convert($tempFile=false){
|
||||
$headers = array("Content-Type: application/x-www-form-urlencoded; charset=UTF-8");
|
||||
$tempFile = $tempFile?$tempFile:$this->task['steps'][0]['result']['data'];
|
||||
if(!$tempFile){
|
||||
show_json("操作失败: ".$this->task['steps'][0]['result']['message'],false,$this->task);
|
||||
}
|
||||
$post = array(
|
||||
"inputDir" => $tempFile,
|
||||
"convertType" => $this->convertMode(),
|
||||
"isAsync" => 0,
|
||||
);
|
||||
$post = http_build_query($post);//post默认用array发送;content-type为x-www-form-urlencoded时用key=1&key=2的形式
|
||||
$result = url_request($this->api['convert'],'POST',$post,$headers,false,true,5);
|
||||
if(is_array($result) && is_array($result['data'])){
|
||||
return $result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function clearChche(){
|
||||
del_dir($this->cachePath);
|
||||
}
|
||||
public function uploadProcess(){
|
||||
return curl_progress_get($this->filePath,$this->task['taskUuid']);
|
||||
}
|
||||
public function getFile($file){
|
||||
ignore_timeout();
|
||||
$ext = unzip_filter_ext(get_path_ext($file));
|
||||
$cacheFile = $this->cachePath.md5($file.'file').'.'.$ext;
|
||||
if(file_exists($cacheFile)){
|
||||
file_put_out($cacheFile,false);
|
||||
return;
|
||||
}
|
||||
$result = url_request($file,'GET');
|
||||
if($result['code'] == 200){
|
||||
file_put_contents($cacheFile, $result['data']);
|
||||
file_put_out($cacheFile,false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,8 +7,17 @@ class zipViewPlugin extends PluginBase{
|
|||
public function regiest(){
|
||||
$this->hookRegiest(array(
|
||||
'user.commonJs.insert' => 'zipViewPlugin.echoJs',
|
||||
'globalRequest'=>'zipViewPlugin.changeData',
|
||||
));
|
||||
}
|
||||
public function changeData(){
|
||||
$GLOBALS['config']['pathRoleDefine']['read']['preview'] = array('explorer.image','explorer.unzipList','explorer.fileProxy','explorer.fileView','editor.fileGet');
|
||||
//临时
|
||||
if(isset($_REQUEST['HTTP_X_PLATFORM'])){
|
||||
$GLOBALS['config']['settingSystem']['needCheckCode'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function unzipList(){
|
||||
$maxLength = 50000;
|
||||
$path = $this->filePath($this->in['path']);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id":"zipView",
|
||||
"name":"{{LNG.Plugin.default.zipView}}",
|
||||
"title":"",
|
||||
"version":"1.35",
|
||||
"version":"1.38",
|
||||
"source":{
|
||||
"icon":"{{pluginHost}}static/images/icon.png",
|
||||
"screenshoot":[
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -229,27 +229,33 @@ ace.define("ace/ext/searchboxKod", ["require", "exports", "module", "ace/lib/dom
|
|||
}
|
||||
this.resetEditorHeight = function(show){
|
||||
var $search = $('.search-content');
|
||||
var $search_body = $('.ace_search');
|
||||
var $edit_body = $('.edit_body');
|
||||
var $searchBody = $('.ace_search');
|
||||
var $editBody = $('.edit_body');
|
||||
if(show){
|
||||
$search.removeClass('hidden');
|
||||
$edit_body.css('bottom',$search_body.outerHeight());
|
||||
$editBody.css('bottom',$searchBody.outerHeight());
|
||||
}else{
|
||||
$search.addClass('hidden');
|
||||
$edit_body.css('bottom',0);
|
||||
$editBody.css('bottom',0);
|
||||
}
|
||||
Editor && Editor.current() && Editor.current().resize();
|
||||
this.resize();
|
||||
}
|
||||
this.setEditor = function(appSpace,editor) {
|
||||
this.editorMain = appSpace;
|
||||
this.editorMain.searchBox = this;
|
||||
var $search = $('.search-content');
|
||||
if($search.html() == ''){
|
||||
$search.get(0).appendChild(this.element);
|
||||
}
|
||||
this.resetEditorHeight(true);
|
||||
appSpace.searchBox = this;
|
||||
this.editor = editor;
|
||||
Editor && Editor.current() && Editor.current().resize();
|
||||
this.resize();
|
||||
};
|
||||
this.resize = function(){
|
||||
var editor = this.editorMain && this.editorMain.current();
|
||||
editor && editor.resize();
|
||||
};
|
||||
|
||||
this.$initElements = function(sb) {
|
||||
this.searchBox = sb.querySelector(".ace_search_form");
|
||||
this.replaceBox = sb.querySelector(".ace_replace_form");
|
||||
|
@ -264,14 +270,14 @@ ace.define("ace/ext/searchboxKod", ["require", "exports", "module", "ace/lib/dom
|
|||
this.$init = function() {
|
||||
var sb = this.element;
|
||||
this.$initElements(sb);
|
||||
var _this = this;
|
||||
var self = this;
|
||||
event.addListener(sb, "mousedown", function(e) {
|
||||
//下拉菜单
|
||||
if($(e.target).parents('.history-list').length>0){
|
||||
return true;
|
||||
}
|
||||
setTimeout(function() {
|
||||
_this.activeInput.focus();
|
||||
self.activeInput.focus();
|
||||
}, 0);
|
||||
event.stopPropagation(e);
|
||||
});
|
||||
|
@ -281,37 +287,37 @@ ace.define("ace/ext/searchboxKod", ["require", "exports", "module", "ace/lib/dom
|
|||
if(!action){
|
||||
action = $(e.target).parent().attr('action');
|
||||
}
|
||||
if (action && _this[action]){
|
||||
_this[action]();
|
||||
}else if (_this.$searchBarKb.commands[action]){
|
||||
_this.$searchBarKb.commands[action].exec(_this);
|
||||
if (action && self[action]){
|
||||
self[action]();
|
||||
}else if (self.$searchBarKb.commands[action]){
|
||||
self.$searchBarKb.commands[action].exec(self);
|
||||
}
|
||||
event.stopPropagation(e);
|
||||
});
|
||||
|
||||
event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
|
||||
var keyString = keyUtil.keyCodeToString(keyCode);
|
||||
var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
|
||||
var command = self.$searchBarKb.findKeyCommand(hashId, keyString);
|
||||
if (command && command.exec) {
|
||||
command.exec(_this);
|
||||
command.exec(self);
|
||||
event.stopEvent(e);
|
||||
}
|
||||
});
|
||||
|
||||
this.$onChange = lang.delayedCall(function() {
|
||||
_this.find(false, false);
|
||||
self.find(false, false);
|
||||
});
|
||||
|
||||
event.addListener(this.searchInput, "input", function() {
|
||||
_this.$onChange.schedule(20);
|
||||
self.$onChange.schedule(20);
|
||||
});
|
||||
event.addListener(this.searchInput, "focus", function() {
|
||||
_this.activeInput = _this.searchInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
self.activeInput = self.searchInput;
|
||||
self.searchInput.value && self.highlight();
|
||||
});
|
||||
event.addListener(this.replaceInput, "focus", function() {
|
||||
_this.activeInput = _this.replaceInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
self.activeInput = self.replaceInput;
|
||||
self.searchInput.value && self.highlight();
|
||||
});
|
||||
};
|
||||
this.$searchBarKb = new HashHandler();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,404 +1,8 @@
|
|||
ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
|
||||
|
||||
/**
|
||||
* 1. 分号、中括号后面换行,for里面的分号不换行
|
||||
* 2. 数组定义key=>value; 不处理里面的换行和空格及tab键
|
||||
* 3. switch case/default 后面没有break时,后面行indent还原;
|
||||
* 4. switch 多个case/default并列,没有break时;后面indent处理
|
||||
* 5. +-/*.&^|%后面跟等号运算符;等号不加空格
|
||||
* 6. 块级字符串;结束标记无indent;否则语法错误
|
||||
* 7. if/else {前后多余空行去除;
|
||||
* 8. try cache 中cache不换行;同else
|
||||
* 9. --表达式含有{}不换行; 形如:ord($text{strlen($text)-1}); 冲突:导致行注释后括号变成注释导致语法错误;
|
||||
* 10. 多行注释;注释内容不做修改
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
var TokenIterator = require("../token_iterator").TokenIterator;
|
||||
function is(token, type) {
|
||||
return token.type.lastIndexOf(type + ".xml") > -1;
|
||||
}
|
||||
exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"];
|
||||
exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"];
|
||||
|
||||
exports.beautify = function(session) {
|
||||
//压缩成一行的代码; 解决迭代获取token;每行最大token数量限制 MAX_TOKEN_COUNT=2000==>500000
|
||||
var iterator = new TokenIterator(session, 0, 0);
|
||||
var token = iterator.getCurrentToken();
|
||||
var tabString = session.getTabString();
|
||||
var singletonTags = exports.singletonTags;
|
||||
var blockTags = exports.blockTags;
|
||||
var nextToken;
|
||||
var breakBefore = false;
|
||||
var spaceBefore = false;
|
||||
var spaceAfter = false;
|
||||
var code = "";
|
||||
var value = "";
|
||||
var tagName = "";
|
||||
var depth = 0;
|
||||
var lastDepth = 0;
|
||||
var lastIndent = 0;
|
||||
var indent = 0;
|
||||
var unindent = 0;
|
||||
var roundDepth = 0;
|
||||
var onCaseLine = false;
|
||||
var row;
|
||||
var curRow = 0;
|
||||
var rowsToAdd = 0;
|
||||
var rowTokens = [];
|
||||
var abort = false;
|
||||
var i;
|
||||
var indentNextLine = false;
|
||||
var inTag = false;
|
||||
var inCSS = false;
|
||||
var inBlock = false;
|
||||
var levels = {0: 0};
|
||||
var parents = {};
|
||||
|
||||
var trimNext = function() {
|
||||
if (nextToken && nextToken.value && nextToken.type !== 'string.regexp'){
|
||||
nextToken.value = nextToken.value.trim();
|
||||
}
|
||||
};
|
||||
|
||||
var trimLine = function() {
|
||||
code = code.replace(/ +$/, "");
|
||||
};
|
||||
|
||||
var trimCode = function() {
|
||||
code = code.trimRight();
|
||||
breakBefore = false;
|
||||
};
|
||||
|
||||
//add by warlee;
|
||||
var preToken = token;
|
||||
var parentChar = [];
|
||||
|
||||
while (token !== null) {
|
||||
curRow = iterator.getCurrentTokenRow();
|
||||
rowTokens = iterator.$rowTokens;
|
||||
nextToken = iterator.stepForward();
|
||||
|
||||
if (typeof token !== "undefined") {
|
||||
value = token.value;
|
||||
unindent = 0;
|
||||
inCSS = (tagName === "style" || session.$modeId === "ace/mode/css");
|
||||
if (is(token, "tag-open")) {
|
||||
inTag = true;
|
||||
if (nextToken){
|
||||
inBlock = (blockTags.indexOf(nextToken.value) !== -1);
|
||||
}
|
||||
if (value === "</") {
|
||||
if (inBlock && !breakBefore && rowsToAdd < 1){
|
||||
rowsToAdd++;
|
||||
}
|
||||
if (inCSS){
|
||||
rowsToAdd = 1;
|
||||
}
|
||||
unindent = 1;
|
||||
inBlock = false;
|
||||
}
|
||||
} else if (is(token, "tag-close")) {
|
||||
inTag = false;
|
||||
} else if (is(token, "comment.start")) {
|
||||
inBlock = true;
|
||||
} else if (is(token, "comment.end")) {
|
||||
inBlock = false;
|
||||
}
|
||||
if (!inTag && !rowsToAdd && token.type === "paren.rparen" && token.value.substr(0, 1) === "}") {
|
||||
rowsToAdd++;
|
||||
}
|
||||
if (curRow !== row) {
|
||||
rowsToAdd = curRow;
|
||||
if (row){
|
||||
rowsToAdd -= row;
|
||||
}
|
||||
}
|
||||
|
||||
if (rowsToAdd) {
|
||||
trimCode();
|
||||
for (; rowsToAdd > 0; rowsToAdd--){
|
||||
code += "\n";
|
||||
}
|
||||
|
||||
breakBefore = true;
|
||||
if (!is(token, "comment") && !token.type.match(/^(comment|string)$/)){
|
||||
value = value.trimLeft();
|
||||
}
|
||||
}
|
||||
if (value) {
|
||||
//add by warlee; 分号符号后换行;for括号里面的分号不换行
|
||||
if(token.type == 'text' && value.trimRight().substr(-1) == ';'){
|
||||
rowsToAdd+=1;
|
||||
if (parents[depth-1] === 'for' && parentChar[parentChar.length-1] == '('){
|
||||
rowsToAdd-=1;
|
||||
}
|
||||
}
|
||||
if (token.type=='paren.rparen' && token.value == '})'){
|
||||
rowsToAdd-=1;
|
||||
}
|
||||
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(if|else|elseif|catch|for|foreach|while|switch)$/)) {
|
||||
parents[depth] = value;
|
||||
trimNext();
|
||||
spaceAfter = true;
|
||||
if (value.match(/^(else|elseif|catch)$/)) {
|
||||
if (code.match(/\}[\s]*$/)) {
|
||||
trimCode();
|
||||
spaceBefore = true;
|
||||
}
|
||||
}
|
||||
} else if (token.type === "paren.lparen") {
|
||||
trimNext();
|
||||
if (value.substr(-1) === "{") {
|
||||
spaceAfter = true;
|
||||
indentNextLine = false;
|
||||
if(!inTag){
|
||||
rowsToAdd = 1;
|
||||
}
|
||||
}
|
||||
if (value.substr(0, 1) === "{") {
|
||||
spaceBefore = true;
|
||||
if (code.substr(-1) !== '[' && code.trimRight().substr(-1) === '[') {
|
||||
trimCode();
|
||||
spaceBefore = false;
|
||||
} else if (code.trimRight().substr(-1) === ')') {
|
||||
trimCode();
|
||||
} else {
|
||||
trimLine();
|
||||
}
|
||||
}
|
||||
} else if (token.type === "paren.rparen") {
|
||||
unindent = 1;
|
||||
if (value.substr(0, 1) === "}") {
|
||||
rowsToAdd+=1;//add by warlee; }符号后换行;
|
||||
//changed by warlee; switch default没有break时indent-1;
|
||||
if (parents[depth-1] === 'case' || parents[depth-1] === 'default'){
|
||||
unindent++;
|
||||
}
|
||||
if (code.trimRight().substr(-1) === '{') {
|
||||
trimCode();
|
||||
} else {
|
||||
spaceBefore = true;
|
||||
if (inCSS){
|
||||
//rowsToAdd+=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value.substr(0, 1) === "]") {
|
||||
if (code.substr(-1) !== '}' && code.trimRight().substr(-1) === '}') {
|
||||
spaceBefore = false;
|
||||
indent++;
|
||||
trimCode();
|
||||
}
|
||||
}
|
||||
if (value.substr(0, 1) === ")") {
|
||||
if (code.substr(-1) !== '(' && code.trimRight().substr(-1) === '(') {
|
||||
spaceBefore = false;
|
||||
indent++;
|
||||
trimCode();
|
||||
}
|
||||
}
|
||||
trimLine();
|
||||
} else if ((token.type === "keyword.operator" || token.type === "keyword") && value.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)) {
|
||||
trimCode();
|
||||
trimNext();
|
||||
spaceBefore = true;
|
||||
spaceAfter = true;
|
||||
|
||||
//add by warlee; .= 中间不加空格,语法错误
|
||||
var operatorChar = ['+','-','/','*','.','&','^','|','%'];
|
||||
if(trim(token.value) == '=' && operatorChar.indexOf(trim(preToken.value)) !== -1 ){
|
||||
spaceBefore = false;
|
||||
}
|
||||
} else if (token.type === "punctuation.operator" && value === ';') {
|
||||
trimCode();
|
||||
trimNext();
|
||||
spaceAfter = true;
|
||||
|
||||
if (inCSS){
|
||||
rowsToAdd++;
|
||||
}
|
||||
} else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) {
|
||||
trimCode();
|
||||
trimNext();
|
||||
spaceAfter = true;
|
||||
breakBefore = false;
|
||||
} else if (token.type === "support.php_tag" && value === "?>" && !breakBefore) {
|
||||
trimCode();
|
||||
spaceBefore = true;
|
||||
} else if (is(token, "attribute-name") && code.substr(-1).match(/^\s$/)) {
|
||||
spaceBefore = true;
|
||||
} else if (is(token, "attribute-equals")) {
|
||||
trimLine();
|
||||
trimNext();
|
||||
} else if (is(token, "tag-close")) {
|
||||
trimLine();
|
||||
if(value === "/>"){
|
||||
spaceBefore = true;
|
||||
}
|
||||
}
|
||||
|
||||
//add by warlee;php tag后面换行
|
||||
if (token.type === "support.php_tag" && value.trim().substr(0,2) === "<?") {
|
||||
//rowsToAdd += 1;
|
||||
}
|
||||
if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
if(parents[depth-1] == 'case' || parents[depth-1] == 'default'){
|
||||
unindent = 1;//case左缩进
|
||||
}
|
||||
}
|
||||
//块级字符串;结束标记无indent;
|
||||
if (token.type === "markup.list" ) {
|
||||
unindent = 100;//去除缩进
|
||||
}
|
||||
|
||||
if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"]$/))) {
|
||||
indent = lastIndent;
|
||||
if(depth > lastDepth) {
|
||||
indent++;
|
||||
for (i=depth; i > lastDepth; i--){
|
||||
levels[i] = indent;
|
||||
}
|
||||
} else if(depth < lastDepth){
|
||||
indent = levels[depth];
|
||||
}
|
||||
|
||||
lastDepth = depth;
|
||||
lastIndent = indent;
|
||||
if(unindent){
|
||||
indent -= unindent;
|
||||
}
|
||||
|
||||
if (indentNextLine && !roundDepth) {
|
||||
indent++;
|
||||
indentNextLine = false;
|
||||
}
|
||||
for (i = 0; i < indent; i++){
|
||||
code += tabString;
|
||||
}
|
||||
}
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
//add by warlee; 只加switch第一层加indent;
|
||||
if(parents[depth-1] == 'switch'){
|
||||
parents[depth] = value;
|
||||
depth++;
|
||||
}
|
||||
}
|
||||
// if (token.type === "keyword" && value.match(/^(break)$/)) {
|
||||
// if(parents[depth-1] && parents[depth-1].match(/^(case|default)$/)) {
|
||||
// depth--;
|
||||
// }
|
||||
// }
|
||||
if (token.type === "paren.lparen") {
|
||||
roundDepth += (value.match(/\(/g) || []).length;
|
||||
depth += value.length;
|
||||
|
||||
//{前面是一个变量;则{后面不换行;是函数变量;
|
||||
if(value == '{' && preToken && preToken.type == 'variable'){
|
||||
rowsToAdd -=1;
|
||||
}
|
||||
parentChar.push(value.trim());// { (// add by warlee;当前代码块类型入栈
|
||||
}
|
||||
if (token.type === "keyword" && value.match(/^(if|else|elseif|for|while)$/)) {
|
||||
indentNextLine = true;
|
||||
roundDepth = 0;
|
||||
} else if (!roundDepth && value.trim() && token.type !== "comment"){
|
||||
indentNextLine = false;
|
||||
}
|
||||
|
||||
if (token.type === "paren.rparen") {
|
||||
roundDepth -= (value.match(/\)/g) || []).length;
|
||||
for (i = 0; i < value.length; i++) {
|
||||
depth--;
|
||||
//changed by warlee; switch default没有break时indent-1;
|
||||
if(value.substr(i, 1)==='}' && (parents[depth]==='case' || parents[depth]==='default' ) ) {
|
||||
depth--;
|
||||
}
|
||||
}
|
||||
|
||||
//add by warlee;删除多余的配对代码块
|
||||
for (var index in parents) {
|
||||
if(index > depth ){
|
||||
delete parents[index];
|
||||
}
|
||||
}
|
||||
parentChar.push(value.trim());// { (// add by warlee;当前代码块类型入栈
|
||||
parentChar.pop();//出栈
|
||||
if( value.match(/\)/g) && preToken && preToken.type != 'comment'){
|
||||
// code = code.trimRight();
|
||||
// spaceAfter = false;
|
||||
}
|
||||
}
|
||||
if(token && token.type == 'comment.doc' && value.substr(0,1) == '*'){
|
||||
value = ' '+value;
|
||||
}
|
||||
//console.log(7878,value,token,preToken,indent,unindent,levels,parents,roundDepth,depth);
|
||||
|
||||
if (spaceBefore && !breakBefore) {
|
||||
trimLine();
|
||||
if (code.substr(-1) !== "\n"){
|
||||
code += " ";
|
||||
}
|
||||
}
|
||||
//add by warlee;删除{、}前后多余的空白字符
|
||||
if( token && token.type == 'paren.lparen' && token.value == '{' &&
|
||||
preToken && preToken.type != 'comment'){
|
||||
// code = code.trimRight();
|
||||
// spaceAfter = false;
|
||||
}
|
||||
|
||||
code += value;
|
||||
if (spaceAfter){
|
||||
code += " ";
|
||||
}
|
||||
|
||||
breakBefore = false;
|
||||
spaceBefore = false;
|
||||
spaceAfter = false;
|
||||
if ((is(token, "tag-close") && (inBlock || blockTags.indexOf(tagName) !== -1)) || (is(token, "doctype") && value === ">")) {
|
||||
if (inBlock && nextToken && nextToken.value === "</"){
|
||||
rowsToAdd = -1;
|
||||
}else{
|
||||
rowsToAdd = 1;
|
||||
}
|
||||
}
|
||||
if (is(token, "tag-open") && value === "</") {
|
||||
depth--;
|
||||
} else if (is(token, "tag-open") && value === "<" && singletonTags.indexOf(nextToken.value) === -1) {
|
||||
depth++;
|
||||
} else if (is(token, "tag-name")) {
|
||||
tagName = value;
|
||||
} else if (is(token, "tag-close") && value === "/>" && singletonTags.indexOf(tagName) === -1){
|
||||
depth--;
|
||||
}
|
||||
row = curRow;
|
||||
}
|
||||
}
|
||||
preToken = token;
|
||||
token = nextToken;
|
||||
//console.log(preToken,token);
|
||||
}
|
||||
code = code.trim();
|
||||
//code = code.replace(/\n{2,}/g,"\n\n");//去除多余空行
|
||||
session.doc.setValue(code);
|
||||
};
|
||||
|
||||
exports.commands = [{
|
||||
name: "beautify",
|
||||
exec: function(editor) {
|
||||
exports.beautify(editor.session);
|
||||
},
|
||||
bindKey: "Ctrl-Shift-B"
|
||||
}];
|
||||
});
|
||||
|
||||
(function() {
|
||||
ace.require(["ace/ext/beautify"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f,l=!1,c=!1,h=!1,p="",d="",v="",m=0,g=0,y=0,b=0,w=0,E=0,S=0,x,T=0,N=0,C=[],k=!1,L,A=!1,O=!1,M=!1,_=!1,D={0:0},P=[],H=function(){f&&f.value&&f.type!=="string.regexp"&&(f.value=f.value.replace(/^\s*/,""))},B=function(){p=p.replace(/ +$/,"")},j=function(){p=p.trimRight(),l=!1};while(s!==null){T=n.getCurrentTokenRow(),C=n.$rowTokens,f=n.stepForward();if(typeof s!="undefined"){d=s.value,w=0,M=v==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(O=!0,f&&(_=a.indexOf(f.value)!==-1),d==="</"&&(_&&!l&&N<1&&N++,M&&(N=1),w=1,_=!1)):i(s,"tag-close")?O=!1:i(s,"comment.start")?_=!0:i(s,"comment.end")&&(_=!1),!O&&!N&&s.type==="paren.rparen"&&s.value.substr(0,1)==="}"&&N++,T!==x&&(N=T,x&&(N-=x));if(N){j();for(;N>0;N--)p+="\n";l=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(d=d.trimLeft())}if(d){s.type==="keyword"&&d.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(P[m]=d,H(),h=!0,d.match(/^(else|elseif)$/)&&p.match(/\}[\s]*$/)&&(j(),c=!0)):s.type==="paren.lparen"?(H(),d.substr(-1)==="{"&&(h=!0,A=!1,O||(N=1)),d.substr(0,1)==="{"&&(c=!0,p.substr(-1)!=="["&&p.trimRight().substr(-1)==="["?(j(),c=!1):p.trimRight().substr(-1)===")"?j():B())):s.type==="paren.rparen"?(w=1,d.substr(0,1)==="}"&&(P[m-1]==="case"&&w++,p.trimRight().substr(-1)==="{"?j():(c=!0,M&&(N+=2))),d.substr(0,1)==="]"&&p.substr(-1)!=="}"&&p.trimRight().substr(-1)==="}"&&(c=!1,b++,j()),d.substr(0,1)===")"&&p.substr(-1)!=="("&&p.trimRight().substr(-1)==="("&&(c=!1,b++,j()),B()):s.type!=="keyword.operator"&&s.type!=="keyword"||!d.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&d===";"?(j(),H(),h=!0,M&&N++):s.type==="punctuation.operator"&&d.match(/^(:|,)$/)?(j(),H(),d.match(/^(,)$/)&&S>0&&E===0?N++:(h=!0,l=!1)):s.type==="support.php_tag"&&d==="?>"&&!l?(j(),c=!0):i(s,"attribute-name")&&p.substr(-1).match(/^\s$/)?c=!0:i(s,"attribute-equals")?(B(),H()):i(s,"tag-close")&&(B(),d==="/>"&&(c=!0)):(j(),H(),c=!0,h=!0);if(l&&(!s.type.match(/^(comment)$/)||!!d.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!d.substr(0,1).match(/^['"]$/))){b=y;if(m>g){b++;for(L=m;L>g;L--)D[L]=b}else m<g&&(b=D[m]);g=m,y=b,w&&(b-=w),A&&!E&&(b++,A=!1);for(L=0;L<b;L++)p+=o}s.type==="keyword"&&d.match(/^(case|default)$/)&&(P[m]=d,m++),s.type==="keyword"&&d.match(/^(break)$/)&&P[m-1]&&P[m-1].match(/^(case|default)$/)&&m--,s.type==="paren.lparen"&&(E+=(d.match(/\(/g)||[]).length,S+=(d.match(/\{/g)||[]).length,m+=d.length),s.type==="keyword"&&d.match(/^(if|else|elseif|for|while)$/)?(A=!0,E=0):!E&&d.trim()&&s.type!=="comment"&&(A=!1);if(s.type==="paren.rparen"){E-=(d.match(/\)/g)||[]).length,S-=(d.match(/\}/g)||[]).length;for(L=0;L<d.length;L++)m--,d.substr(L,1)==="}"&&P[m]==="case"&&m--}s.type=="text"&&(d=d.replace(/\s+$/," ")),c&&!l&&(B(),p.substr(-1)!=="\n"&&(p+=" ")),p+=d,h&&(p+=" "),l=!1,c=!1,h=!1;if(i(s,"tag-close")&&(_||a.indexOf(v)!==-1)||i(s,"doctype")&&d===">")_&&f&&f.value==="</"?N=-1:N=1;i(s,"tag-open")&&d==="</"?m--:i(s,"tag-open")&&d==="<"&&u.indexOf(f.value)===-1?m++:i(s,"tag-name")?v=d:i(s,"tag-close")&&d==="/>"&&u.indexOf(v)===-1&&m--,x=T}}s=f}p=p.trim(),e.doc.setValue(p)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); (function() {
|
||||
ace.require(["ace/ext/beautify"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
ace.define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function u(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function a(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,s=t.$textLayer,a=s.$lenses;if(!i){a&&u(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=s.$lenses=[]);var h=0;for(var p=0;p<f.length;p++){var d=f[p].row,v=i[d],m=v&&v.lenses;if(!m||!m.length)continue;var g=a[h];g||(g=a[h]=o.buildDom(["div",{"class":"ace_codeLens"}],t.container)),g.style.height=l.lineHeight+"px",h++;for(var y=0;y<m.length;y++){var b=g.childNodes[2*y];b||(y!=0&&g.appendChild(o.createTextNode("\u00a0|\u00a0")),b=o.buildDom(["a"],g)),b.textContent=m[y].title,b.lensCommand=m[y]}while(g.childNodes.length>2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,E-=t.scrollLeft,g.style.paddingLeft=c+E+"px"}while(h<a.length)a.pop().remove()}function f(e){if(!e.lineWidgets)return;var t=e.widgetManager;e.lineWidgets.forEach(function(e){e&&e.lenses&&t.removeLineWidget(e)})}function l(e){e.codeLensProviders=[],e.renderer.on("afterRender",a),e.$codeLensClickHandler||(e.$codeLensClickHandler=function(t){var n=t.target.lensCommand;n&&e.execCommand(n.id,n.arguments)},i.addListener(e.container,"click",e.$codeLensClickHandler,e)),e.$updateLenses=function(){function o(){var r=n.selection.cursor,i=n.documentToScreenRow(r);t.setLenses(n,s);var o=n.$undoManager&&n.$undoManager.$lastDelta;if(o&&o.action=="remove"&&o.lines.length>1)return;var u=n.documentToScreenRow(r),a=e.renderer.layerConfig.lineHeight,f=n.getScrollTop()+(u-i)*a;n.setScrollTop(f)}var n=e.session;if(!n)return;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var i=e.codeLensProviders.length,s=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){s.push(e)}),i--,i==0&&o()})})};var n=s.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function c(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",a),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../line_widgets").LineWidgets,i=e("../lib/event"),s=e("../lib/lang"),o=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;f(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r<n&&(n=r)}),e._emit("changeFold",{data:{start:{row:n}}})},t.registerCodeLensProvider=function(e,t){e.setOption("enableCodeLens",!0),e.codeLensProviders.push(t),e.$updateLensesOnInput()},t.clear=function(e){t.setLenses(e,null)};var h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{enableCodeLens:{set:function(e){e?l(this):c(this)}}}),o.importCssString(".ace_codeLens { position: absolute; color: #aaa; font-size: 88%; background: inherit; width: 100%; display: flex; align-items: flex-end; pointer-events: none;}.ace_codeLens > a { cursor: pointer; pointer-events: auto;}.ace_codeLens > a:hover { color: #0000ff; text-decoration: underline;}.ace_dark > .ace_codeLens > a:hover { color: #4e94ce;}","")}); (function() {
|
||||
ace.require(["ace/ext/code_lens"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})});
|
||||
(function() {
|
||||
ace.require(["ace/ext/elastic_tabstops_lite"], function() {});
|
||||
ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}); (function() {
|
||||
ace.require(["ace/ext/elastic_tabstops_lite"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,8 @@
|
|||
;
|
||||
(function() {
|
||||
ace.require(["ace/ext/error_marker"], function() {});
|
||||
; (function() {
|
||||
ace.require(["ace/ext/error_marker"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}});
|
||||
(function() {
|
||||
ace.require(["ace/ext/keybinding_menu"], function() {});
|
||||
ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 100000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {vertical-align: middle;}.ace_optionsMenuEntry button[ace_selected_button=true] {background: #e7e7e7;box-shadow: 1px 0px 2px 0px #adadad inset;border-color: #adadad;}.ace_optionsMenuEntry button {background: white;border: 1px solid lightgray;margin: 0px;}.ace_optionsMenuEntry button:hover{background: #f0f0f0;}";r.importCssString(i),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); (function() {
|
||||
ace.require(["ace/ext/keybinding_menu"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1});
|
||||
(function() {
|
||||
ace.require(["ace/ext/linking"], function() {});
|
||||
ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() {
|
||||
ace.require(["ace/ext/linking"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="^.*\\.("+n+")$",this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc|adoc"],Assembly_x86:["asm|a"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],Bro:["bro"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Dummy:["dummy"],DummySyntax:["dummy"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|vue|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MEL:["mel"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nix:["nix"],NSIS:["nsi|nsh"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Pig:["pig"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|sm|rkt|oak|scheme"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Twig:["twig|swig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Django:["html"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}});
|
||||
(function() {
|
||||
ace.require(["ace/ext/modelist"], function() {});
|
||||
ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="^.*\\.("+n+")$",this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl"],Assembly_x86:["asm|a"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|vue|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Twig:["latte|twig|swig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Django:["html"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}); (function() {
|
||||
ace.require(["ace/ext/modelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;r<e.end.row;r++)n.getLine(r+1).charAt(0)!==n.$bidiHandler.RLE&&(n.doc.$lines[r+1]=n.$bidiHandler.RLE+n.getLine(r+1))}function a(e,t){var n=t.session,r=n.$bidiHandler,i=t.$textLayer.$lines.cells,s=t.layerConfig.width-t.layerConfig.padding+"px";i.forEach(function(e){var t=e.element.style;r&&r.isRtlLine(e.row)?(t.direction="rtl",t.textAlign="right",t.width=s):(t.direction="",t.textAlign="",t.width="")})}function f(e){function n(e){var t=e.element.style;t.direction=t.textAlign=t.width=""}var t=e.$textLayer.$lines;t.cells.forEach(n),t.cellCache.forEach(n)}var r=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{rtlText:{set:function(e){e?(this.on("change",u),this.on("changeSelection",s),this.renderer.on("afterRender",a),this.commands.on("exec",o),this.commands.addCommands(r)):(this.off("change",u),this.off("changeSelection",s),this.renderer.off("afterRender",a),this.commands.off("exec",o),this.commands.removeCommands(r),f(this.renderer)),this.renderer.updateFull()}},rtl:{set:function(e){this.session.$bidiHandler.$isRtl=e,e?(this.setOption("rtlText",!1),this.renderer.on("afterRender",a),this.session.$bidiHandler.seenBidi=!0):(this.renderer.off("afterRender",a),f(this.renderer)),this.renderer.updateFull()}}})}); (function() {
|
||||
ace.require(["ace/ext/rtl"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})});
|
||||
(function() {
|
||||
ace.require(["ace/ext/spellcheck"], function() {});
|
||||
ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); (function() {
|
||||
ace.require(["ace/ext/spellcheck"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";function l(e,t){this.$u=e,this.$doc=t}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")});
|
||||
(function() {
|
||||
ace.require(["ace/ext/split"], function() {});
|
||||
ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),t.Split=f}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}); (function() {
|
||||
ace.require(["ace/ext/split"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;white-space: pre-wrap}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;}.ace_static_highlight.ace_show_gutter .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line { position: relative; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=function(){this.config={}};a.prototype=i.prototype;var f=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):a.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());f.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};f.render=function(e,t,n,i,s,u){function h(){var r=f.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,l=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||h()}));var c;return t&&typeof t=="object"&&!t.getTokenizer&&(c=t,t=c.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!l[t]||c)l[t]=new e.Mode(c);t=l[t],--a||h()})),--a||h()},f.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var f=new a;f.setSession(u),u.setValue(e);var l=[],c=u.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),o||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight"+(o?"":" ace_show_gutter")+"' style='counter-reset:ace_line "+(i-1)+"'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:u}},n.exports=f,n.exports.highlight=f});
|
||||
(function() {
|
||||
ace.require(["ace/ext/static_highlight"], function() {});
|
||||
ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";function f(e){this.type=e,this.style={},this.textContent=""}var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;white-space: pre-wrap}.ace_static_highlight .ace_gutter {width: 2em;text-align: right;padding: 0 3px 0 0;margin-right: 3px;contain: none;}.ace_static_highlight.ace_show_gutter .ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line { position: relative; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=e("../lib/lang").escapeHTML;f.prototype.cloneNode=function(){return this},f.prototype.appendChild=function(e){this.textContent+=e.toString()},f.prototype.toString=function(){var e=[];if(this.type!="fragment"){e.push("<",this.type),this.className&&e.push(" class='",this.className,"'");var t=[];for(var n in this.style)t.push(n,":",this.style[n]);t.length&&e.push(" style='",t.join(""),"'"),e.push(">")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push("</",this.type,">"),e.join("")};var l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l<e.childNodes.length;l++){var c=e.childNodes[l];c.nodeType==3?(f+=c.data.length,o+=c.data):a.push(f,c)}}else o=e.textContent,t.trim&&(o=o.trim());h.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};h.render=function(e,t,n,i,s,u){function c(){var r=h.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,f=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||c()}));var l;return t&&typeof t=="object"&&!t.getTokenizer&&(l=t,t=l.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!f[t]||l)f[t]=new e.Mode(l);t=f[t],--a||c()})),--a||c()},h.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var a=new c;a.setSession(u),Object.keys(a.$tabStrings).forEach(function(e){if(typeof a.$tabStrings[e]=="string"){var t=l.createFragment();t.textContent=a.$tabStrings[e],a.$tabStrings[e]=t}}),u.setValue(e);var f=u.getLength(),h=l.createElement("div");h.className=n.cssClass;var p=l.createElement("div");p.className="ace_static_highlight"+(o?"":" ace_show_gutter"),p.style["counter-reset"]="ace_line "+(i-1);for(var d=0;d<f;d++){var v=l.createElement("div");v.className="ace_line";if(!o){var m=l.createElement("span");m.className="ace_gutter ace_gutter-cell",m.textContent="",v.appendChild(m)}a.$renderLine(v,d,!1),v.textContent+="\n",p.appendChild(v)}return h.appendChild(p),{css:s+n.cssText,html:h.toString(),session:u}},n.exports=h,n.exports.highlight=h}); (function() {
|
||||
ace.require(["ace/ext/static_highlight"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s});
|
||||
(function() {
|
||||
ace.require(["ace/ext/statusbar"], function() {});
|
||||
ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); (function() {
|
||||
ace.require(["ace/ext/statusbar"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})});
|
||||
(function() {
|
||||
ace.require(["ace/ext/themelist"], function() {});
|
||||
ace.define("ace/ext/themelist",["require","exports","module"],function(e,t,n){"use strict";var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["Xcode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); (function() {
|
||||
ace.require(["ace/ext/themelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]==" ")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:" ",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;a<f;a++){var l=r[a],c=l.search(/\s+$/);a==u&&(c<s[o].column&&c>i&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]});
|
||||
(function() {
|
||||
ace.require(["ace/ext/whitespace"], function() {});
|
||||
ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]==" ")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:" ",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;a<f;a++){var l=r[a],c=l.search(/\s+$/);a==u&&(c<s[o].column&&c>i&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}); (function() {
|
||||
ace.require(["ace/ext/whitespace"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1,8 @@
|
|||
ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["zupfnoter.information.comment.line.percentage","information.keyword","in formation.keyword.embedded"],regex:"(%%%%)(hn\\.[a-z]*)(.*)",comment:"Instruction Comment"},{token:["information.comment.line.percentage","information.keyword.embedded"],regex:"(%%)(.*)",comment:"Instruction Comment"},{token:"comment.line.percentage",regex:"%.*",comment:"Comments"},{token:"barline.keyword.operator",regex:"[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+",comment:"Bar lines"},{token:["information.keyword.embedded","information.argument.string.unquoted"],regex:"(\\[[A-Za-z]:)([^\\]]*\\])",comment:"embedded Header lines"},{token:["information.keyword","information.argument.string.unquoted"],regex:"^([A-Za-z]:)([^%\\\\]*)",comment:"Header lines"},{token:["text","entity.name.function","string.unquoted","text"],regex:"(\\[)([A-Z]:)(.*?)(\\])",comment:"Inline fields"},{token:["accent.constant.language","pitch.constant.numeric","duration.constant.numeric"],regex:"([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/abc"}.call(u.prototype),t.Mode=u})
|
||||
ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["zupfnoter.information.comment.line.percentage","information.keyword","in formation.keyword.embedded"],regex:"(%%%%)(hn\\.[a-z]*)(.*)",comment:"Instruction Comment"},{token:["information.comment.line.percentage","information.keyword.embedded"],regex:"(%%)(.*)",comment:"Instruction Comment"},{token:"comment.line.percentage",regex:"%.*",comment:"Comments"},{token:"barline.keyword.operator",regex:"[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+",comment:"Bar lines"},{token:["information.keyword.embedded","information.argument.string.unquoted"],regex:"(\\[[A-Za-z]:)([^\\]]*\\])",comment:"embedded Header lines"},{token:["information.keyword","information.argument.string.unquoted"],regex:"^([A-Za-z]:)([^%\\\\]*)",comment:"Header lines"},{token:["text","entity.name.function","string.unquoted","text"],regex:"(\\[)([A-Z]:)(.*?)(\\])",comment:"Inline fields"},{token:["accent.constant.language","pitch.constant.numeric","duration.constant.numeric"],regex:"([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.$id="ace/mode/abc",this.snippetFileId="ace/snippets/abc"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/abc"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1 +1,8 @@
|
|||
ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o})
|
||||
ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*(begin|loop|then|is|do)\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){var r=t+n;return r.match(/^\s*(begin|end)$/)?!0:!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=t.getLine(n-1),s=this.$getIndent(i).length,u=this.$getIndent(r).length;if(u<=s)return;t.outdentRows(new o(n,0,n+2,0))},this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/ada"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
ace.define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="for|search|outbound|inbound|any|graph|prune|options|shortest_path|to|in|return|filter|sort|limit|let|collect|remove|update|replace|insers|upsert|with",t="true|false",n="append|contains_array|count|count_distinct|count_unique|first|flatten|intersection|last|length|minus|nth|outersection|pop|position|push|remove_nth|remove_value|remove_values|reverse|shift|slice|sorted|sorted_unique|union|union_distinct|unique|unshift|date_now|date_iso8601|date_timestamp|is_datestring|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_format|date_add|date_subtract|date_diff|date_compare|attributes|count|has|is_same_collection|keep|length|matches|merge|merge_recursive|parse_identifier|translate|unset|unset_recursive|values|zip|fulltext|distance|geo_contains|geo_distance|geo_equals|geo_intersects|is_in_polygon|not_null|first_list|first_document|check_document|collection_count|collections|count|current_user|document|length|hash|apply|assert|/ warn|call|fail|noopt|passthru|sleep|v8|version|abs|acos|asin|atan|atan2|average|avg|ceil|cos|degrees|exp|exp2|floor|log|log2|log10|max|median|min|percentile|pi|pow|radians|rand|range|round|sin|sqrt|stddev_population|stddev_sample|stddev|sum|tan|variance_population|variance_sample|variance|char_length|concat|concat_separator|contains|count|encode_uri_component|find_first|find_last|json_parse|json_stringify|left|length|levenshtein_distance|like|lower|ltrim|md5|random_token|regex_matches|regex_split|regex_test|regex_replace|reverse|right|rtrim|sha1|sha512|split|soundex|substitute|substring|tokens|to_base64|to_hex|trim|upper|uuid|to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|is_key|typename|",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.AqlHighlightRules=s}),ace.define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./aql_highlight_rules").AqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="//",this.$id="ace/mode/aql"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
ace.require(["ace/mode/aql"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue