forked from Gitlink/forgeplus-react
first commit
This commit is contained in:
parent
5c6b360d40
commit
4875f2c944
|
@ -4,6 +4,7 @@ logs
|
|||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
yarn.lock
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
|
@ -30,7 +31,7 @@ bower_components
|
|||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
build/
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
@ -77,3 +78,5 @@ typings/
|
|||
|
||||
#DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
.DS_Store
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
新版tpi改动的文件:
|
||||
Index.js
|
||||
contex/TPIContextProvider.js
|
||||
page/main/LeftViewContainer.js
|
||||
taskList/TaskList.js
|
||||
TPMIndexHOC.js
|
||||
App.js
|
||||
CodeRepositoryViewContainer.js
|
||||
|
||||
Index.js
|
||||
choose={context.chooses}
|
||||
|
||||
|
||||
TPIContextProvider.js
|
||||
|
||||
LeftViewContainer.js
|
||||
|
||||
TaskList.js
|
||||
|
||||
TPMIndexHOC.js
|
||||
|
||||
MainContentContainer
|
||||
新:rep_content返回值多了一层 {content: '...'}
|
||||
|
||||
|
||||
|
||||
|
||||
TODO
|
||||
待同步
|
||||
1、timer图标样式更换
|
||||
index.html
|
||||
WebSSHTimer.css
|
||||
WebSSHTimer.js
|
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Make sure that including paths.js after env.js will read .env variables.
|
||||
delete require.cache[require.resolve('./paths')];
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV;
|
||||
if (!NODE_ENV) {
|
||||
throw new Error(
|
||||
'The NODE_ENV environment variable is required but was not specified.'
|
||||
);
|
||||
}
|
||||
|
||||
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
||||
var dotenvFiles = [
|
||||
`${paths.dotenv}.${NODE_ENV}.local`,
|
||||
`${paths.dotenv}.${NODE_ENV}`,
|
||||
// Don't include `.env.local` for `test` environment
|
||||
// since normally you expect tests to produce the same
|
||||
// results for everyone
|
||||
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
||||
paths.dotenv,
|
||||
].filter(Boolean);
|
||||
|
||||
// Load environment variables from .env* files. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set. Variable expansion is supported in .env files.
|
||||
// https://github.com/motdotla/dotenv
|
||||
// https://github.com/motdotla/dotenv-expand
|
||||
dotenvFiles.forEach(dotenvFile => {
|
||||
if (fs.existsSync(dotenvFile)) {
|
||||
require('dotenv-expand')(
|
||||
require('dotenv').config({
|
||||
path: dotenvFile,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// We support resolving modules according to `NODE_PATH`.
|
||||
// This lets you use absolute paths in imports inside large monorepos:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253.
|
||||
// It works similar to `NODE_PATH` in Node itself:
|
||||
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
||||
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
||||
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
|
||||
// We also resolve them to make sure all tools using them work consistently.
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
||||
.split(path.delimiter)
|
||||
.filter(folder => folder && !path.isAbsolute(folder))
|
||||
.map(folder => path.resolve(appDirectory, folder))
|
||||
.join(path.delimiter);
|
||||
|
||||
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
||||
// injected into the application via DefinePlugin in Webpack configuration.
|
||||
const REACT_APP = /^REACT_APP_/i;
|
||||
|
||||
function getClientEnvironment(publicUrl) {
|
||||
const raw = Object.keys(process.env)
|
||||
.filter(key => REACT_APP.test(key))
|
||||
.reduce(
|
||||
(env, key) => {
|
||||
env[key] = process.env[key];
|
||||
return env;
|
||||
},
|
||||
{
|
||||
// Useful for determining whether we’re running in production mode.
|
||||
// Most importantly, it switches React into the correct mode.
|
||||
NODE_ENV: process.env.NODE_ENV || 'development',
|
||||
// Useful for resolving the correct path to static assets in `public`.
|
||||
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
||||
// This should only be used as an escape hatch. Normally you would put
|
||||
// images into the `src` and `import` them in code to get their paths.
|
||||
PUBLIC_URL: '/forgeplus-react/build/.',
|
||||
}
|
||||
);
|
||||
// Stringify all values so we can feed into Webpack DefinePlugin
|
||||
const stringified = {
|
||||
'process.env': Object.keys(raw).reduce((env, key) => {
|
||||
env[key] = JSON.stringify(raw[key]);
|
||||
return env;
|
||||
}, {}),
|
||||
};
|
||||
|
||||
return { raw, stringified };
|
||||
}
|
||||
|
||||
module.exports = getClientEnvironment;
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
// This is a custom Jest transformer turning style imports into empty objects.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process() {
|
||||
return 'module.exports = {};';
|
||||
},
|
||||
getCacheKey() {
|
||||
// The output is always the same.
|
||||
return 'cssTransform';
|
||||
},
|
||||
};
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
// This is a custom Jest transformer turning file imports into filenames.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process(src, filename) {
|
||||
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
||||
},
|
||||
};
|
|
@ -0,0 +1,55 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const url = require('url');
|
||||
|
||||
// Make sure any symlinks in the project folder are resolved:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/637
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
||||
|
||||
const envPublicUrl = process.env.PUBLIC_URL;
|
||||
|
||||
function ensureSlash(path, needsSlash) {
|
||||
const hasSlash = path.endsWith('/');
|
||||
if (hasSlash && !needsSlash) {
|
||||
return path.substr(path, path.length - 1);
|
||||
} else if (!hasSlash && needsSlash) {
|
||||
return `${path}/`;
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
const getPublicUrl = appPackageJson =>
|
||||
envPublicUrl || require(appPackageJson).homepage;
|
||||
|
||||
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
|
||||
// "public path" at which the app is served.
|
||||
// Webpack needs to know it to put the right <script> hrefs into HTML even in
|
||||
// single-page apps that may serve index.html for nested URLs like /todos/42.
|
||||
// We can't use a relative path in HTML because we don't want to load something
|
||||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||
function getServedPath(appPackageJson) {
|
||||
const publicUrl = getPublicUrl(appPackageJson);
|
||||
const servedUrl =
|
||||
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
|
||||
return ensureSlash(servedUrl, true);
|
||||
}
|
||||
|
||||
// config after eject: we're in ./config/
|
||||
module.exports = {
|
||||
dotenv: resolveApp('.env'),
|
||||
appBuild: resolveApp('build'),
|
||||
appPublic: resolveApp('public'),
|
||||
appHtml: resolveApp('public/index.html'),
|
||||
appIndexJs: resolveApp('src/index.js'),
|
||||
appPackageJson: resolveApp('package.json'),
|
||||
appSrc: resolveApp('src'),
|
||||
yarnLockFile: resolveApp('yarn.lock'),
|
||||
testsSetup: resolveApp('src/setupTests.js'),
|
||||
appNodeModules: resolveApp('node_modules'),
|
||||
publicUrl: getPublicUrl(resolveApp('package.json')),
|
||||
servedPath: getServedPath(resolveApp('package.json')),
|
||||
};
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
if (typeof Promise === 'undefined') {
|
||||
// Rejection tracking prevents a common issue where React gets into an
|
||||
// inconsistent state due to an error, but it gets swallowed by a Promise,
|
||||
// and the user has no idea what causes React's erratic future behavior.
|
||||
require('promise/lib/rejection-tracking').enable();
|
||||
window.Promise = require('promise/lib/es6-extensions.js');
|
||||
}
|
||||
|
||||
// fetch() polyfill for making API calls.
|
||||
require('whatwg-fetch');
|
||||
|
||||
// Object.assign() is commonly used with React.
|
||||
// It will use the native implementation if it's present and isn't buggy.
|
||||
Object.assign = require('object-assign');
|
||||
|
||||
// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
|
||||
// We don't polyfill it in the browser--this is user's responsibility.
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
require('raf').polyfill(global);
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
'use strict';
|
||||
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
||||
const eslintFormatter = require('react-dev-utils/eslintFormatter');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const getClientEnvironment = require('./env');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Webpack uses `publicPath` to determine where the app is being served from.
|
||||
// In development, we always serve from the root. This makes config easier.
|
||||
const publicPath = '/';
|
||||
// `publicUrl` is just like `publicPath`, but we will provide it to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
|
||||
const publicUrl = '';
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(publicUrl);
|
||||
|
||||
// This is the development configuration.
|
||||
// It is focused on developer experience and fast rebuilds.
|
||||
// The production configuration is different and lives in a separate file.
|
||||
// 测试用的
|
||||
module.exports = {
|
||||
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
|
||||
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
|
||||
//devtool: "cheap-module-eval-source-map",
|
||||
// 开启调试
|
||||
devtool: "source-map", // 开启调试
|
||||
// These are the "entry points" to our application.
|
||||
// This means they will be the "root" imports that are included in JS bundle.
|
||||
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
|
||||
entry: [
|
||||
// We ship a few polyfills by default:
|
||||
require.resolve('./polyfills'),
|
||||
// Include an alternative client for WebpackDevServer. A client's job is to
|
||||
// connect to WebpackDevServer by a socket and get notified about changes.
|
||||
// When you save a file, the client will either apply hot updates (in case
|
||||
// of CSS changes), or refresh the page (in case of JS changes). When you
|
||||
// make a syntax error, this client will display a syntax error overlay.
|
||||
// Note: instead of the default WebpackDevServer client, we use a custom one
|
||||
// to bring better experience for Create React App users. You can replace
|
||||
// the line below with these two lines if you prefer the stock client:
|
||||
// require.resolve('webpack-dev-server/client') + '?/',
|
||||
// require.resolve('webpack/hot/dev-server'),
|
||||
require.resolve('react-dev-utils/webpackHotDevClient'),
|
||||
// Finally, this is your app's code:
|
||||
paths.appIndexJs,
|
||||
// We include the app code last so that if there is a runtime error during
|
||||
// initialization, it doesn't blow up the WebpackDevServer client, and
|
||||
// changing JS code would still trigger a refresh.
|
||||
],
|
||||
output: {
|
||||
// Add /* filename */ comments to generated require()s in the output.
|
||||
pathinfo: true,
|
||||
// This does not produce a real file. It's just the virtual path that is
|
||||
// served by WebpackDevServer in development. This is the JS bundle
|
||||
// containing code from all our entry points, and the Webpack runtime.
|
||||
filename: 'static/js/bundle.js',
|
||||
// There are also additional JS chunk files if you use code splitting.
|
||||
chunkFilename: 'static/js/[name].chunk.js',
|
||||
// This is the URL that app is served from. We use "/" in development.
|
||||
publicPath: publicPath,
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: info =>
|
||||
path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where Webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
// It is guaranteed to exist because we tweak it in `env.js`
|
||||
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
|
||||
alias: {
|
||||
|
||||
"educoder": __dirname + "/../src/common/educoder.js",
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
},
|
||||
plugins: [
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
|
||||
// MonacoEditor
|
||||
// https://github.com/Microsoft/monaco-editor/blob/master/docs/integrate-esm.md
|
||||
// https://github.com/Microsoft/monaco-editor-webpack-plugin/issues/56
|
||||
// new MonacoWebpackPlugin(),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// TODO: Disable require.ensure as it's not a standard language feature.
|
||||
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
|
||||
// { parser: { requireEnsure: false } },
|
||||
|
||||
// First, run the linter.
|
||||
// It's important to do this before Babel processes the JS.
|
||||
// {
|
||||
// test: /\.(js|jsx|mjs)$/,
|
||||
// enforce: 'pre',
|
||||
// use: [
|
||||
// {
|
||||
// options: {
|
||||
// formatter: eslintFormatter,
|
||||
// eslintPath: require.resolve('eslint'),
|
||||
//
|
||||
// },
|
||||
// loader: require.resolve('eslint-loader'),
|
||||
// },
|
||||
// ],
|
||||
// include: paths.appSrc,
|
||||
// },
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// "url" loader works like "file" loader except that it embeds assets
|
||||
// smaller than specified limit in bytes as data URLs to avoid requests.
|
||||
// A missing `test` is equivalent to a match.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// Process JS with Babel.
|
||||
{
|
||||
test: /\.(js|jsx|mjs)$/,
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
|
||||
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
||||
// It enables caching results in ./node_modules/.cache/babel-loader/
|
||||
// directory for faster rebuilds.
|
||||
cacheDirectory: true,
|
||||
},
|
||||
},
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader turns CSS into JS modules that inject <style> tags.
|
||||
// In production, we use a plugin to extract that CSS to a file, but
|
||||
// in development "style" loader enables hot editing of CSS.
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
require.resolve('style-loader'),
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
plugins: () => [
|
||||
require('postcss-flexbugs-fixes'),
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'>1%',
|
||||
'last 4 versions',
|
||||
'Firefox ESR',
|
||||
'not ie < 9', // React doesn't support IE8 anyway
|
||||
],
|
||||
flexbox: 'no-2009',
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
require.resolve("style-loader"),
|
||||
{
|
||||
loader: require.resolve("css-loader"),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve("sass-loader")
|
||||
}
|
||||
],
|
||||
},
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// its runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In development, this will be an empty string.
|
||||
new InterpolateHtmlPlugin(env.raw),
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
template: paths.appHtml,
|
||||
}),
|
||||
// Add module names to factory functions so they appear in browser profiler.
|
||||
new webpack.NamedModulesPlugin(),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// This is necessary to emit hot updates (currently CSS only):
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
// Watcher doesn't work well if you mistype casing in a path so we use
|
||||
// a plugin that prints an error when you attempt to do this.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/240
|
||||
new CaseSensitivePathsPlugin(),
|
||||
// If you require a missing module and then `npm install` it, you still have
|
||||
// to restart the development server for Webpack to discover it. This plugin
|
||||
// makes the discovery automatic so you don't have to restart.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/186
|
||||
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how Webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
// new MonacoWebpackPlugin(),
|
||||
],
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty',
|
||||
},
|
||||
// Turn off performance hints during development because we don't do any
|
||||
// splitting or minification in interest of speed. These warnings become
|
||||
// cumbersome.
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
};
|
|
@ -0,0 +1,391 @@
|
|||
'use strict';
|
||||
// extract-css-assets-webpack-plugin
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
|
||||
const eslintFormatter = require('react-dev-utils/eslintFormatter');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
|
||||
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
// const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const paths = require('./paths');
|
||||
const getClientEnvironment = require('./env');
|
||||
|
||||
// Webpack uses `publicPath` to determine where the app is being served from.
|
||||
// It requires a trailing slash, or the file assets will get an incorrect path.
|
||||
const publicPath = paths.servedPath;
|
||||
// Some apps do not use client-side routing with pushState.
|
||||
// For these, "homepage" can be set to "." to enable relative asset paths.
|
||||
const shouldUseRelativeAssetPaths = publicPath === './';
|
||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
||||
// `publicUrl` is just like `publicPath`, but we will provide it to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
|
||||
const publicUrl = publicPath.slice(0, -1);
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(publicUrl);
|
||||
|
||||
// Assert this just to be safe.
|
||||
// Development builds of React are slow and not intended for production.
|
||||
if (env.stringified['process.env'].NODE_ENV !== '"production"') {
|
||||
throw new Error('Production builds must have NODE_ENV=production.');
|
||||
}
|
||||
|
||||
// Note: defined here because it will be used more than once.
|
||||
const cssFilename = './static/css/[name].[contenthash:8].css';
|
||||
|
||||
// ExtractTextPlugin expects the build output to be flat.
|
||||
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
|
||||
// However, our output is structured with css, js and media folders.
|
||||
// To have this structure working with relative paths, we have to use custom options.
|
||||
const extractTextPluginOptions = shouldUseRelativeAssetPaths
|
||||
? // Making sure that the publicPath goes back to to build folder.
|
||||
{ publicPath: Array(cssFilename.split('/').length).join('../') }
|
||||
: {};
|
||||
|
||||
// This is the production configuration.
|
||||
// It compiles slowly and is focused on producing a fast and minimal bundle.
|
||||
// The development configuration is different and lives in a separate file.
|
||||
// 上线用的
|
||||
// console.log('publicPath ', publicPath)
|
||||
module.exports = {
|
||||
// optimization: {
|
||||
// minimize: true,
|
||||
// minimizer: [new TerserPlugin()],
|
||||
// },
|
||||
// externals: {
|
||||
// 'react': 'window.React'
|
||||
// },
|
||||
// Don't attempt to continue if there are any errors.
|
||||
bail: true,
|
||||
// We generate sourcemaps in production. This is slow but gives good results.
|
||||
// You can exclude the *.map files from the build during deployment.
|
||||
// devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版
|
||||
devtool:false,//测试版
|
||||
// In production, we only want to load the polyfills and the app code.
|
||||
entry: [require.resolve('./polyfills'), paths.appIndexJs],
|
||||
output: {
|
||||
// The build folder.
|
||||
path: paths.appBuild,
|
||||
// Generated JS file names (with nested folders).
|
||||
// There will be one main bundle, and one file per asynchronous chunk.
|
||||
// We don't currently advertise code splitting but Webpack supports it.
|
||||
filename: './static/js/[name].[chunkhash:8].js',
|
||||
chunkFilename: './static/js/[name].[chunkhash:8].chunk.js',
|
||||
// We inferred the "public path" (such as / or /my-project) from homepage.
|
||||
// cdn
|
||||
// publicPath: 'https://shixun.educoder.net/react/build/', //publicPath, https://cdn.educoder.net
|
||||
// publicPath: 'https://cdn-testeduplus2.educoder.net/react/build/', //publicPath, https://cdn.educoder.net
|
||||
publicPath: '/forgeplus-react/build/', //publicPath, https://cdn.educoder.net
|
||||
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: info =>
|
||||
path
|
||||
.relative(paths.appSrc, info.absoluteResourcePath)
|
||||
.replace(/\\/g, '/'),
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where Webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
// It is guaranteed to exist because we tweak it in `env.js`
|
||||
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
|
||||
alias: {
|
||||
"educoder": __dirname + "/../src/common/educoder.js",
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
},
|
||||
plugins: [
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// TODO: Disable require.ensure as it's not a standard language feature.
|
||||
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
|
||||
// { parser: { requireEnsure: false } },
|
||||
|
||||
// First, run the linter.
|
||||
// It's important to do this before Babel processes the JS.
|
||||
{
|
||||
test: /\.(js|jsx|mjs)$/,
|
||||
enforce: 'pre',
|
||||
use: [
|
||||
{
|
||||
options: {
|
||||
formatter: eslintFormatter,
|
||||
eslintPath: require.resolve('eslint'),
|
||||
|
||||
},
|
||||
loader: require.resolve('eslint-loader'),
|
||||
},
|
||||
],
|
||||
include: paths.appSrc,
|
||||
},
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// "url" loader works just like "file" loader but it also embeds
|
||||
// assets smaller than specified size as data URLs to avoid requests.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// Process JS with Babel.
|
||||
{
|
||||
test: /\.(js|jsx|mjs)$/,
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
|
||||
compact: true,
|
||||
},
|
||||
},
|
||||
// The notation here is somewhat confusing.
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader normally turns CSS into JS modules injecting <style>,
|
||||
// but unlike in development configuration, we do something different.
|
||||
// `ExtractTextPlugin` first applies the "postcss" and "css" loaders
|
||||
// (second argument), then grabs the result CSS and puts it into a
|
||||
// separate file in our build process. This way we actually ship
|
||||
// a single CSS file in production instead of JS code injecting <style>
|
||||
// tags. If you use code splitting, however, any async bundles will still
|
||||
// use the "style" loader inside the async code so CSS from them won't be
|
||||
// in the main CSS file.
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract(
|
||||
Object.assign(
|
||||
{
|
||||
fallback: {
|
||||
loader: require.resolve('style-loader'),
|
||||
options: {
|
||||
hmr: false,
|
||||
},
|
||||
},
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
minimize: true,
|
||||
sourceMap: shouldUseSourceMap,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
plugins: () => [
|
||||
require('postcss-flexbugs-fixes'),
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'>1%',
|
||||
'last 4 versions',
|
||||
'Firefox ESR',
|
||||
'not ie < 9', // React doesn't support IE8 anyway
|
||||
],
|
||||
flexbox: 'no-2009',
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
extractTextPluginOptions
|
||||
)
|
||||
),
|
||||
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
require.resolve("style-loader"),
|
||||
{
|
||||
loader: require.resolve("css-loader"),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
minimize: true,
|
||||
sourceMap: shouldUseSourceMap,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve("sass-loader")
|
||||
}
|
||||
],
|
||||
},
|
||||
// "file" loader makes sure assets end up in the `build` folder.
|
||||
// When you `import` an asset, you get its filename.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
loader: require.resolve('file-loader'),
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// it's runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In production, it will be an empty string unless you specify "homepage"
|
||||
// in `package.json`, in which case it will be the pathname of that URL.
|
||||
new InterpolateHtmlPlugin(env.raw),
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
template: paths.appHtml,
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeRedundantAttributes: true,
|
||||
useShortDoctype: true,
|
||||
removeEmptyAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
keepClosingSlash: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true,
|
||||
minifyURLs: true,
|
||||
},
|
||||
}),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
|
||||
// It is absolutely essential that NODE_ENV was set to production here.
|
||||
// Otherwise React will be compiled in the very slow development mode.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// Minify the code.
|
||||
// new webpack.optimize.UglifyJsPlugin({
|
||||
// compress: {
|
||||
// warnings: false,
|
||||
// // Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// // https://github.com/facebookincubator/create-react-app/issues/2376
|
||||
// // Pending further investigation:
|
||||
// // https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
// comparisons: false,
|
||||
// },
|
||||
// mangle: {
|
||||
// safari10: true,
|
||||
// },
|
||||
// output: {
|
||||
// comments: false,
|
||||
// // Turned on because emoji and regex is not minified properly using default
|
||||
// // https://github.com/facebookincubator/create-react-app/issues/2488
|
||||
// ascii_only: true,
|
||||
// },
|
||||
// sourceMap: shouldUseSourceMap,
|
||||
// }),
|
||||
//正式版上线后打开去掉debuger和console
|
||||
// new ParallelUglifyPlugin({
|
||||
// cacheDir: '.cache/',
|
||||
// uglifyJS:{
|
||||
// output: {
|
||||
// comments: false
|
||||
// },
|
||||
// compress: {
|
||||
// drop_debugger: true,
|
||||
// drop_console: true
|
||||
// }
|
||||
// }
|
||||
// }),
|
||||
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
|
||||
new ExtractTextPlugin({
|
||||
filename: cssFilename,
|
||||
}),
|
||||
// Generate a manifest file which contains a mapping of all asset filenames
|
||||
// to their corresponding output file so that tools can pick it up without
|
||||
// having to parse `index.html`.
|
||||
new ManifestPlugin({
|
||||
fileName: 'asset-manifest.json',
|
||||
}),
|
||||
// Generate a service worker script that will precache, and keep up to date,
|
||||
// the HTML & assets that are part of the Webpack build.
|
||||
new SWPrecacheWebpackPlugin({
|
||||
// By default, a cache-busting query parameter is appended to requests
|
||||
// used to populate the caches, to ensure the responses are fresh.
|
||||
// If a URL is already hashed by Webpack, then there is no concern
|
||||
// about it being stale, and the cache-busting can be skipped.
|
||||
dontCacheBustUrlsMatching: /\.\w{8}\./,
|
||||
filename: 'service-worker.js',
|
||||
logger(message) {
|
||||
if (message.indexOf('Total precache size is') === 0) {
|
||||
// This message occurs for every build and is a bit too noisy.
|
||||
return;
|
||||
}
|
||||
if (message.indexOf('Skipping static resource') === 0) {
|
||||
// This message obscures real errors so we ignore it.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2612
|
||||
return;
|
||||
}
|
||||
// console.log(message);
|
||||
},
|
||||
minify: true,
|
||||
// For unknown URLs, fallback to the index page
|
||||
navigateFallback: publicUrl + '/index.html',
|
||||
// Ignores URLs starting from /__ (useful for Firebase):
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
|
||||
navigateFallbackWhitelist: [/^(?!\/__).*/],
|
||||
// Don't precache sourcemaps (they're large) and build asset manifest:
|
||||
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
|
||||
}),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how Webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
// new MonacoWebpackPlugin(),
|
||||
],
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty',
|
||||
},
|
||||
};
|
|
@ -0,0 +1,95 @@
|
|||
'use strict';
|
||||
|
||||
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
|
||||
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
|
||||
const ignoredFiles = require('react-dev-utils/ignoredFiles');
|
||||
const config = require('./webpack.config.dev');
|
||||
const paths = require('./paths');
|
||||
|
||||
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
|
||||
const host = process.env.HOST || '0.0.0.0';
|
||||
|
||||
module.exports = function(proxy, allowedHost) {
|
||||
return {
|
||||
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
|
||||
// websites from potentially accessing local content through DNS rebinding:
|
||||
// https://github.com/webpack/webpack-dev-server/issues/887
|
||||
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
|
||||
// However, it made several existing use cases such as development in cloud
|
||||
// environment or subdomains in development significantly more complicated:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2271
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2233
|
||||
// While we're investigating better solutions, for now we will take a
|
||||
// compromise. Since our WDS configuration only serves files in the `public`
|
||||
// folder we won't consider accessing them a vulnerability. However, if you
|
||||
// use the `proxy` feature, it gets more dangerous because it can expose
|
||||
// remote code execution vulnerabilities in backends like Django and Rails.
|
||||
// So we will disable the host check normally, but enable it if you have
|
||||
// specified the `proxy` setting. Finally, we let you override it if you
|
||||
// really know what you're doing with a special environment variable.
|
||||
disableHostCheck:
|
||||
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
|
||||
// Enable gzip compression of generated files.
|
||||
compress: true,
|
||||
// Silence WebpackDevServer's own logs since they're generally not useful.
|
||||
// It will still show compile warnings and errors with this setting.
|
||||
clientLogLevel: 'none',
|
||||
// By default WebpackDevServer serves physical files from current directory
|
||||
// in addition to all the virtual build products that it serves from memory.
|
||||
// This is confusing because those files won’t automatically be available in
|
||||
// production build folder unless we copy them. However, copying the whole
|
||||
// project directory is dangerous because we may expose sensitive files.
|
||||
// Instead, we establish a convention that only files in `public` directory
|
||||
// get served. Our build script will copy `public` into the `build` folder.
|
||||
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
|
||||
// Note that we only recommend to use `public` folder as an escape hatch
|
||||
// for files like `favicon.ico`, `manifest.json`, and libraries that are
|
||||
// for some reason broken when imported through Webpack. If you just want to
|
||||
// use an image, put it in `src` and `import` it from JavaScript instead.
|
||||
contentBase: paths.appPublic,
|
||||
// By default files from `contentBase` will not trigger a page reload.
|
||||
watchContentBase: true,
|
||||
// Enable hot reloading server. It will provide /sockjs-node/ endpoint
|
||||
// for the WebpackDevServer client so it can learn when the files were
|
||||
// updated. The WebpackDevServer client is included as an entry point
|
||||
// in the Webpack development configuration. Note that only changes
|
||||
// to CSS are currently hot reloaded. JS changes will refresh the browser.
|
||||
hot: true,
|
||||
// It is important to tell WebpackDevServer to use the same "root" path
|
||||
// as we specified in the config. In development, we always serve from /.
|
||||
publicPath: config.output.publicPath,
|
||||
// WebpackDevServer is noisy by default so we emit custom message instead
|
||||
// by listening to the compiler events with `compiler.plugin` calls above.
|
||||
quiet: true,
|
||||
// Reportedly, this avoids CPU overload on some systems.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/293
|
||||
// src/node_modules is not ignored to support absolute imports
|
||||
// https://github.com/facebookincubator/create-react-app/issues/1065
|
||||
watchOptions: {
|
||||
ignored: ignoredFiles(paths.appSrc),
|
||||
},
|
||||
// Enable HTTPS if the HTTPS environment variable is set to 'true'
|
||||
https: protocol === 'https',
|
||||
host: host,
|
||||
overlay: false,
|
||||
historyApiFallback: {
|
||||
// Paths with dots should still use the history fallback.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/387.
|
||||
disableDotRule: true,
|
||||
},
|
||||
public: allowedHost,
|
||||
proxy,
|
||||
before(app) {
|
||||
// This lets us open files from the runtime error overlay.
|
||||
app.use(errorOverlayMiddleware());
|
||||
// This service worker file is effectively a 'no-op' that will reset any
|
||||
// previous service worker registered for the same host:port combination.
|
||||
// We do this in development to avoid hitting the production cache if
|
||||
// it used the same host and port.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432
|
||||
app.use(noopServiceWorkerMiddleware());
|
||||
},
|
||||
};
|
||||
};
|
|
@ -0,0 +1,46 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import './index.css';
|
||||
import './indexPlus.css';
|
||||
import App from './App';
|
||||
|
||||
// 加之前main.js 18.1MB
|
||||
// import { message } from 'antd';
|
||||
import message from 'antd/lib/message';
|
||||
import 'antd/lib/message/style/css';
|
||||
|
||||
import { AppContainer } from 'react-hot-loader';
|
||||
|
||||
import registerServiceWorker from './registerServiceWorker';
|
||||
|
||||
import { configureUrlQuery } from 'react-url-query';
|
||||
|
||||
import history from './history';
|
||||
|
||||
// link the history used in our app to url-query so it can update the URL with it.
|
||||
configureUrlQuery({ history });
|
||||
// ----------------------------------------------------------------------------------- 请求配置
|
||||
|
||||
window.__useKindEditor = false;
|
||||
|
||||
|
||||
const render = (Component) => {
|
||||
ReactDOM.render(
|
||||
<AppContainer {...this.props} {...this.state}>
|
||||
<Component {...this.props} {...this.state}/>
|
||||
</AppContainer>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ReactDOM.render(
|
||||
// ,
|
||||
// document.getElementById('root'));
|
||||
// registerServiceWorker();
|
||||
|
||||
render(App);
|
||||
if (module.hot) {
|
||||
module.hot.accept('./App', () => { render(App) });
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,190 @@
|
|||
{
|
||||
"name": "educoder",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@icedesign/base": "^0.2.5",
|
||||
"@monaco-editor/react": "^2.3.0",
|
||||
"@novnc/novnc": "^1.1.0",
|
||||
"antd": "^3.23.2",
|
||||
"array-flatten": "^2.1.2",
|
||||
"autoprefixer": "7.1.6",
|
||||
"axios": "^0.18.0",
|
||||
"babel-core": "6.26.0",
|
||||
"babel-eslint": "7.2.3",
|
||||
"babel-jest": "20.0.3",
|
||||
"babel-loader": "7.1.2",
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-preset-react-app": "^3.1.1",
|
||||
"babel-runtime": "6.26.0",
|
||||
"bizcharts": "^3.5.5",
|
||||
"bundle-loader": "^0.5.6",
|
||||
"case-sensitive-paths-webpack-plugin": "2.1.1",
|
||||
"chalk": "1.1.3",
|
||||
"classnames": "^2.2.5",
|
||||
"clipboard": "^2.0.4",
|
||||
"codemirror": "^5.46.0",
|
||||
"connected-react-router": "4.4.1",
|
||||
"css-loader": "0.28.7",
|
||||
"dotenv": "4.0.0",
|
||||
"dotenv-expand": "4.2.0",
|
||||
"echarts": "^4.2.0-rc.2",
|
||||
"editor.md": "^1.5.0",
|
||||
"eslint": "4.10.0",
|
||||
"eslint-config-react-app": "^2.1.0",
|
||||
"eslint-loader": "1.9.0",
|
||||
"eslint-plugin-flowtype": "2.39.1",
|
||||
"eslint-plugin-import": "2.8.0",
|
||||
"eslint-plugin-jsx-a11y": "5.1.1",
|
||||
"eslint-plugin-react": "7.4.0",
|
||||
"extract-text-webpack-plugin": "3.0.2",
|
||||
"file-loader": "1.1.5",
|
||||
"fs-extra": "3.0.1",
|
||||
"html-webpack-plugin": "2.29.0",
|
||||
"immutability-helper": "^2.6.6",
|
||||
"install": "^0.12.2",
|
||||
"jest": "20.0.4",
|
||||
"js-base64": "^2.5.1",
|
||||
"katex": "^0.11.1",
|
||||
"lodash": "^4.17.5",
|
||||
"loglevel": "^1.6.1",
|
||||
"material-ui": "^1.0.0-beta.40",
|
||||
"md5": "^2.2.1",
|
||||
"moment": "^2.23.0",
|
||||
"monaco-editor": "0.13",
|
||||
"monaco-editor-webpack-plugin": "^1.8.1",
|
||||
"npm": "^6.10.1",
|
||||
"numeral": "^2.0.6",
|
||||
"object-assign": "4.1.1",
|
||||
"postcss-flexbugs-fixes": "3.2.0",
|
||||
"postcss-loader": "2.0.8",
|
||||
"promise": "8.0.1",
|
||||
"prop-types": "^15.6.1",
|
||||
"qs": "^6.6.0",
|
||||
"quill": "^1.3.7",
|
||||
"quill-delta-to-html": "^0.11.0",
|
||||
"raf": "3.4.0",
|
||||
"rc-form": "^2.1.7",
|
||||
"rc-pagination": "^1.16.2",
|
||||
"rc-rate": "^2.4.0",
|
||||
"rc-select": "^8.0.12",
|
||||
"rc-tree": "^1.7.11",
|
||||
"rc-upload": "^2.5.1",
|
||||
"react": "^16.9.0",
|
||||
"react-beautiful-dnd": "^10.0.4",
|
||||
"react-codemirror": "^1.0.0",
|
||||
"react-codemirror2": "^6.0.0",
|
||||
"react-color": "^2.18.0",
|
||||
"react-content-loader": "^3.1.1",
|
||||
"react-cookies": "^0.1.1",
|
||||
"react-dev-utils": "^5.0.0",
|
||||
"react-dom": "^16.9.0",
|
||||
"react-hot-loader": "^4.0.0",
|
||||
"react-infinite-scroller": "^1.2.4",
|
||||
"react-loadable": "^5.3.1",
|
||||
"react-monaco-editor": "^0.25.1",
|
||||
"react-player": "^1.11.1",
|
||||
"react-redux": "5.0.7",
|
||||
"react-router": "^4.2.0",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-split-pane": "^0.1.89",
|
||||
"react-url-query": "^1.4.0",
|
||||
"redux": "^4.0.0",
|
||||
"redux-thunk": "2.3.0",
|
||||
"rsuite": "^4.0.1",
|
||||
"sass-loader": "^7.3.1",
|
||||
"scroll-into-view": "^1.12.3",
|
||||
"source-map-support": "^0.5.16",
|
||||
"showdown": "^1.9.1",
|
||||
"showdown-katex": "^0.6.0",
|
||||
"store": "^2.0.12",
|
||||
"style-loader": "0.19.0",
|
||||
"styled-components": "^4.1.3",
|
||||
"sw-precache-webpack-plugin": "0.11.4",
|
||||
"url-loader": "0.6.2",
|
||||
"webpack": "3.8.1",
|
||||
"webpack-dev-server": "2.9.4",
|
||||
"webpack-manifest-plugin": "1.3.2",
|
||||
"webpack-parallel-uglify-plugin": "^1.1.0",
|
||||
"whatwg-fetch": "2.0.3",
|
||||
"wrap-md-editor": "^0.2.20"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node --max_old_space_size=20000 scripts/start.js",
|
||||
"build": "node --max_old_space_size=15360 scripts/build.js",
|
||||
"concat": "node scripts/concat.js",
|
||||
"gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json",
|
||||
"ana": "webpack-bundle-analyzer ./stats.json",
|
||||
"analyze": "npm run build -- --stats && webpack-bundle-analyzer build/bundle-stats.json",
|
||||
"analyz": "NODE_ENV=production npm_config_report=true npm run build"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
"src/**/*.{js,jsx,mjs}"
|
||||
],
|
||||
"setupFiles": [
|
||||
"<rootDir>/config/polyfills.js"
|
||||
],
|
||||
"testMatch": [
|
||||
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
|
||||
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"testURL": "http://localhost",
|
||||
"transform": {
|
||||
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
|
||||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
|
||||
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"^react-native$": "react-native-web"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"web.js",
|
||||
"mjs",
|
||||
"js",
|
||||
"json",
|
||||
"web.jsx",
|
||||
"jsx",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"react",
|
||||
"react-app"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"import",
|
||||
{
|
||||
"libraryName": "antd",
|
||||
"libraryDirectory": "lib",
|
||||
"style": "css"
|
||||
},
|
||||
"ant"
|
||||
],
|
||||
"syntax-dynamic-import"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"proxy": "http://localhost:3000",
|
||||
"port": "3007",
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "7.0.0-beta.51",
|
||||
"babel-plugin-import": "^1.11.0",
|
||||
"compression-webpack-plugin": "^1.1.12",
|
||||
"concat": "^1.0.3",
|
||||
"happypack": "^5.0.1",
|
||||
"mockjs": "^1.1.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"reqwest": "^2.0.5",
|
||||
"webpack-bundle-analyzer": "^3.0.3",
|
||||
"webpack-parallel-uglify-plugin": "^1.1.0"
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,539 @@
|
|||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,655 @@
|
|||
@charset "utf-8";
|
||||
body{font-size:14px; line-height:2.0;background:#ffffff!important;font-family: "微软雅黑","宋体"; color:#333;height: 100%}
|
||||
html{height:100%;}
|
||||
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
|
||||
.newMain{ margin: 0 auto; padding-bottom: 155px; min-width:1200px }
|
||||
.newFooter{
|
||||
max-height: 110px;
|
||||
}
|
||||
.newFooter{ position: absolute; bottom: 0; width: 100%; background: #323232; clear:both; min-width: 1200px;z-index:99999;left: 0px;}
|
||||
.newHeader{background: #171616;width:100%; height: 50px; min-width: 1200px;position: fixed;top: 0px;left: 0px;z-index:99998}
|
||||
/* 重置样式 */
|
||||
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;}
|
||||
table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9; background:#f5f5f5; color:#333;}
|
||||
div,img,tr,td,table{ border:0;}
|
||||
table,tr,td{border:0;}
|
||||
a:link,a:visited{text-decoration:none;color:#898989; }
|
||||
a:hover {color:#FF7500;}
|
||||
a:hover.fa{color:#FF7500;}
|
||||
|
||||
input,textarea,select{ background: #fff; border:1px solid #eee;}
|
||||
textarea{resize: none;}
|
||||
/*侧滚动条*/
|
||||
::-webkit-scrollbar { width:10px; height:10px; background-color: #F5F5F5; }
|
||||
::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background-color: #F5F5F5; }
|
||||
::-webkit-scrollbar-thumb { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); background-color: #ccc; }
|
||||
/*万能清除浮动*/
|
||||
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;}
|
||||
.clearfix{clear:both;zoom:1}
|
||||
.cl{ clear: both; overflow: hidden;}
|
||||
/*通用浮动*/
|
||||
.fl{ float: left;}
|
||||
.fr{ float: right;}
|
||||
/*pre标签换行*/
|
||||
.break-word{word-break: break-all;word-wrap: break-word;}
|
||||
.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;}
|
||||
/*超过隐藏*/
|
||||
.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.task-hide2{overflow:-moz-hidden-unscrollable; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.hide-text {overflow:hidden; white-space:nowrap;}
|
||||
/*隐藏*/
|
||||
.none{display: none}
|
||||
.block{ display:block;}
|
||||
/*通用文字功能样式*/
|
||||
.font-bd{ font-weight: bold;}
|
||||
.color-red-light{color: #F00!important;}
|
||||
.color-red{ color:#d2322d!important;}
|
||||
.u-color-light-red{color: #FF6666}
|
||||
.color-black{color:#333!important;}
|
||||
.color-green{color:#51a74f!important;}
|
||||
.color-light-green{color:#29bd8b!important;}
|
||||
.color-blue{color:#3498db!important;}
|
||||
.color-orange{color:#ee4a1f!important;}
|
||||
.color-orange02{color:#f79f88!important;}
|
||||
.color-orange03{color:#ff7500!important;}
|
||||
.color-orange04{color: #ee4a20!important;}/*温馨提示公用颜色*/
|
||||
.color-orange05{color: #FF9e6a!important;}
|
||||
.color-orange06{color: #ff6530!important;}
|
||||
a.color-orange05:hover,i.color-orange05:hover{color:#ff7500!important;}
|
||||
.color-orange06{color:#FF6610!important;}
|
||||
.color-yellow{color:#f0ad4e!important;}
|
||||
.color-yellow2{color:#ff9933!important;}
|
||||
.color-yellow3{color:#FFC828;}/*新版学员统计---通关排行榜 2018/01/22*/
|
||||
|
||||
.color-light-grey{color:#afafaf!important;}
|
||||
.color-grey-7f{color: #7f7f7f!important;}
|
||||
.color-grey-no-a{color:#888!important;}
|
||||
.color-grey{color:#888!important;}
|
||||
.color-grey9{color:#999!important;}
|
||||
a.color-grey:hover{color: #FF7500!important;}/*a标签,移入变橙色*/
|
||||
.color-dark-grey{color:#666!important;}
|
||||
.color-grey3{color:#333!important;}
|
||||
a.color-grey3:hover{color: #ff7500!important;}
|
||||
.u-color-light-grey{color: #CCCCCC}
|
||||
.color-light-grey-C{color: #CCCCCC!important;}
|
||||
.color-light-grey-E{color: #EEEEEE}
|
||||
.color-grey-bf{color:#bfbfbf!important;}
|
||||
.color-grey-b{color:#bbbbbb!important;}
|
||||
|
||||
.-text-danger{ color:#FF6545 }
|
||||
.color_white{ color:#fff!important;}
|
||||
.color_Purple_grey{color: #8291a3!important;}/*TPI评论里右侧点赞的icon颜色*/
|
||||
.color-grey-c{color: #cccccc!important;}
|
||||
a.link-color-grey{color:#888!important;}
|
||||
a:hover.link-color-grey{color:#29bd8b!important;}
|
||||
a.link-color-green{color:#29bd8b!important;}
|
||||
a.link-color-blue{color:#6a8abe!important;}
|
||||
a.link-color-grey02{color:#888!important;}
|
||||
a:hover.link-color-grey02{ color:red!important;}
|
||||
a.link-color-grey03{color:#888!important;}
|
||||
a:hover.link-color-grey03{color:#3498db!important;}
|
||||
.edu-color-grey{ color:#666;}
|
||||
.edu-color-grey:hover{color:#ff7500;}
|
||||
/*通用背景颜色*/
|
||||
.back-color-orange{background-color: #FF7500}
|
||||
|
||||
|
||||
/*通用文字大小样式*/
|
||||
.font-12{ font-size: 12px!important;}
|
||||
.font-13{ font-size: 13px!important;}
|
||||
.font-14{ font-size: 14px!important;}
|
||||
.font-15{ font-size: 15px!important;}
|
||||
.font-16{ font-size: 16px!important;}
|
||||
.font-17{ font-size: 17px!important;}
|
||||
.font-18{ font-size: 18px!important;}
|
||||
.font-20{ font-size: 20px!important;}
|
||||
.font-22{ font-size: 22px!important;}
|
||||
.font-25{ font-size: 25px!important;}
|
||||
.font-24{ font-size: 24px!important;}
|
||||
.font-28{ font-size: 28px!important;}
|
||||
.font-30{ font-size: 30px!important;}
|
||||
.font-50{ font-size: 50px!important;}
|
||||
.font-60{ font-size: 60px!important;}
|
||||
.font-70{ font-size: 70px!important;}
|
||||
/*通用内外边距*/
|
||||
.mt-10{ margin-top:-10px;}.mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt15{ margin-top:15px;}.mt17{ margin-top:17px;}.mt20{ margin-top:20px!important;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt50{ margin-top:50px;}.mt70{ margin-top:70px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}
|
||||
.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;}
|
||||
.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;}
|
||||
.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr350{ margin-right:350px;}.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt100{padding-top:100px;}.pt130{padding-top:130px;}
|
||||
|
||||
.pt1{ padding-top:1px;}.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;}
|
||||
.pb5{ padding-bottom:5px;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb28{ padding-bottom:28px;}.pb30{ padding-bottom:30px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb155{ padding-bottom:155px;}
|
||||
.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px;}.pl33{padding-left: 33px}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl100{ padding-left:100px;}.pl35{ padding-left:35px;}.pl50{padding-left:50px;}.pl70{padding-left:70px;}.pl80{padding-left:80px;}.pl92{padding-left:92px;}
|
||||
.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}
|
||||
|
||||
.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px;}.pl33{padding-left: 33px}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl100{ padding-left:100px;}.pl35{ padding-left:35px;}.pl50{padding-left:50px;}.pl70{padding-left:70px;}.pl80{padding-left:80px;}.pl92{padding-left:92px;}
|
||||
.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}
|
||||
|
||||
|
||||
.padding15{ padding:15px;}
|
||||
.padding10{ padding:10px;}
|
||||
.padding10-15{ padding:10px 15px;}
|
||||
.padding15-10{ padding:15px 10px;}
|
||||
.ptl5-10{ padding:5px 10px;}
|
||||
.ptl3-10{ padding:3px 10px;}
|
||||
.ptl8-10{ padding:8px 10px;}
|
||||
|
||||
|
||||
|
||||
.wb11{width:11%!important;}.wb89{width:89%!important;}
|
||||
|
||||
.h3{ height:3px;}
|
||||
.h24{ height: 24px;}
|
||||
.h32{ height: 32px;}
|
||||
.h40{ height: 40px;}
|
||||
.h50{ height: 50px;}
|
||||
.h60{ height: 60px;}
|
||||
.h80{ height: 80px;}
|
||||
.h80{ height: 80px;}
|
||||
.h85{ height: 85px;}
|
||||
.h100{ height:100px;}
|
||||
.h140{ height:140px;}
|
||||
.h200{ height:200px;}
|
||||
/*块*/
|
||||
.col-width{ background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-10{ max-width: 100%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-9{ max-width: 90%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-8{ max-width: 80%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-7{ max-width: 70%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-6{ max-width: 60%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-5{ max-width: 50%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-4{ max-width: 40%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-3{ width: 500px; background: #fff; border:1px solid #e8e8e8;
|
||||
position:absolute;left:-510px;top:0;}
|
||||
.col-width-2{ max-width: 20%; background: #fff; border:1px solid #e8e8e8;}
|
||||
.col-width-1{ max-width: 10%; background: #fff; border:1px solid #e8e8e8;}
|
||||
/*按钮*/
|
||||
a.task-btn{cursor: pointer;display: inline-block;font-weight: bold;border: none;padding: 0 12px;color: #666;background: #e1e1e1;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; }
|
||||
a.task-btn-green{background: #29bd8b; color: #fff!important;}
|
||||
a:hover.task-btn-green{background: #19b17e;}
|
||||
a.task-btn-orange{background: #FF7500; color:#fff!important;}
|
||||
a:hover.task-btn-orange{ background:#ff7500;}
|
||||
a.task-newbtn-grey{background-color: #e1e1e1;color: #666666;}
|
||||
a:hover.task-newbtn-grey{color: #333}
|
||||
a.task-btn-blue{background: #199ed8; color:#fff!important;}
|
||||
a:hover.task-btn-blue{background: #199ed8;color:#fff;}
|
||||
a.task-btn-grey{background-color: #d4d6d8; color: #4d555d!important;}
|
||||
a:hover.task-btn-grey{background-color: #d4d6d8; color: #4d555d;}
|
||||
a.task-btn-grey-white{background-color: #c2c4c6; color: #fff;}
|
||||
a:hover.task-btn-grey-white{background-color: #a9abad;}
|
||||
a.new-btn{display: inline-block;border:none; padding:0 10px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;border-radius: 3px; line-height: 30px;}
|
||||
a.new-btn:hover{background: #c3c3c3; color: #333;}
|
||||
a.new-btn-green{background: #29bd8b; color: #fff;}
|
||||
a.new-btn-green:hover{background:#19b17e; }
|
||||
a.new-btn-blue{background: #6a8abe; color: #fff!important;}
|
||||
a.new-btn-blue:hover{background:#5f7cab; }
|
||||
a.new-bigbtn{display: inline-block;border:none; padding:2px 30px;color: #666;background: #e1e1e1; text-align:center;font-size: 14px; height: 30px;line-height: 30px; border-radius: 3px;}
|
||||
a:hover.new-bigbtn{background: #c3c3c3; color: #333;}
|
||||
a.new-bigbtn-green{background: #3b94d6; color: #fff;}
|
||||
a.new-bigbtn-green:hover{background: #2384cd; color: #fff;}
|
||||
a.task-btn-ver{ height:45px; line-height: 45px; background: #FF7500; color: #fff !important; border-radius:5px; font-size:12px; padding:0 10px;}
|
||||
a.rest-btn-ver{ cursor: not-allowed; background: #ccc;}
|
||||
a.task-btn-ver-line{height:43px; line-height: 43px; border-radius:5px; font-size:12px; padding:0 10px; border:1px solid #ccc;}
|
||||
a:hover.task-btn-ver-line{ border:1px solid #29bd8b;}
|
||||
a:hover.rest-btn-ver{ cursor: not-allowed; background: #ccc;}
|
||||
.new_login_submit_disable{ width:265px; height:40px; line-height: 40px; background:#ccc; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
|
||||
.new_login_submit,a.new_login_submit{ display: block; text-decoration: none !important; width:100%; height:45px; line-height: 45px; background:#29bd8b; color:#fff !important; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
|
||||
.new_login_submit a{ color:#fff !important; text-decoration: none;}
|
||||
.new_login_submit:hover{background: #19b17e;}
|
||||
a.task-btn-email{display: inline-block;font-weight: bold;border: none; width:185px;color: #666;background: #e1e1e1;letter-spacing: 1px;text-align: center;font-size: 14px;height: 40px;line-height: 40px;border-radius: 3px;}
|
||||
a:hover.task-btn-email {background: #c3c3c3; color: #666;}
|
||||
.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;}
|
||||
.white-btn-h40{text-align:center;cursor: pointer;display: inline-block;padding: 5px 10px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;}
|
||||
a.white-btn.green-btn{color:#29bd8b;border:1px solid #29bd8b; }
|
||||
a.white-btn.gery-btn{color: #aaa;border: 1px solid #aaa}
|
||||
a.white-btn.gery-btn:hover{color: #FFFFFF;border: 1px solid #aaa;background: #aaa}
|
||||
a.white-btn.orange-btn,a.white-btn-h40.orange-btn{color: #FF7500;border: 1px solid #FF7500}
|
||||
a.white-btn.orange-btn:hover,a.white-btn-h40.orange-btn:hover{color: #FFFFFF;border: 1px solid #FF7500;background: #ff7500}
|
||||
a.white-btn.orange-bg-btn,a.white-btn-h40.orange-bg-btn{color: #FFFFFF;border: 1px solid #FF7500;background: #ff7500}
|
||||
a.grey-btn{padding: 0px 8px;height: 30px;line-height: 30px;background-color: #eaeaea;color: #7f7f7f;font-size: 14px;border-radius: 3px;}
|
||||
|
||||
.invite-btn{display: block;padding: 1px 10px;background: #fff;color: #333;border-radius: 4px;}
|
||||
a.decoration{text-decoration: underline!important;}
|
||||
/*07-11 新添加的公用样式 cs*/
|
||||
a.course-btn{cursor: pointer;font-weight: bold;border-radius: 4px;display: inline-block;width: auto;padding: 0px 12px;background-color: #FFFFFF;color: #44bfa3;letter-spacing: 1px;height: 30px;line-height: 30px;}
|
||||
.bc-grey{background-color: #CCCCCC!important;}
|
||||
.bc-white{background-color: #ffffff!important;}
|
||||
a.course-bth-blue{cursor: pointer;background-color:#199ed8 ;color: #ffffff !important;display: inline-block;font-weight: bold;border: none;padding: 0 12px;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px;}
|
||||
a.course-bth-orange{cursor: pointer;background-color:#ff6530 ;color: #ffffff !important;display: inline-block;font-weight: bold;border: none;padding: 0 12px;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px;}
|
||||
.topic-hover a:hover{background:#ff7500;color:#fff;}
|
||||
/*.topic-hover li a:hover{color:#fff;}*/
|
||||
/*提示条*/
|
||||
.alert{ padding:10px;border: 1px solid transparent; text-align: center;}
|
||||
.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;}
|
||||
.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;}
|
||||
.alert-green{ background-color: #dff0d8;border-color: #d6e9c6; color:#3c763d;}
|
||||
.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
|
||||
.taskclose:hover{opacity: 0.5;}
|
||||
.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;}
|
||||
/*tag*/
|
||||
.task-tag{ padding:0 10px; text-align: center; display:inline-block; height:30px; line-height: 30px;}
|
||||
.tag-blue{ background-color: #d9edf7; color: #3a87ad;}
|
||||
.tag-grey{ background-color: #f3f5f7; color: #4d555d;}
|
||||
.tag-border-grey{ background-color: #fff;border-color: #e2e2e2; color: #888;}
|
||||
.cir-orange{background: #ff6530;color: #fff; border-radius: 15px; padding: 0 5px; display: inline-block; font-size: 12px; height: 16px;line-height: 16px; }
|
||||
.cir-red{background: red;color: #fff; border-radius: 15px; padding: 0 5px; display: inline-block; font-size: 12px; height: 16px;line-height: 16px; }
|
||||
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
/****************************/
|
||||
/* 页面结构*/
|
||||
.task-pm-content{ width: 1000px; margin: 0 auto; }
|
||||
.task-pm-box{ width: 100%; background: #fff; border: 1px solid #e8e8e8;}
|
||||
.task-paner-con{ padding:15px; color:#666; line-height:2.0;}
|
||||
.task-text-center{ text-align: center;}
|
||||
.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
/*pre标签换行*/
|
||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
|
||||
.pre_word{white-space: pre-wrap;word-wrap: break-word;word-break: normal;}
|
||||
.pr {position:relative;}
|
||||
.df {display:flex;display: -webkit-flex;display: -ms-flex;}
|
||||
.df-js-ac{ justify-content:space-around;-webkit-justify-content: space-around;-webkit-align-items:center;-ms-flex-align:center; align-items: center;}
|
||||
|
||||
.w28 {width: 28px;}
|
||||
.w40{ width: 40px;}
|
||||
.w50{width: 50px;}.edu-txt-w50{ width:50px;}
|
||||
.w60{width: 60px;}
|
||||
.w70{width: 70px;}
|
||||
.w80 {width: 80px;}
|
||||
.w100{width: 100px;}
|
||||
.w120{width: 120px;}
|
||||
.w150{width: 150px;}
|
||||
.w200{width: 200px;}
|
||||
.w300{width: 300px;}
|
||||
.w320{width: 320px;}
|
||||
.edu-w245{ width: 245px; }.w266{width: 266px;}
|
||||
.w780{width: 780px;}
|
||||
.w850{width: 850px;}
|
||||
.w900{width: 900px;}
|
||||
|
||||
|
||||
|
||||
.with10{ width: 10%;}.with15{ width: 15%;}
|
||||
.with20{ width: 20%;}.with25{ width: 25%;}
|
||||
.with30{ width: 30%;}.with35{ width: 35%;}
|
||||
.with40{ width: 40%;}.with45{ width: 45%;}.with49{ width: 49%;}
|
||||
.with50{ width: 50%;}.with55{ width: 55%;}
|
||||
.with52{ width: 52%;}.with48{ width: 48%;}
|
||||
.with60{ width: 60%;}.with65{ width: 65%;}
|
||||
.with70{ width: 70%;}.with73{ width: 73%;}.with75{ width: 75%;}
|
||||
.with70{ width: 70%;}.with73{ width: 73%;}.with75{ width: 75%;}
|
||||
.with80{ width: 80%;}.with85{ width: 85%;}
|
||||
.with87{ width: 87%;}.with90{ width: 90%;}.with95{ width: 95%;}
|
||||
.with100{ width: 100%;}
|
||||
.edu-bg{ background:#fff!important;}
|
||||
.disabled-bg{ background:#eee !important;}
|
||||
.disabled-grey-bg{ background: #a4a4a4 !important;}
|
||||
/* 课程共用 后期再添加至公共样式 bylinda*/
|
||||
a.link-name-dark{ color:#666; max-width:140px; display: block; }
|
||||
a:hover.link-name-dark{ color:#ff7500;}
|
||||
/* 超过宽度省略 */
|
||||
.edu-name-dark{ max-width:100px; display: block; }
|
||||
.edu-info-dark{ max-width:345px; display: block; }
|
||||
.edu-max-h200{ height:200px; overflow: auto;}
|
||||
.edu-h260{ height:260px;}
|
||||
.edu-position{ position: relative;}
|
||||
.edu-h200-auto{ max-height:200px; overflow:auto;}
|
||||
.edu-h300-auto{ max-height:300px; overflow:auto;}
|
||||
.edu-h350-auto{ max-height:350px; overflow:auto;}
|
||||
.edu-txt-w240{ width:240px; display: block;}
|
||||
.edu-txt-w280{ width:280px; display: block;}
|
||||
.edu-txt-w320{ width:320px; display: block;}
|
||||
.edu-txt-w200{ width:200px; display: block;}
|
||||
a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center}
|
||||
.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||
/* 筛选按钮 */
|
||||
.edu-btn-search{ position: absolute; top:0; right:15px;}
|
||||
.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}
|
||||
.edu-con-top{ padding:10px 0; background:#fff; border-bottom:1px solid #eee;font-size:16px; }
|
||||
.edu-con-top h2{ font-size:16px;}
|
||||
.edu-form-label{display: inline-block; width:60px;text-align: right; line-height: 40px; font-weight: normal;}
|
||||
.edu-form-border{ border:1px solid #ddd;}
|
||||
.edu-form-notice-border{ border:1px solid #f27d61 !important;}
|
||||
.edu-form-noborder,input.edu-form-noborder{ border:none; outline:none;}
|
||||
a.edu-btn{display: inline-block;border:none; padding:0 12px;color: #666!important;border:1px solid #ccc; text-align:center;font-size: 14px; height: 29px;line-height: 29px; border-radius:3px; font-weight: bold;letter-spacing:1px;}
|
||||
a:hover.edu-btn{ border:1px solid #5faee3; color: #5faee3!important;}
|
||||
.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
|
||||
.edu-cir-grey1{ display: inline-block; padding:0px 5px; margin-left: 5px; color:#666; background:#ccc; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
|
||||
.edu-cir-grey-q{ display: inline-block; padding:0px 7px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
|
||||
.edu-cir-orange{ display: inline-block; padding:0px 7px; color:#fff; background:#FF7500; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
|
||||
|
||||
/*a.edu-filter-cir-grey{display: inline-block; padding:0px 15px; color:#666; border:1px solid #ddd; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
|
||||
a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498db; color:#3498db; }*/
|
||||
|
||||
.edu-filter-btn{display: inline-block; padding:0px 3px; color:#666; background:#fff; text-align: center; border-radius:3px; font-size:12px; height:20px; line-height:20px;}
|
||||
.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;}
|
||||
.edu-filter-btn-orange{border:1px solid #ff5055; color:#ff5055;}
|
||||
.edu-filter-btn-red{border:1px solid #d72e36; color:#d72e36;}
|
||||
.edu-filter-btn-green{border:1px solid #6fbb9d; color:#6fbb9d;}
|
||||
.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;}
|
||||
.edu-filter-btn-danger{background:#d72e36; color:#fff;}
|
||||
.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;}
|
||||
.edu-filter-btn-no-late{border:1px solid #8c8c8c;color: #8c8c8c;}
|
||||
.edu-filter-btn-end{border: 1px solid #b6b6b6;color: #b6b6b6;}
|
||||
.eud-pointer{ cursor:pointer;}
|
||||
.edu-bg-grey{ background:#f6f6f6; width:90%; min-width:700px; color:#666;}
|
||||
/* table-1底部边框 */
|
||||
.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default}
|
||||
.edu-pop-table tr{ height:40px; }
|
||||
.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;}
|
||||
.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;}
|
||||
.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; }
|
||||
.edu-pop-table tr td{border-bottom:1px solid #eee;}
|
||||
.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;}
|
||||
.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;}
|
||||
.edu-pop-table tr td .alink-name{color: #333!important;}
|
||||
.edu-pop-table tr td .alink-name:hover{color: #FF7500!important;}
|
||||
.edu-pop-table tr td .alink-operate{color: #cccccc!important;}
|
||||
.edu-pop-table tr td .alink-operate:hover{color: #FF7500!important;}
|
||||
/*th行有背景颜色且table无边框*/
|
||||
.edu-pop-table.head-color thead tr{background: #fafbfb}
|
||||
.edu-pop-table.head-color{border: none}
|
||||
.edu-pop-table.head-color tr:last-child td {border: none}
|
||||
/*--表格行间隔背景颜色-*/
|
||||
.edu-pop-table.interval-td thead tr{background: #fafbfb}
|
||||
.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb}
|
||||
.edu-pop-table.interval-td tbody tr td{border: none}
|
||||
/*--表格行间隔背景颜色(th也没有边框)-*/
|
||||
.edu-pop-table.interval-all{border:none}
|
||||
.edu-pop-table.interval-all thead th{border: none}
|
||||
.edu-pop-table.interval-all thead tr{background: #fafbfb}
|
||||
.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb}
|
||||
.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px}
|
||||
/*--表格行移入背景颜色-*/
|
||||
.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/
|
||||
.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/
|
||||
/* table-2全边框 */
|
||||
.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse}
|
||||
.edu-pop-table-all tr{ height:30px; }
|
||||
.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;}
|
||||
.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; }
|
||||
.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px}
|
||||
|
||||
|
||||
|
||||
.edu-line{ border-bottom:1px solid #eee;}
|
||||
table.table-th-grey th{ background:#f5f5f5;}
|
||||
table.table-pa5 th,table.table-pa5 td{ padding:0 5px;}
|
||||
.panel-comment_item .orig_cont-red{ border:solid 2px #cc0000; border-radius:10px; padding:4px;color:#999;margin-top:-1px; }
|
||||
/***** loading ******/
|
||||
/***** Ajax indicator ******/
|
||||
#ajax-indicator {
|
||||
position: absolute; /* fixed not supported by IE*/
|
||||
background-color:#eee;
|
||||
border: 1px solid #bbb;
|
||||
top:35%;
|
||||
left:40%;
|
||||
width:20%;
|
||||
/*height:5%;*/
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
padding:0.6em;
|
||||
z-index:100000;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
html>body #ajax-indicator { position: fixed; }
|
||||
|
||||
#ajax-indicator span{
|
||||
color:#fff;
|
||||
color: #333333;
|
||||
background-position: 0% 40%;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(/images/loading.gif);
|
||||
padding-left: 26px;
|
||||
vertical-align: bottom;
|
||||
z-index:100000;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------列表结构*/
|
||||
.forum_table .forum_table_item:nth-child(odd){background: #fafbfb}
|
||||
.forum_table_item{padding: 20px 15px;display: flex;}
|
||||
.forum_table_item .item_name{color: #333}
|
||||
.forum_table_item .item_name:hover{color: #FF7500}
|
||||
|
||||
|
||||
.edu-bg{ background:#fff;}
|
||||
/*---------tab切换-----*/
|
||||
.task-tab{width:10%;height:42px;line-height:42px;text-align:center;color:#666;
|
||||
position:relative;cursor:pointer;}
|
||||
.task-tab.sheet{border-bottom:3px solid #5faee3;color:#5faee3;}
|
||||
.task-tab.bold{border-bottom:3px solid #5faee3;font-weight:bold;}
|
||||
.task-tab i{position:absolute;bottom:-9px;left:45%;color:#5faee3 !important;}
|
||||
|
||||
.undis {display: none}
|
||||
.edu-change .panel-form-label{ line-height:1.9;}
|
||||
|
||||
.title_type { line-height: 40px;height: 40px;border-bottom: 1px solid #eee;color: #666;padding-left: 15px; }
|
||||
.teacher_banner {border-bottom: 1px solid #eee}
|
||||
.zbg { background: url("/images/edu_user/richEditer.png") -195px -2px no-repeat; height: 18px; cursor: pointer}
|
||||
.zbg_latex { background: url("/images/edu_user/richEditer.png") -315px -3px no-repeat;height: 18px;cursor: pointer;}
|
||||
.latex{position:relative;top: 4px;}
|
||||
|
||||
.white_bg {background: #fff}
|
||||
.user_tab_type {background: #FF6610}
|
||||
|
||||
/*首页----------筛选切换(有数字)*/
|
||||
.user_course_filtrate{width: auto;text-align: center;line-height: 26px;}
|
||||
.user_filtrate_span1_bg{color: #FF7500}
|
||||
.user_filtrate_span2{width: auto;padding: 0px 6px;border-radius: 8px;background: #ccc;font-size: 12px;display: block;line-height: 15px;float: right;color: #FFFFFF; margin-top: 6px;}
|
||||
.user_filtrate_span2_bg{background: #FF7500!important;}
|
||||
.user_course_filtrate:hover .user_filtrate_span1{color: #FF7500!important;}
|
||||
.user_course_filtrate:hover .user_filtrate_span2{background: #FF7500!important;}
|
||||
/*课堂----------筛选切换(没有数字,默认白色背景)*/
|
||||
.course_filtrate{width: auto;padding:0px 10px;text-align: center;background: #eeeeee;border-radius: 10px;margin-right: 20px;line-height: 26px;}
|
||||
.course_filtrate:hover{background: #FF7500; color: #ffffff; }
|
||||
.course_filtrate_bg{background: #FF7500; color: #ffffff!important; }
|
||||
/*我的课堂----------筛选切换(没有数字,默认灰色背景)*/
|
||||
.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px;text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;}
|
||||
.edu-filter-cir-grey:hover{background: #FF7500; color: #ffffff!important;}
|
||||
.edu-filter-cir-grey.active{background: #FF7500; color: #ffffff!important;}
|
||||
|
||||
.edu-find .edu-find-input{border-bottom: 1px solid #EEEEEE;}
|
||||
.edu-find .edu-find-input input{border: none;outline: none}
|
||||
.edu-find .edu-close{position: absolute;top: -1px;right: 7px;font-size: 18px;cursor: pointer;}
|
||||
.edu-find .edu-open{position: absolute;top: 1px;right: -18px}
|
||||
|
||||
|
||||
/*最新和最热导航条的公用样式*/
|
||||
.nav_check_item{margin-bottom:13px;border-bottom: 2px solid #FC7033;}
|
||||
.nav_check_item li{width:auto;width: 80px;text-align: center;cursor: pointer;height: 38px;line-height: 38px;border-top-right-radius:5px;border-top-left-radius:5px;}
|
||||
.nav_check_item li a{display: block;width: 100%;}
|
||||
|
||||
.check_nav{background: #FC7033;color: #ffffff;}
|
||||
.check_nav a{color: #ffffff !important;}
|
||||
.check_on{background:#FF7500;color: #ffffff!important;border-radius: 4px;}
|
||||
|
||||
/*实训列表块里面的遮罩效果*/
|
||||
.black-half{position: absolute;left: 0;top:0px;width: 100%;height: 100%;background: rgba(0,0,0,0.4);z-index: 3;display: none;}
|
||||
.black-half-lock{width: 65px;height: 65px;border-radius: 50%;background:#8291a3;vertical-align: middle;text-align: center;margin:25% auto 0px;}
|
||||
.black-half-lock i{margin-top: 7px;}
|
||||
.black-half-info{width: 100%;text-align: center;color: #FFFFFF;margin-top:10px}
|
||||
.show-black{display: block;animation: black-down 1s linear 1;}
|
||||
@-webkit-keyframes black-down {
|
||||
25% {-webkit-transform: translateY(0);}
|
||||
50%, 100% {-webkit-transform: translateY(0);}
|
||||
}
|
||||
|
||||
@keyframes black-down {
|
||||
25% {transform: translateY(0);}
|
||||
50%, 100% {transform: translateY(0);}
|
||||
}
|
||||
|
||||
/*去掉IE input框输入时自带的清除按钮*/
|
||||
input::-ms-clear{display:none;}
|
||||
|
||||
|
||||
/*最小高度*/
|
||||
.mh750{min-height: 750px}
|
||||
.mh650{min-height: 650px}
|
||||
.mh580{min-height: 580px}
|
||||
.mh550{min-height: 550px}
|
||||
.mh510{min-height: 510px}
|
||||
.mh440{min-height: 440px}
|
||||
.mh400{min-height: 400px}
|
||||
.mh390{min-height: 390px}
|
||||
.mh360{min-height: 360px}
|
||||
.mh350{min-height: 350px}
|
||||
.mh320{min-height: 320px}
|
||||
.mh240{min-height: 240px}
|
||||
.mh200{min-height: 200px}
|
||||
|
||||
/*---------------操作部分虚线边框-----------------*/
|
||||
.border-dash-orange{border: 1px dashed #ffbfaa}
|
||||
/*错误、危险、失败提示边框*/
|
||||
.border-error-result{border:1px dashed #ff5252}
|
||||
|
||||
.border-dash-ccc{border-top:1px dashed #ccc;border-bottom:1px dashed #ccc;}
|
||||
|
||||
.login-error{border:1px solid #ff5252!important;}/*登录时,输入的手机号码或者密码错误,边框变红*/
|
||||
.error-red{border: 1px solid #DB6666;background: #FFE6E5;border-radius: 3px;padding: 2px 10px;}
|
||||
.error-red i{color: #FF6666}
|
||||
|
||||
|
||||
/*---------------tab公用背景颜色-----------------*/
|
||||
.background-blue{background:#5ECFBA!important;}
|
||||
.background-orange{background: #FC7033!important;}
|
||||
.back-orange-main{background: #FC7500!important;color:#FFFFff!important;}/*主流橙色*/
|
||||
.back-orange-01{background: #FF9e6a!important;}/*带背景标题、带色彩分割线和操作入口*/
|
||||
.back-f6-grey{background: #F6F6F6;}
|
||||
.background-blue a{color:#ffffff!important;}
|
||||
.background-orange a{color: #ffffff!important;}
|
||||
/*---------------tab公用边框-----------------*/
|
||||
.border-bottom-orange{border-bottom: 2px solid #FC7033!important;}
|
||||
.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;}
|
||||
.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;}
|
||||
.bor-top-greyE{border-top: 1px solid #EEEEEE!important;}
|
||||
/*---------------边框-----------------*/
|
||||
.bor-gray-c{border:1px solid #ccc;}
|
||||
.bor-grey-e{border:1px solid #eee;}
|
||||
.bor-grey-d{border:1px solid #ddd;}
|
||||
.bor-grey01{border:1px solid #E6EAEB;}
|
||||
.bor-blue{border:1px solid #5faee3;}
|
||||
.bor-red{border:1px solid #db0505 !important;}
|
||||
.bor-none{border:none;}
|
||||
.bor-outnone{outline:none; border:0px;}
|
||||
/*延时*/
|
||||
.delay{border:1px solid #db0505;padding: 0px 10px;height: 23px;line-height: 23px;border-radius: 12px;display: block;float: left;color:#db0505 }
|
||||
/*
|
||||
tip公共样式的设置:
|
||||
|
||||
*/
|
||||
.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/
|
||||
.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/
|
||||
word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/
|
||||
.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/
|
||||
position: absolute;content:''; width:0; height:0;}/*5*/
|
||||
.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/
|
||||
border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/
|
||||
.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/
|
||||
.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/
|
||||
border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/
|
||||
.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/
|
||||
.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/
|
||||
border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/
|
||||
.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/
|
||||
.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;border-top: 10px solid #000;}
|
||||
.data-tip-top:before{bottom:-11px;}
|
||||
|
||||
/*-------------------------圆角-------------------------*/
|
||||
.bor-radius-upper{border-radius: 4px 4px 0px 0px;}
|
||||
.bor-radius4{border-radius: 4px;}
|
||||
.bor-radius20{border-radius: 20px;}
|
||||
.bor-radius-all{border-radius: 50%;}
|
||||
|
||||
/*-------------------------旋转-------------------------*/
|
||||
.transform90{transform: rotate(90deg);}
|
||||
/*---------------------编辑器边框------------------------*/
|
||||
.kindeditor{background: #F0F0EE;height:22px;border:1px solid #CCCCCC;border-bottom: none}
|
||||
|
||||
/*文本框只有下边框*/
|
||||
.other_input{border: none;border-bottom: 1px solid #aaa;outline: none}
|
||||
/*两端对齐*/
|
||||
.justify{text-align: justify!important;}
|
||||
|
||||
/**/
|
||||
#edu-tab-nav .edu-position-hidebox li a{font-size: 12px}
|
||||
/*在线课堂*/
|
||||
.courseRefer{float:left; max-height:120px;margin-bottom:10px;overflow:auto; overflow-x:hidden;}
|
||||
.logo {width: 295px;height: 30px;border-style:none;position: absolute;top:50%;left:39%;}
|
||||
/**/
|
||||
.task-header-info .fork{font-weight:bold;font-size:14px;color:#666;}
|
||||
|
||||
|
||||
.memos_con a{color: #3b94d6!important;}
|
||||
.memos_con ul li{ list-style-type: disc!important; }
|
||||
.memos_con ol li{ list-style-type: decimal!important; }
|
||||
.memos_con li{ margin-bottom: 0!important; }
|
||||
.memos_con pre {overflow-x: auto;}
|
||||
|
||||
/*详情a标签默认显示样式*/
|
||||
.a_default_show a{color: #136ec2!important}
|
||||
|
||||
/*消息机制右侧小三角*/
|
||||
.tiding{width: 100%;height: 50px ;position: relative}
|
||||
.triangle {position: absolute;right: -1px;top:0px;width: 0;height: 0;border-top: 35px solid #29bd8b;border-left: 60px solid transparent;z-index: 1}
|
||||
.triangle-new{position: absolute;right: 1px;top: 0px;z-index: 2;font-size: 14px;color: white;transform: rotate(30deg);}
|
||||
.news_list_item{padding: 10px 0px;}
|
||||
.news_list_item:nth-child(odd){background-color:#FAFBFB }
|
||||
.listItem_right{line-height: 45px;float: right;max-width: 100px;margin-right: 15px;color: #888888}
|
||||
.listItem_middle{max-width: 980px;}
|
||||
.news_fa{font-size: 30px;color: #888;margin: 7px 16px;}
|
||||
.tiding_logo{text-align:center;background: #f3f3f3;width: 200px;height: 100px}
|
||||
|
||||
.tr-position{position: absolute;left:54%;width: 20px;text-align: center;border: none!important;}
|
||||
|
||||
.two_lines_show{ overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 60px; word-wrap: break-word;}
|
||||
.two_lines_show_my{ overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 40px; word-wrap: break-word;}
|
||||
.three_lines_show{ overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 3;-webkit-box-orient: vertical;height: 66px;line-height: 22px; word-wrap: break-word;}
|
||||
|
||||
/*新版讨论区*/
|
||||
.discuss-tab a:hover{border-bottom: 2px solid #FC7033!important; color:#000;}
|
||||
.discuss-lh40{ line-height:40px;}.discuss-lh16{ line-height:16px}.discuss-lh20{ line-height:20px;}.discuss-lh20{ line-height:20px;}.discuss-lh30{ line-height:30px;}.discuss-lh50{ line-height:50px;}.discuss-lh60{line-height:60px}.discuss-lh80{line-height:80px;}.discuss-lh100{line-height:100px;}
|
||||
.discuss-bor-l{ border-left:4px solid #ff7500;}
|
||||
.page-turn:hover{background:#fff; color:#FF7500;}
|
||||
|
||||
/*实训路径/镜像类别图片*/
|
||||
.hor-ver-center{width:80px; height:80px; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-40px;}
|
||||
.hor-ver-center100{width:100px; height:100px; position:absolute; left:50%;top:25%; margin-left:-50px; margin-top:-25px;}
|
||||
.mirror-shade{ background: rgba(0,0,0,0.4); z-index: 3; display:none;}
|
||||
|
||||
.position20{position:absolute; top:-60px; left:7%;}
|
||||
|
||||
/*--------TA的主页、关注*/
|
||||
.user_watch{width: 78px;padding: 2px 0px!important;}
|
||||
|
||||
|
||||
/*-------------主页块的背景颜色----------------*/
|
||||
.edu-index-bg-green{ background:#5bcab1;}
|
||||
.edu-index-bg-blue{ background:#75b9de;}
|
||||
.edu-index-bg-purple{ background:#8f97df;}
|
||||
.edu-index-bg-yellow{ background:#f7bb74;}
|
||||
.edu-index-bg-orange{ background:#e48a81;}
|
||||
|
||||
|
||||
/*-------------提示框颜色----------------*/
|
||||
.bor-reds{
|
||||
border:1px solid #FF0000!important;
|
||||
border-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,481 @@
|
|||
/* 头部 */
|
||||
.header{ width:100%; height:51px;min-width:1200px;background:rgb(23, 22, 22); }
|
||||
.header_con{ width:1200px; min-width:1200px; height:50px; margin:0 auto;}
|
||||
.new-logo img{ width:36px; height:36px;margin-top:7px; border-radius:3px; }
|
||||
.new-logo p{ font-size: 18px; color:#fff; line-height: 50px; }
|
||||
a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;}
|
||||
a:hover.new-nav-a{ color:#ff7500; text-decoration: none;}
|
||||
.header-search{border-radius:3px; background:#fff;}
|
||||
.header-search a{text-decoration: none; color:#666!important;}
|
||||
.header-search a:hover{color:#ff7500!important;}
|
||||
input.header-search-input{ width:150px; height:30px; padding:0 5px; border-style: none; border: none;outline:none;}
|
||||
.innner-nav{ margin-left:40px;}
|
||||
.innner-nav li{float:left; margin-right:40px;}
|
||||
.innner-nav li a{ display: block; color:#fff; padding:0 10px; }
|
||||
.inner-btnbox02{ width:270px; margin: 30px auto 0;}
|
||||
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
|
||||
.inner-nav-mes{ font-size:16px; color:#fff; margin-right:35px; margin-top:18px; }
|
||||
.inner-nav-cir{ background:#ff6530; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size:10px; height:17px; line-height:17px;}
|
||||
.inner-nav-user{ width: 75px; height: 45px; margin-top:5px; position: relative; padding-left: 0px;}
|
||||
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
|
||||
select.header-search-select{ border:none; font-size:14px; padding:5px; background: none;}
|
||||
.edu-unlogin-nav a{ color:#fff!important; font-size:14px; line-height:50px;}
|
||||
.edu-unlogin-nav a:hover{ color:#3b94d6;}
|
||||
.edu-unlogin-nav{ font-size:12px; color:#fff; line-height:50px;}
|
||||
|
||||
.task-user-dropdown{font-size:12px; line-height: 1.9; width:120px; background-color:#fff; border-radius:3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:relative; top:5px; right:44px; display: none; z-index:999;}
|
||||
.task-user-dropdown font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -13px;left:100px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
|
||||
.task-user-dropdown-nav { padding-top:5px; }
|
||||
.task-user-dropdown-nav li { display: inline-block; text-align: center; width:100%; height: 30px; line-height: 30px;}
|
||||
.task-user-dropdown-nav li:hover{ background:#eee;}
|
||||
.task-user-dropdown-nav li:hover a{color: #FF7500!important;}
|
||||
.task-line{ display: block; height: 1px!important; line-height: 1px!important; border-bottom:1px solid #eee; margin:0;}
|
||||
.inner-nav-user:hover .task-user-dropdown{ display:block;}
|
||||
dropdown { display: inline-block; height:30px; line-height:1.9; font-size:12px; }
|
||||
dropdown label, dropdown ul li{ display: block; width:42px; padding:4px 10px; text-align: center;border-radius:3px; color:#666;}
|
||||
dropdown ul li:hover{background: #eee; color:#666;cursor: pointer;}
|
||||
dropdown label{color: #666;border-radius: 3px 0 0 3px; position: relative; z-index: 2; width:50px; text-align: center; height:22px;}
|
||||
dropdown input{display: none;}
|
||||
dropdown input:checked + label{ background: #fff;color:#666;}
|
||||
dropdown ul{ position: absolute; visibility: visible; opacity: 1; top: 38px; background: #fff; z-index: 99; border-radius:3px;}
|
||||
$colors: #fff, #0072B5, #2C3E50;
|
||||
@for $i from 1 through length($colors) {
|
||||
dropdown ul li:nth-child(#{$i}) {
|
||||
border-left: 4px solid nth($colors, $i);
|
||||
.fa{
|
||||
color: nth($colors, $i);
|
||||
}
|
||||
&:hover {
|
||||
background: nth($colors, $i);
|
||||
color: white;
|
||||
.fa{
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.edu-dropdown{ position: relative; padding:0 15px; }
|
||||
.edu-dropdown-menu{ background-color:#fff; text-align: center; border-radius:3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; top:25px; left:0px; z-index: 999; display:none;}
|
||||
.edu-dropdown-menu li{ height:30px; line-height:30px; display: block; padding:0 15px; text-align: left;}
|
||||
.edu-dropdown-menu li label{ cursor: pointer;}
|
||||
.edu-dropdown-menu li:hover{ color: #FF7500!important;}
|
||||
/*.edu-dropdown:hover .edu-dropdown-menu{ display: block;}*/
|
||||
.animate{ -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -ms-transition: all .3s;
|
||||
transition: all .3s; backface-visibility:hidden; -webkit-backface-visibility:hidden; /* Chrome and Safari */ -moz-backface-visibility:hidden; /* Firefox */ -ms-backface-visibility:hidden; /* Internet Explorer */}
|
||||
/* 底部 */
|
||||
.footer{width:100%; height:100px; background-color:#fff; }
|
||||
.footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; }
|
||||
.footer_con-inner{ width: 300px; margin:0px auto;}
|
||||
.footer_con-inner li a{ font-size: 16px; color: #888;display: block;padding:0 15px; border-right: solid 1px #888;}
|
||||
.footer_con-inner li a:hover{text-decoration: underline;}
|
||||
.footer_con-p{ color: #888; margin-top:10px;}
|
||||
.inner-footer{ width: 100%; min-width:1200px; background:#323232; padding-bottom:30px;}
|
||||
.inner-footer_con{ width: 1200px; margin: 0 auto;}
|
||||
.inner-footer-nav{ height: 50px; border-bottom:1px solid #47494d;}
|
||||
.inner-footer-nav li a{ float: left; margin-right:15px; font-size: 14px; color: #888; line-height: 50px;}
|
||||
.saoma-box{ position: relative;}
|
||||
.saoma-img-box{ position: absolute; top:-300px; left: -86px; border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display: none;}
|
||||
.saoma-box li:hover ul{display:block; }
|
||||
.img-show{ width:50px; height:50px; border-radius:50px; }
|
||||
.saoma-img-box font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 103px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
|
||||
.inner-footer-p-big{ display: block; height: 50px; line-height: 50px; color:#888; font-size: 16px; border-left:2px solid #888; padding-left:15px;}
|
||||
.inner-btnbox02{ width:270px; margin: 30px auto 0;}
|
||||
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
|
||||
img.edu-footer-logo{ height: 50px;}
|
||||
/************布局 byLB****************/
|
||||
.panel-content{ width: 1200px; margin:20px auto; background:#eaebec;}
|
||||
.panel-contentss{ width: 1200px; margin:10px auto; margin-bottom:20px; background:#fff;}
|
||||
/************讨论区20170321 byLB****************/
|
||||
.panel-inner-fourm{ padding:20px; border-bottom:1px solid #eee;}
|
||||
.panel-inner-fourm:hover{ background:#EFF9FD;}
|
||||
.nobg:hover{ background:#fff;}
|
||||
a.panel-list-title,.panel-list-title { display:inline-block; font-size: 16px; color: #333; font-weight:normal; max-width:82%;}
|
||||
a:hover.panel-list-title{color:#FF7500;}
|
||||
.panel-list-img{ width: 60px; height: 60px; border-radius:100px;}
|
||||
a.panel-name-small{ display: inline-block; max-width:100px; color:#29bd8b; font-size:12px; }
|
||||
.panel-list-infobox{ width: 92%; margin-left:8%; margin-top:-70px;}
|
||||
.panel-lightgrey,.panel-lightgrey span{ font-size:12px; color:#888;}
|
||||
.panel-inner-info{ width: 93%; margin-left:7%;}
|
||||
.panel-bg-grey{ padding:5px 0;background:#f6f6f6; width: 100%; color:#666;}
|
||||
.panel-list-nodata{ width: 420px; margin:100px auto; text-align: center;}
|
||||
|
||||
/*班级讨论区panel 2017/07/20 cs*/
|
||||
.panel-content-box{background: #FFFFFF;}
|
||||
.panel-content-line{width: 90%;margin: 30px 5%;}
|
||||
.panel-content-line .panel-line-left{width: 8%;text-align: right;}
|
||||
.panel-content-line .panel-content-label{height: 40px;line-height: 40px}
|
||||
.panel-content-line .panel-content-input{width: 90%;height: 28px;padding: 5px;}
|
||||
.panel-content-line .panel-content-ta{width: 90%;min-height: 148px;padding: 5px;}
|
||||
/* 回复评论 */
|
||||
.panel-comment_item{ width: 100%; }
|
||||
.panel-comment_item .t_area{ color:#888;}
|
||||
.comment_item_cont{ padding:15px; border-bottom:1px solid #e3e3e3;}
|
||||
.comment_item_cont .J_Comment_Face{height: 50px}
|
||||
.comment_item_cont .J_Comment_Face img{ width:50px; height:50px; border-radius:100px; }
|
||||
.panel-comment_item .t_content{ width:93%; margin-left:15px;}
|
||||
.panel-comment_item a.content-username {font-size:14px; margin-right:15px; display:inline-block; max-width:100px;color: #888888}
|
||||
.J_Comment_Info{height: 20px;line-height: 22px;}
|
||||
/*.panel-comment_item a:hover.content-username{color:#FF7500;}*/
|
||||
.panel-comment_item .orig_user img{width:40px; height:40px;border-radius:100px; }
|
||||
.panel-comment_item .reply-right{ float:right; position:relative;}
|
||||
.panel-comment_item .reply_iconup02{ position:absolute; top:22px; left:14px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
|
||||
.panel-comment_item .comment_orig_content{margin:10px 0; color:#999;}
|
||||
.panel-comment_item .comment_orig_content .comment_orig_content{margin-top:0; color:#666;}
|
||||
.panel-comment_item .orig_cont{ border:solid 1px #F3DDB3; background:#FFFEF4; padding:4px;color:#999;margin-top:-1px; }
|
||||
.panel-comment_item .orig_cont_sub{ border-top:0}
|
||||
.panel-comment_item .comment_orig_content .orig_index{ float:right; color:#666; font-family:Arial; padding-right:5px;line-height:30px;}
|
||||
.panel-comment_item .comment_orig_content .orig_user{ margin:10px 15px 10px 5px;}
|
||||
.panel-comment_item .comment_orig_content .orig_user span{ color:#999; padding-right:5px;}
|
||||
.panel-comment_item .comment_orig_content .orig_content{padding:5px 0px 5px 0px;line-height:24px; color:#333; }
|
||||
.panel-comment_item .orig_right{ width:80%; margin-top:5px;}
|
||||
.panel-comment_item .orig_right img{max-width:100%;}
|
||||
.panel-comment_item a.comment_ding_link{ height:24px;line-height:24px;display:inline-block;padding-left:2px;vertical-align:middle; color:#333; }
|
||||
.panel-comment_item a:hover.comment_ding_link{ color:#269ac9;}
|
||||
.panel-comment_item .comment_ding_link span{display: inline-block;padding: 0 0px 0 8px;}
|
||||
.panel-comment_item .comment_ding_link em{font-style: normal;font-family:arial;}
|
||||
.panel-comment_item .comment_reply_link{ display:inline-block; width:50px; height:24px;line-height: 24px; vertical-align:middle;text-align: center;}
|
||||
.panel-comment_item .comment_reply_link:link,.comment_reply_link:visited{color:#333;text-decoration: none;}
|
||||
.panel-comment_item .comment_content{ color:#666;}
|
||||
.comment_content img,.orig_content img{max-width: 100%}
|
||||
.panel-comment_item .t_txt{ margin-top:10px;}
|
||||
.panel-comment_item .orig_reply_box{border-top:1px solid #e3e3e3; width:100%;padding: 15px 0px 0px 0;margin-top: 5px;}
|
||||
.panel-comment_item .orig_textarea{width:90%; margin-bottom:10px;}
|
||||
.panel-comment_item .orig_textarea02{ border:1px solid #ccc; background-color:#fff; width:92%; margin-bottom:10px;}
|
||||
.panel-comment_item .orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
|
||||
.panel-comment_item .orig_sub:hover{ background:#297fb8;}
|
||||
.panel-comment_item .orig_cont_hide{ text-align:center; width:100%; display:block; font-size:14px; color:#666; border-bottom:1px solid #F3DDB3; padding:8px 0;}
|
||||
.panel-comment_item .orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}
|
||||
.orig_reply{ font-size: 12px; }
|
||||
.panel-mes-head{ padding:10px; border-bottom:1px solid #eee;}
|
||||
.homepagePostReplyPortrait a img{border-radius: 100px;}
|
||||
/* 表格 */
|
||||
.panel-new-table { width:100%; text-align: center; }
|
||||
.panel-new-table tr th{ color:#333; height: 50px;line-height:50px; }
|
||||
.panel-new-table tr th,.panel-new-table tr td{ border-bottom:1px solid #eee; }
|
||||
.panel-new-table tr td{color:#666; height: 40px; line-height:40px;}
|
||||
.panel-table-pd15 tr td{ padding:15px 0;}
|
||||
.panel-new-table tbody tr:hover{ background:#f9f9f9;}
|
||||
a.panel-table-name{display:block; max-width:100px;text-align:center;}
|
||||
a.panel-table-title{display:block; max-width:240px;text-align:center;}
|
||||
.table-num{ width:5%; text-align: center;}
|
||||
/* 滑动条 */
|
||||
.panel-slider-bg{ width:240px; height: 15px; border-radius:15px; background:#f1f2f7; }
|
||||
.panel-slider-inner00{ display:block; width:0%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner01{ display:block; width:10%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner02{ display:block; width:20%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner03{ display:block; width:30%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner04{ display:block; width:40%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner05{ display:block; width:50%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner06{ display:block; width:60%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner07{ display:block; width:70%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner08{ display:block; width:80%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner09{ display:block; width:90%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
.panel-slider-inner10{ display:block; width:100%; height: 15px; border-radius:15px; background:#29bd8b;}
|
||||
/* 翻页 */
|
||||
.panel-pages a{ display: inline-block; border:1px solid #d1d1d1; color:#888; float:left;text-align:center; padding:0 10px; margin-right:5px; height: 30px; line-height: 30px; }
|
||||
.panel-pages a:hover,.panel-pages .active{ background-color:#29bd8b; border:1px solid #29bd8b;color:#fff; }
|
||||
.panel-pages{ width: 350px; margin:20px auto;}
|
||||
/* 翻页*/
|
||||
.pages_right_min a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 10px; line-height:1.9; margin: 0 5px;}
|
||||
.pages_right_min a.pages-border-right{border-right:1px solid #d1d1d1; }
|
||||
.pages_right_min a:hover,.pages_right_min a.active{ background-color:#FC7033; color:#fff!important;border:1px solid #FC7033}
|
||||
.pages_right_min li{float: left;}
|
||||
/* 个人主页翻页 */
|
||||
.pages_user_show a:hover,.pages_user_show a.active{ background-color:#FC7033;; color:#fff;border: 1px solid #FC7033;}
|
||||
.pages_user_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888; float:left;text-align:center; padding:3px 10px; line-height:1.9; margin: 0 5px;}
|
||||
.pages_user_show li{float: left; list-style-type: none;}
|
||||
.pages_user_show ul li{list-style-type: none !important;}
|
||||
.pages_user_show ul li a{color:#888}
|
||||
/* 小翻页 */
|
||||
.pages_little_show a:hover,.pages_little_show a.active{ background-color:#FC7033;; color:#fff!important;border:1px solid #FC7033}
|
||||
.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;}
|
||||
.pages_little_show li{float: left;}
|
||||
/* 搜索*/
|
||||
.panel-search{ position: relative;}
|
||||
input.panel-search-input{ height: 30px; width:300px; color: #666;}
|
||||
.panel-search-btn{ position: absolute; top:2px; right:10px;}
|
||||
/* 表单*/
|
||||
.label-w20{ width:20%!important;}
|
||||
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; }
|
||||
.panel-form input,.panel-form textarea,.panel-form select{ border:1px solid #e2e2e2;color:#666;line-height: 1.9; background:#fff;}
|
||||
.panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; border-radius:3px;}
|
||||
input.panel-form-width-690{ padding:5px;width:90%; height:40px; }
|
||||
input.panel-form-width-100{ padding:5px;width:100%; height:40px;}
|
||||
input.panel-form-width-45{ padding:5px;width:44.5%; height:40px; }
|
||||
input.panel-form-width-50{ padding:5px;width:44.5%; height:25px; }
|
||||
input.panel-form-width-60{ padding:5px;width:60%; height:40px; }
|
||||
textarea.panel-form-width-100{ padding:5px;width:100%; height:150px; }
|
||||
textarea.panel-form-width-690{ padding:5px;width:90%; height:150px; }
|
||||
.panel-form-width-670{ width: 670px; padding:5px;}
|
||||
.panel-form-height-150{ height: 150px;}
|
||||
.panel-form-height-30{height: 30px;}
|
||||
.task-bg-grey{ background:#f3f3f3; width:90%; min-width:700px; padding:10px; border:1px solid #f3f3f3; color:#888;}
|
||||
.task-bg-grey02{ background:#f3f3f3; width:80%; min-width:700px; padding:7px 10px; border:1px solid #f3f3f3; color:#888;}
|
||||
|
||||
input.task-form-10,textarea.task-form-10,select.task-form-10,.task-form-10{padding:5px;width:10%;box-sizing: border-box}
|
||||
input.task-form-15,textarea.task-form-15,select.task-form-15,.task-form-15{padding:5px;width:15%;box-sizing: border-box}
|
||||
input.task-form-20,textarea.task-form-20,select.task-form-20,.task-form-20{padding:5px;width:20%;box-sizing: border-box}
|
||||
input.task-form-30,textarea.task-form-30,select.task-form-30,.task-form-30{padding:5px;width:30%;box-sizing: border-box}
|
||||
input.task-form-35,textarea.task-form-35,select.task-form-35,.task-form-35{padding:5px;width:35%;box-sizing: border-box}
|
||||
input.task-form-40,textarea.task-form-40,select.task-form-40,.task-form-40{padding:5px;width:40%;box-sizing: border-box}
|
||||
input.task-form-45,textarea.task-form-45,select.task-form-45,.task-form-45{padding:5px;width:45%;box-sizing: border-box}
|
||||
input.task-form-50,textarea.task-form-50,select.task-form-50,.task-form-50{padding:5px;width:50%;box-sizing: border-box}
|
||||
input.task-form-60,textarea.task-form-60,select.task-form-60,.task-form-60{padding:5px;width:60%;box-sizing: border-box}
|
||||
input.task-form-70,textarea.task-form-70,select.task-form-70,.task-form-70{padding:5px;width:70%;box-sizing: border-box}
|
||||
input.task-form-80,textarea.task-form-80,select.task-form-80,.task-form-80{padding:5px;width:80%;box-sizing: border-box}
|
||||
input.task-form-90,textarea.task-form-90,select.task-form-90,.task-form-90{padding:5px;width:90%;box-sizing: border-box}
|
||||
input.task-form-100,textarea.task-form-100,select.task-form-100,.task-form-100{padding:5px;width:100%;}
|
||||
input.task-height-40,textarea.task-height-40,.task-height-40,select.task-height-40{height:40px;}
|
||||
input.task-height-30,textarea.task-height-30,.task-height-30,select.task-height-30{height:32px;}
|
||||
input.task-height-220,textarea.task-height-220,.task-height-220{height:220px;}
|
||||
input.task-height-150,textarea.task-height-150,.task-height-150{height:150px;}
|
||||
input.task-height-100,textarea.task-height-100,.task-height-100{height:100px;}
|
||||
input.task-height-80,textarea.task-height-80,.task-height-80{height:80px;}
|
||||
|
||||
/*头像下拉弹框*/
|
||||
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}
|
||||
.my_account_info li a{ color: #888;}
|
||||
.my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
|
||||
.my_account_info li{ padding-left: 5px; line-height: 1.5;}
|
||||
.li_bottom_border{ border-bottom:1px solid #eee;}
|
||||
a.task-index-name{ display: inline-block; max-width:80px;}
|
||||
.task-index-name{ display: inline-block; max-width:80px;}
|
||||
|
||||
/*滑块验证*/
|
||||
.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px; line-height: 45px; text-align: center;border-radius: 4px;}
|
||||
.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;}
|
||||
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;}
|
||||
.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
|
||||
.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;}
|
||||
.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;}
|
||||
|
||||
|
||||
/*新建新增*/
|
||||
/*.edu-con-top{ padding:10px 0; background:#fff; border-bottom:1px solid #eee;font-size:16px; }*/
|
||||
/*.edu-con-top h2{ font-size:16px;}*/
|
||||
/*.edu-con-bg01{ width: 100%; background:#fff;}*/
|
||||
/*.edu-con-top .color-grey{ color:#666!important;}*/
|
||||
|
||||
/*附件上传的样式*/
|
||||
.atta_input{ width: 980px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
|
||||
/*作业描述、帖子内容*/
|
||||
.upload_img img{max-width: 100%;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 40px;}
|
||||
|
||||
/*数据为空公共页面*/
|
||||
img.edu-nodata-img{ width:200px; margin:50px auto 20px; display: block;}
|
||||
.edu-nodata-p{ font-size: 16px; text-align: center; color:#888;border-bottom:none!important;}
|
||||
|
||||
/* new tab */
|
||||
.edu-tab{ width: 100%; background:#fff;}
|
||||
#edu-tab-nav{height:47px;background: #fff;}
|
||||
#edu-tab-nav li.new-tab-nav {float:left; width: 150px; text-align:center;height:48px;line-height:48px;border-top-right-radius:5px;border-top-left-radius:5px; }
|
||||
#edu-tab-nav li a{font-size:14px; }
|
||||
#edu-user-tab-nav{height:40px;background: #fff; border-bottom:2px solid #FC7033;}
|
||||
#edu-user-tab-nav li.new-tab-nav {float:left; width: 120px; text-align:center;height:42px;line-height:42px;border-top-left-radius: 5px;border-top-right-radius:5px}
|
||||
#edu-user-tab-nav li a{font-size:14px; }
|
||||
.edu-new-tab-hover { background:#5faee3; }
|
||||
.edu-user-tab-hover{background:#FC7033;}
|
||||
.edu-user-tab-hover a{color:#fff!important;}
|
||||
.edu-new-tab-hover a{color:#fff!important;}
|
||||
.edu-class-con-list:hover{ background:#EFF9FD;}
|
||||
.edu-bg-shadow{box-shadow: 0px 0px 5px rgba(146, 153, 169, 0.2);}
|
||||
a.task-btn-line{display: inline-block;font-weight: bold;padding: 0 12px;color: #666;background: #fff;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; border:1px solid #ccc;}
|
||||
a:hover.task-btn-line{ border:1px solid #3498db;background:#3498db;color: #fff;}
|
||||
|
||||
/*阴影*/
|
||||
.user_bg_shadow{-webkit-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);box-shadow: 0 0 8px 0 rgba(142,142,142,.1);}/*四边阴影*/
|
||||
.user_bg_shadow_notop{-webkit-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);}/*没有上边阴影*/
|
||||
/*阴影+边框*/
|
||||
.shadow_border{border:1px solid #eee;-webkit-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);box-shadow: 0 0 8px 0 rgba(142,142,142,.1);}
|
||||
.shadow_border_notop{border:1px solid #eee;-webkit-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);}
|
||||
.user_bg_shadow01{-webkit-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);-moz-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);}
|
||||
.user_bg_shadow02{-webkit-box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);-moz-box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);}
|
||||
.box_bg_shandow {box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
|
||||
|
||||
/*新增的公用样式*/
|
||||
.box-boxshadow{box-shadow: 3px 3px 10px rgba(146, 153, 169, 0.2);}
|
||||
.prop-notice-info{padding: 10px;border:1px solid #F3DDB3;background-color: #FFFEF4;}
|
||||
.prop-notice-info ol{list-style-type: disc;list-style-position:inside}
|
||||
.prop-notice-info ol li{list-style-type: disc;color: #ff6532;margin-bottom:0!important;}
|
||||
|
||||
/*input框移出后没有内容将边框阴影变为红色*/
|
||||
.notinput_bg_shadow{border: none;box-shadow: 0px 0px 4px rgba(227,53,37,1);}
|
||||
/*设置input框的placehoder的字体颜色*/
|
||||
input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc}
|
||||
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
|
||||
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
|
||||
input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
|
||||
/*班级讨论区置顶的样式*/
|
||||
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;}
|
||||
.btn-cir:hover{background:#fff;color:#333333}.all_work_border{border: 1px solid #4c515d;}/*TPI全部任务的数量需要加一个边框*/
|
||||
.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1}
|
||||
.btn-cir-red{background:red;color: #fff; font-weight: normal;}
|
||||
.btn-cir-red:hover{background:red;}
|
||||
.btn-cir-orange {background: #ff7500; color: #fff; font-weight: normal;border: 1px solid #ff7500}
|
||||
.btn-top{display: inline-block;padding: 0px 5px;line-height: 20px;font-size: 12px;border-radius: 3px;}
|
||||
.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;}
|
||||
/*圆形绿色背景---------22*/
|
||||
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
|
||||
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
|
||||
/*圆形绿色背景------------------18*/
|
||||
.panel-inner-icon18{width: 18px;height: 18px;line-height: 18px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
|
||||
|
||||
/*---------------块右上角的三角形,颜色为浅橙色*/
|
||||
.triangle-topright {position: absolute;right: -1px;top:0px;width: 0;height: 0;border-top: 35px solid #FF9E6A;border-left: 60px solid transparent;z-index: 1}
|
||||
.triangle-font{position: absolute;right: 1px;top: 2px;z-index: 2;font-size: 12px;color: white;transform: rotate(31deg);}
|
||||
.triangle-font2{position: absolute;right: 1px;top: -5px;z-index: 2;font-size: 12px;color: white;transform: rotate(31deg);}
|
||||
|
||||
/* colorbox
|
||||
*******************************************************************************/
|
||||
/*
|
||||
Colorbox Core Style:
|
||||
The following CSS is consistent between example themes and should not be altered.
|
||||
*/
|
||||
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:99999; overflow:hidden;}
|
||||
#cboxWrapper {max-width:none;}
|
||||
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
||||
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
||||
#cboxContent{position:relative;}
|
||||
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
||||
#cboxTitle{margin:0;}
|
||||
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
||||
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
||||
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
|
||||
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
|
||||
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
||||
|
||||
/*
|
||||
User Style:
|
||||
Change the following styles to modify the appearance of Colorbox. They are
|
||||
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
||||
*/
|
||||
#cboxOverlay{background:#fff;}
|
||||
#colorbox{outline:0;}
|
||||
#cboxTopLeft{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat 0 0;}
|
||||
#cboxTopCenter{height:25px; background:url(/images/colorbox/border1.png) repeat-x 0 -50px;}
|
||||
#cboxTopRight{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat -25px 0;}
|
||||
#cboxBottomLeft{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat 0 -25px;}
|
||||
#cboxBottomCenter{height:25px; background:url(/images/colorbox/border1.png) repeat-x 0 -75px;}
|
||||
#cboxBottomRight{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat -25px -25px;}
|
||||
#cboxMiddleLeft{width:25px; background:url(/images/colorbox/border2.png) repeat-y 0 0;}
|
||||
#cboxMiddleRight{width:25px; background:url(/images/colorbox/border2.png) repeat-y -25px 0;}
|
||||
#cboxContent{background:#fff; overflow:hidden;}
|
||||
.cboxIframe{background:#fff;}
|
||||
#cboxError{padding:50px; border:1px solid #ccc;}
|
||||
#cboxLoadedContent{margin-bottom:20px;}
|
||||
#cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
|
||||
#cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
|
||||
#cboxLoadingOverlay{background:#fff url(/images/colorbox/loading.gif) no-repeat 5px 5px;}
|
||||
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
||||
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
||||
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
||||
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
||||
#cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
|
||||
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
||||
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
||||
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
|
||||
|
||||
/*-----下拉框--------*/
|
||||
.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;}
|
||||
.down-select p{height: 35px;line-height: 35px;padding-left: 5px;}
|
||||
.down-select p:hover{background: #f3f4f6}
|
||||
|
||||
/*课程、实训的条状样式*/
|
||||
.homepage-list-show p{height:70px;line-height:70px;}
|
||||
.homepage-list-show p:nth-child(odd){background:#fafbfb;}
|
||||
.homepage-list-show p .first{width:58%;display:inline-block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.homepage-list-show p .hasmargin{width:23%;display:inline-block;text-align: center;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.homepage-list-show p .haspadding{width:16.7%;display:inline-block;margin-right:12%;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.homepage-list-show p .last{width:8.33%;display:inline-block;color:#888;cursor: pointer; display: none;}
|
||||
.homepage-list-show p .last:hover{color:#5faee3;}
|
||||
.homepage-list-show p .last:hover .blue{color:#5faee3;}
|
||||
|
||||
/*-----课程名称下拉框--------*/
|
||||
.course_list_ul,.down-list{ overflow-y: scroll;display: none;position: absolute;top:40px;left: -1px;width: 100% !important;border:1px solid #eeeeee;background: #FFFFFF;max-height: 150px;z-index: 10}
|
||||
.course_list_ul li{height:20px;padding:5px 10px;clear:both;line-height:28px;margin-bottom: 0 !important;cursor: pointer;}
|
||||
.down-list li{text-align: left;outline: none;padding: 5px 10px;clear: both;line-height: 22px!important;margin-bottom: 0 !important;cursor: pointer;width: 100%;box-sizing: border-box;height: 30px;border: none!important;}
|
||||
.down-list li:hover{background: #eee}
|
||||
.down-list{top:32px}
|
||||
.unit-part{border:1px solid #ccc;padding: 0px 8px;border-radius: 5px;margin-right: 10px}
|
||||
.unit-part input{border: none!important;text-align: left;width:auto;outline: none}
|
||||
/*-----试卷提交状态--------*/
|
||||
.post_status_btn{display: block;float: left;padding: 0px 5px;font-size: 12px;color: #FFFFFF;border-radius: 4px;height: 20px;line-height: 20px;;}
|
||||
.post_btn_green{background: #29bd8b;border: 1px solid #29bd8b!important;color: #fff;}
|
||||
.post_btn_green_q{background: #5ECFBA;border: 1px solid #5ECFBA!important;color: #fff;}
|
||||
.post_btn_orange{background: #FF7500;border: 1px solid #FF7500!important;color: #fff;}
|
||||
.post_btn_red{background: #ee4a1f;border: 1px solid #ee4a1f!important;color: #fff;}
|
||||
.post_btn_grey{background: #e4e4e3;border: 1px solid #e4e4e3!important;}
|
||||
.post_btn_white{background: #ffffff;}
|
||||
/*评阅状态*/
|
||||
.checkstatus_box_small{width: 10px;height: 10px;display: block;float: left;margin-right: 3px;}
|
||||
.checkstatus_box_big{cursor: default;width: 30px;height: 30px;line-height: 30px;text-align: center;margin-right: 10px;border:1px solid #CCCCCC;display: block;float: left;margin-bottom: 10px}
|
||||
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
|
||||
|
||||
/*个人主页头部认证圆形背景*/
|
||||
.user-info-span{border-radius: 50%;float:left;background: #F3F5F7;text-align: center;width: 23px;height: 23px;line-height: 23px;margin-top: 3px;margin-right: 5px}
|
||||
|
||||
/*试卷答题倒计时*/
|
||||
.time_panel span.factorial{float: left;display: block;line-height: 35px;padding: 0px 3px;}
|
||||
.time_panel span.time{float: left;display: block;color: #ffffff;background-color: #333333;font-size: 16px;border-radius: 5px;letter-spacing: 1px;width: 33px;text-align: center;line-height: 35px;height: 35px;}
|
||||
|
||||
.hidemsg{overflow: hidden;cursor: pointer}
|
||||
.hidemsg div{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
opacity:0.4;
|
||||
background-color: #ffffff;
|
||||
-webkit-border-radius: 100%;
|
||||
-moz-border-radius: 100%;
|
||||
-o-border-radius: 100%;
|
||||
-ms-border-radius: 100%;
|
||||
-webkit-animation-fill-mode: both;
|
||||
-moz-animation-fill-mode: both;
|
||||
-ms-animation-fill-mode: both;
|
||||
-o-animation-fill-mode: both;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
-webkit-animation: ball-scale 1s 0s ease-in-out infinite;
|
||||
-moz-animation: ball-scale 1s 0s ease-in-out infinite;
|
||||
-ms-animation: ball-scale 1s 0s ease-in-out infinite;
|
||||
-o-animation: ball-scale 1s 0s ease-in-out infinite;
|
||||
animation: ball-scale 1s 0s ease-in-out infinite;
|
||||
}
|
||||
@keyframes ball-scale{
|
||||
0%{width: 0px;height: 0px}
|
||||
100%{width: 80px;height: 80px}
|
||||
}
|
||||
|
||||
/*-------------------个人主页关注和粉丝列表改版 以及TPM合作者部分改版 2018/01/15-------------------------*/
|
||||
.-task-con-int .favour .fens-table-list{display: flex;width:21.29%;margin:0px 1.5% 1.5% 0px;min-height: 125px;border: 1px solid #EEEEEE;padding: 10px;background: #f9fbfd}
|
||||
.-task-con-int .favour .fens-table-list:nth-child(4n+1){margin:0px 1.5% 1.5% 1.5%;}
|
||||
.-task-con-int .favour .fens-table-list .touxiang{border-radius: 50%;overflow: hidden;}
|
||||
.white-icon-ring{width: 25px;height: 25px;background: #ffffff;border-radius: 50%;text-align: center;line-height: 25px;}
|
||||
a.btn-focus{display: block;width:80px;height: 35px;line-height: 35px;border-radius: 4px;border:1px solid #EEEEEE;text-align: center;cursor: pointer;background: #ffffff}
|
||||
a.btn-focus:hover{color: #FFFFFF!important;background:#FC7033;border: 1px solid #FC7033 }
|
||||
.fans-name{max-width: 100px;word-break: break-all;overflow: hidden;height: 26px;text-overflow: ellipsis;white-space: nowrap;}
|
||||
.school-name{max-width: 196px;word-break: break-all;overflow: hidden;height: 26px;text-overflow: ellipsis;white-space: nowrap;}
|
||||
|
||||
.fans_del{position: absolute;right: 12px;top: 12px;cursor: pointer;
|
||||
text-align: center;}
|
||||
.fans_del i{color: #b5b5b5}
|
||||
.fans_del:hover i{color: #ff7500!important;}
|
||||
|
||||
.-task-con-int .favour .p2{line-height:90px;text-align:center;}
|
||||
.-task-con-int .favour .p2:hover .changecolor{color:#5faee3;}
|
||||
.-task-con-int .favour .fens{position:relative;}
|
||||
.-task-con-int .favour .fens .many{position:absolute;right:22px;top:-35px;}
|
||||
.-task-con-int .favour .fens .list{width:100px;text-align:center;padding-top:5px;}
|
||||
.-task-con-int .favour .fens .list dt{margin:20px;margin-bottom:5px;}
|
||||
.-task-con-int .favour .fens .touxiang{border-radius:28px;overflow:hidden;}
|
||||
|
||||
/*选择实训的弹框*/
|
||||
.shixun_work_div{overflow-y: auto;max-height: 90px;}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 394 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,111 @@
|
|||
|
||||
.CodeMirror-merge {
|
||||
position: relative;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
|
||||
min-height:50px;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
|
||||
|
||||
.CodeMirror-merge-pane {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
.CodeMirror-merge-pane-rightmost {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-gap {
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #515151;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-scrolllock-wrap {
|
||||
position: absolute;
|
||||
bottom: 0; left: 50%;
|
||||
}
|
||||
.CodeMirror-merge-scrolllock {
|
||||
position: relative;
|
||||
left: -50%;
|
||||
cursor: pointer;
|
||||
color: #d8d8d8;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
right: 0; bottom: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #ce374b;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy-reverse {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
|
||||
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
|
||||
|
||||
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-chunk { background: #9a6868; }
|
||||
.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
|
||||
.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
|
||||
.CodeMirror-merge-r-connect { fill:#9a6868;}
|
||||
|
||||
.CodeMirror-merge-l-chunk { background: #eef; }
|
||||
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
|
||||
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
|
||||
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
|
||||
|
||||
.CodeMirror-merge-collapsed-widget:before {
|
||||
content: "(...)";
|
||||
}
|
||||
.CodeMirror-merge-collapsed-widget {
|
||||
cursor: pointer;
|
||||
color: #88b;
|
||||
background: #eef;
|
||||
border: 1px solid #ddf;
|
||||
font-size: 90%;
|
||||
padding: 0 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
|
|
@ -0,0 +1,524 @@
|
|||
/************新版公共****************/
|
||||
/************新版公共****************/
|
||||
html{height:100%;}
|
||||
/*.newContainer{ min-height:100%; height: auto !important; height: 100%; position: relative;}
|
||||
.newMain{ margin: 0 auto; padding-bottom: 155px; }
|
||||
.newFooter{ position: absolute; bottom: 0; width: 100%; height: 155px;background: #323232; clear:both; min-width: 1200px}
|
||||
.newHeader{background: #46484c;width:100%; height: 50px; min-width: 1200px}*/
|
||||
.w20_center{ width: 20px;text-align: center; }
|
||||
.task-container{ min-width:1300px; margin:0 auto; background: #f5f9fc; position: relative;}
|
||||
/*左侧导航*/
|
||||
.leftbar{ height: 100%; background: #1f212d; width:80px;}
|
||||
.user-info{ width:80px; height:100px; padding-top:15px;}
|
||||
a.user-info-img{ display: block; width: 50px; height: 50px; margin:0 auto; }
|
||||
a.user-info-img img{border-radius:100px;border:2px solid #666;}
|
||||
a.user-info-img img:hover{border:2px solid #888;}
|
||||
a.user-info-name{ display: block; font-size: 16px; color: #fff; max-width:100px; margin: 10px auto; text-align: center; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||
.leftnav-box{ width: 80px; height: 60px; background:#292b3a; padding:10px 0; margin-bottom:2px;}
|
||||
a.leftnav-box-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; padding:10px 0; color:#575f6c;}
|
||||
a:hover.leftnav-box-inner,a.leftnav-active{border-left:3px solid #3498db;color: #fff!important;}
|
||||
a:hover.leftnav-box-inner .btn-cir{background:#fff;color:#333333}
|
||||
a.leftnav-box-reset-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; color:#575f6c;}
|
||||
a:hover.leftnav-box-reset-inner{border-left:3px solid #3498db;color: #fff!important;}
|
||||
|
||||
|
||||
|
||||
/*右侧头部*/
|
||||
.rightbar-header{width: 100%; background:#282c37; height:60px; min-width:1000px;}
|
||||
.rightbar-score{ margin-top: 17px; font-size: 14px; margin-right:20px;}
|
||||
.rightbar-score li{ float: left; color:#fff; margin-right: 20px;}
|
||||
.rightbar-score li a{ color:#fff;}
|
||||
a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top: 12px;}
|
||||
.rightbar-h2{ color:#fff; margin:12px 0 0 20px; font-weight: normal;}
|
||||
.rightbar{background:#f5f9fc; color:#333; position: relative;}
|
||||
/*右侧内容*/
|
||||
.content{ min-width:1000px; }
|
||||
.content-row{ padding:15px; }
|
||||
.content-info{ width:49.5%; min-width:250px;}
|
||||
.content-editor{ width:49.3%; min-width:250px; margin-left:15px; }
|
||||
.panel-header{ border-bottom:1px solid #eee; padding:10px 15px; color:#898989;}
|
||||
.panel-header-border{ border:1px solid #eee; padding:10px 15px; border-bottom:none; }
|
||||
/* tab */
|
||||
.tab_content{ width: 100%; margin: 0 auto; background:#fff; }
|
||||
#tab_nav {height:42px;background: #fff; border-bottom: 1px solid #EEEEEE}
|
||||
#tab_nav li {float:left; padding:0 30px;text-align:center;height: 40px;line-height: 40px; }
|
||||
#tab_nav li a{font-size:14px; }
|
||||
.tab_hover {border-bottom:2px solid #3498db; background: #fff;color: #3498db}
|
||||
/*.tab_hover_setting{background:#FC7033;}*/
|
||||
.tab_hover a{ color:#3498db!important;}
|
||||
/*.tab_hover_setting a{color:#fff;}*/
|
||||
.undis {display:none;}
|
||||
.dis {display:block;}
|
||||
.tab-info{ }
|
||||
.content-editor-inner{ overflow:auto;}
|
||||
.tab-info-inner{ overflow:auto; height:600px; margin:0 0 0px 15px;padding-top: 15px}
|
||||
.content-history-inner{height:120px; overflow:auto; padding:15px;}
|
||||
.content-history{width:48.7%; min-width:500px; }
|
||||
.history-success{ width: 100%; height:40px; line-height: 40px; background:#eef1f2; color:#666; }
|
||||
.history-fail{ width: 100%; height:40px; line-height: 40px; background:#fdebeb; color:#e53238; }
|
||||
.icon-fail{ display:inline-block; padding:0 8px; background:#e53238; color:#fff;}
|
||||
.icon-success{ display:inline-block; padding:0 8px; background:#252e38; color:#fff;}
|
||||
.info-partly{display: block;box-flex:1;flex:1;-webkit-flex:1;position: relative;}
|
||||
.content-output{width:37.5%; min-width:200px; }
|
||||
.content-submit{width:10%; min-width:135px; }
|
||||
.content-submitbox{ width:120px; margin: 15px auto; height:135px;}
|
||||
.panel-inner{ background:#EFF2F7; margin:15px; padding:15px;}
|
||||
.panel-inner-title{ font-size: 14px; color: #666; max-width:85%; line-height:30px;word-wrap: break-word; margin-bottom: 10px}
|
||||
.panel-footer{ min-width:1000px; height: 210px!important;}
|
||||
/* 弹框 */
|
||||
.task-popup-text-center{ text-align: center; color: #333;}
|
||||
.task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; }
|
||||
.task-popup-submit{ margin: 0 auto 15px; width: 120px;}
|
||||
/* TPM */
|
||||
.task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png");height: 180px;background-size: cover;display: flex;align-items: center;}
|
||||
.task-header-info{ width: 1200px; margin: 0 auto; color:#fff}
|
||||
.task-header-info h2 a,.task-header-info h2{ font-weight: normal;color:#fff;}
|
||||
a.task-header-name{ max-width:200px;}
|
||||
.task-header-title{ display: block; max-width:750px;word-wrap: break-word;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.task-header-nav{ width: 100%;min-width:1200px; height:50px;}
|
||||
.task-header-navs{ width: 1200px; margin: 0 auto;}
|
||||
|
||||
.task-header-navs li{ float: left;}
|
||||
.task-header-navs li{ display: block; height: 50px; padding:0 50px; color:#666; text-align: center; font-size: 16px; line-height: 50px;}
|
||||
.task-header-navs li:hover,.task-header-navs li:hover a{ color:#FC7033!important;}
|
||||
.task-header-navs li.active{border-bottom: 2px solid #FC7033;color:#FC7033;}
|
||||
.task-header-navs li.active a{color:#FC7033!important;}
|
||||
.task-header-navs li.active .edu-cir-grey,.task-header-navs li:hover .edu-cir-grey,.edu-cir-grey.active{background: #FF7500;color: #FFFFff}
|
||||
|
||||
.task-pm-content{ width: 1200px; margin: 0 auto; min-height:566px}
|
||||
.task-pm-box{ width: 100%; background: #fff; border: 1px solid #e8e8e8;}
|
||||
.task-paner-con{ padding:15px; color:#666; line-height:2.0;}
|
||||
.task-paner-con img{ max-width: 100%}
|
||||
.panel-form{margin:0 30px 0px 20px; padding:30px 0; }.panel-form li{ margin-bottom:20px; font-size: 14px; color:#666;}
|
||||
|
||||
|
||||
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; color: #666;}
|
||||
.panel-form-label1{ display:inline-block; width:20%; min-width:90px; text-align:right; line-height:40px; }
|
||||
.panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;line-height: 1.9;}
|
||||
.panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; }
|
||||
input.panel-form-width-690{ padding:5px;width:90%; height:40px; min-width:700px;}
|
||||
input.panel-form-width-200{ padding:5px; height:40px; width:200px;}
|
||||
input.panel-form-width-100{ padding:5px;width:100%; height:40px; min-width:700px;}
|
||||
textarea.panel-form-width-100{ padding:5px;width:100%; height:150px; min-width:700px;}
|
||||
textarea.panel-form-width-40{ padding:5px;width:100%; height: 40px; min-width:700px;}
|
||||
textarea.panel-form-width-690{ padding:5px;width:90%; height:150px; min-width:700px;}
|
||||
textarea.panel-form-width2-100{ padding:5px;width:100%; height:40px; min-width:700px;}
|
||||
textarea.panel-form-width2-690{ padding:5px;width:90%; height:40px; min-width:700px;}
|
||||
textarea.panel-form-width2-695{ padding:5px;width:95%; height:40px; min-width:700px;}
|
||||
.panel-form-width-670{ width: 670px; padding:5px;}
|
||||
.panel-form-height-150{ height: 150px;}
|
||||
.panel-form-height-30{height: 30px;}
|
||||
.task-bg-grey{ background:#f3f3f3!important; width:90%; min-width:700px; padding:10px; border:1px solid #f3f3f3;}
|
||||
.task-bg-grey-ligh{line-height: 1.9;padding:5px 10px;}
|
||||
.task-bg-grey li{ margin-bottom: 0}
|
||||
.task-bd-grey{width:680px; padding:10 0px;}
|
||||
.panel-form-width-690{ padding:5px;width:90%; min-height:40px; min-width:700px;}
|
||||
input.task-tag-input{ border:none; background: none; height:30px; padding:0 5px; color:#888; line-height: 30px;}
|
||||
textarea.task-textarea-pd{ padding-bottom: 0; padding-top:0;}
|
||||
.task-setting-tab{ min-height:600px;}
|
||||
.task-pd15-box{ padding:15px;}
|
||||
.mb20{margin-bottom: 20px;}
|
||||
input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f7;}
|
||||
/* TPi全屏展示css */
|
||||
.content-all-fix{ position: absolute; top:75px; left:15px; right:15px; z-index:99; height: 91%; width: 98.5%;}
|
||||
.content-all-fix .big-tab-info-inner{ display: block; height:50%; overflow:auto; margin:15px 0 0px 15px; }
|
||||
.content-half-fix{ min-width:450px; margin:0; position: absolute; top:75px; left:15px; z-index:99;}
|
||||
.content-half-fix .content-history-inner{height:100%; overflow:auto; }
|
||||
.content-half-fix02{margin:0; position: absolute; top:65px; z-index:99; right:45px;}
|
||||
.content-history-extend{ height: 98%;overflow:auto;}
|
||||
.task-bg-grey .prettyprint{font-size: 9pt;font-family: Courier New,Arial;border: 1px solid #ddd;border-left: 5px solid #6CE26C;background: #f6f6f6;padding: 5px;}
|
||||
/* 左右版TPI 20170410byLB */
|
||||
#game_task_pass img{cursor: pointer}
|
||||
.-fit { position: absolute; top: 0; right: 0; bottom: 0; left: 0;}
|
||||
.-layout-v { display: flex; flex-direction: column;box-flex-direction: column;-webkit-flex-direction: column;}
|
||||
.page--header { position: fixed;top: 0; left:80px; right: 0; z-index: 7000;background:#33485F; height:44px; padding:10px 0; color:#fff;}
|
||||
.page--leftnav{position: fixed;top:0; left:0; right: 0; z-index: 9001;width:80px; height:100%;background:#282c37;}
|
||||
.page--body { position: relative;}
|
||||
.-margin-t-64 { margin-top: 64px;}
|
||||
.-flex { box-flex:1;flex:1;-webkit-flex:1;}
|
||||
/*.-flex-auto{flex-basis:100%;}*/
|
||||
.split-panel.-fit {position: absolute;}
|
||||
.split-panel { position: relative; overflow: hidden; min-height: 200px; height: 100%;}
|
||||
.-stretch { align-items: stretch;}
|
||||
.-layout { display: flex;}
|
||||
.split-panel--first { overflow: hidden;}
|
||||
.-relative { position: relative;}
|
||||
.-bg-white { background-color: #eee;}
|
||||
.split-panel.-handle .split-panel--second { padding-left: 2px;}
|
||||
/* .split-panel--second { overflow: hidden;} */
|
||||
.task-answer-view { position: absolute; top: 0; right: 0; bottom: 0;left: 0; display: flex;
|
||||
flex-direction: column; border-top: 1px solid #515151;}
|
||||
.-vertical { flex-direction: column;box-flex-direction: column;-webkit-flex-direction: column;}
|
||||
.-layout-h { display: flex;flex-direction: row;box-flex-direction: row;-webkit-flex-direction: row;}
|
||||
.-horizontal {flex-direction: row-reverse;box-flex-direction: row-reverse;-webkit-flex-direction: row-reverse;}
|
||||
.-scroll{ overflow:auto;}
|
||||
.-flex-basic0{flex-basis: 0%!important;box-flex-basis: 0%!important;-webkit-flex-basis: 0%!important; display: none}
|
||||
/*王昌------------拖拽增加样式---------------修改*/
|
||||
.-flex-basic40{width:40%;box-flex:auto;flex:auto;-webkit-flex:auto;}
|
||||
.-flex-basic50{width:60%;box-flex:auto;flex:auto;-webkit-flex:auto;}
|
||||
.b-label{width:4px;cursor:ew-resize;background:#2b2b2b;}
|
||||
.h-center{height:4px;cursor:ns-resize;background:#333;}
|
||||
.-changebg{height:3px;}
|
||||
.-brother{width:100%;height:100%;position:absolute;left:0;top:0;z-index:999;}
|
||||
.-bg-weightblack{background:#000;}
|
||||
.-flex-basic70{box-flex:4 9 auto;flex:4 9 auto;-webkit-flex:4 9 auto;height:70%;}
|
||||
/*---------------------------------------------*/
|
||||
.-flex-basic60{box-flex:2 1 auto;flex:2 1 auto;-webkit-flex:2 1 auto;height:30%;}
|
||||
.-flex-basic100{flex-basis: 100%!important;box-flex-basis: 100%!important;-webkit-flex-basis: 100%!important;}
|
||||
.-header-title{ max-width:500px; font-weight: normal;}
|
||||
.-header-right{ background:#333;border-radius:25px; padding:5px 15px; height: 30px; position: absolute; right:10px;line-height: 30px;}
|
||||
.-header-right-info{ padding:10px; background:#fff; border-radius:3px; top:50px; right:10px; position: relative;display:none;color:#666;}
|
||||
.-header-right-info font { border: 1px solid #dddddd; display: block;border-width: 8px; position: absolute; top: -15px;right:20px;border-style: solid; border-color: transparent transparent #fff transparent; font-size: 0; line-height: 0;}
|
||||
.-header-right-box:hover .-header-right-info{ display: block;}
|
||||
.-task-bar-bg{ width: 160px; height:15px; border-radius:15px; background:#ff9932; color:#fff; font-size: 12px; line-height: 15px; text-align: right; position: relative; padding-right:10px;}
|
||||
.-task-bar-inner{background:#ffc100; display: block; height: 15px;border-radius:15px; position: absolute; top:0; left:0;}
|
||||
.-task-widht-10{ width: 10%;}
|
||||
.-task-widht-20{ width: 20%;}
|
||||
.-task-widht-30{ width: 30%;}
|
||||
.-task-widht-40{ width: 40%;}
|
||||
.-task-widht-50{ width: 50%;}
|
||||
.-task-widht-60{ width: 60%;}
|
||||
.-task-widht-70{ width: 70%;}
|
||||
.-task-widht-80{ width: 80%;}
|
||||
.-task-widht-90{ width: 90%;}
|
||||
.-task-widht-100{ width: 100%;}
|
||||
.-footer-left{min-height:48px;background:#f5f5f5;}
|
||||
.-footer-left ul {width: 100%}
|
||||
.-footer-left ul li{ cursor: pointer; color:#666;}
|
||||
.-footer-left ul li:hover{ color:#888;}
|
||||
.-bg-black{ background:#2b2b2b; color:#f4f1ed;}
|
||||
.-bg-darkblack{background:#1D1D1D; color: #fff;}
|
||||
.task-answer-view{ border-top:1px solid #515151; background:#333;}
|
||||
#blacktab_nav {height:40px;background:#292929; }
|
||||
#blacktab_nav li {float:left; padding:0px 50px;text-align:center;height: 40px;line-height: 40px; }
|
||||
#blacktab_nav .add-webssh{position:relative;}
|
||||
#blacktab_nav .add-webssh span{position:absolute;top:0;right:5px;color:#fff;cursor:pointer;}
|
||||
#blacktab_nav li a{font-size:14px; }
|
||||
#blacktab_nav li.code-file-tab{padding: 0px;width: 120px;box-sizing: border-box;padding: 0px 15px;}
|
||||
.code-flie-list{display:none;position: absolute;z-index: 5;top:40px;background: #515151;width: 300px;left: 0px;color: #fff;}
|
||||
.blue-line{border-left: 3px solid #199ED8!important;padding-left: 5px;}
|
||||
.codefile-all{max-height: 122px;overflow-y: auto;overflow-x: hidden;}
|
||||
.codefile-all p{text-align: left;cursor: pointer;height: 22px;line-height: 22px;margin-bottom: 3px;padding-left: 5px;border-left: 3px solid #515151;width: 273px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
|
||||
.codefile-all p:hover{background: #CCCCCC;color: #333;}
|
||||
|
||||
.blacktab_hover { background: #333;}
|
||||
.blacktab_hover a{ color:#fff; }
|
||||
.-task-ces-top{ padding:5px 15px; background:#515151; color:#bfbfbf;}
|
||||
.-task-ces-info-left{ display: inline-block; width:100px; text-align: right; }
|
||||
.-position-a-r15{ position: absolute; top:5px; right:15px;}
|
||||
.-task-ml80{ margin-left: 80px;}
|
||||
.page--over { position: fixed;top: 0; left:80px; right: 0; z-index:8000; height:100%; color:#fff;}
|
||||
.-task-list-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989; font-size: 14px; font-weight: normal;}
|
||||
.-task-list-header h3{ font-weight: normal; font-size:16px; color:#333;}
|
||||
.-task-list-inner{ background:#EFF2F7; margin:10px; padding:5px;}
|
||||
.-task-list-title{ font-size: 14px; color: #666;word-wrap: break-word; font-weight: normal; max-width: 80%;}
|
||||
.greytab-inner{ background:#fff; }
|
||||
.blacktab-inner{ background:#333;}
|
||||
.task-padding16{ padding:16px;}
|
||||
.task-padding10{ padding:10px;}
|
||||
.task-padding-new{ padding-top: 16px}
|
||||
/* TPM统计 20170321byLB */
|
||||
.panel-warp-3{ width: 30%; background:#23b181; color:#fff; margin:2.5%; margin-right:0; position: relative; }
|
||||
.panel-warp-3-over{ background:#fff;opacity:0.8; color:#29bd8b; width: 100%; height:135px; position: absolute; top:0; left:0; text-align: center; padding-top:130px;}
|
||||
.panel-warp-3-over a{color:#29bd8b; font-size: 18px; text-align:center; font-weight: bold;}
|
||||
.panel-warp-img{width: 30px; height: 30px; border-radius:100px;}
|
||||
.panel-warp-name{ display:block; max-width:100px;}
|
||||
.panel-warp-inner{ padding:15px;}
|
||||
.panel-warp-dbg{ background:#29bd8b; padding:15px; height:120px;}
|
||||
.panel-warp-dbg li{ margin-bottom:15px; }
|
||||
.panel-warp-dbg li:last-child{ margin-bottom:0;}
|
||||
.fa-icons-trophy{ position:relative; padding-top:10px;}
|
||||
.fa-icons-trophy span{ position:absolute; top:12px; right:10px; color:#f04b27; font-size:14px; font-weight: bold;}
|
||||
.fa-icons-flower{ display: inline-block; width: 14px; height: 14px; background:url("../images/task/icons-flower.png") 0 0 no-repeat;}
|
||||
.fa-icons-flower:hover{display:inline-block; width: 14px; height: 14px;background:url("../images/task/icons-flower.png") -18px 0 no-repeat;}
|
||||
/* 实训首页 20170330byLB */
|
||||
.task-index{ width: 1200px; margin:0 auto;}
|
||||
.task-index-head{ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); }
|
||||
/*.task-index-head-top{background-image: linear-gradient(to right, rgb(106, 177, 216) 0%, rgb(1, 74, 78) 100%);background-color: rgb(1, 70, 74); padding:30px;}*/
|
||||
|
||||
/*background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);*/
|
||||
/*background: linear-gradient(to right,#5DDAE4,#23ADC9);*/
|
||||
.task-index-head-top{ padding:30px;background:#FCA24B;background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);}
|
||||
|
||||
/*.task-index-head-top{ padding:30px;background:#FFA65E;}*/
|
||||
.top-xz{position: absolute;border:14px solid #FFFFFF;border-radius: 50%;box-shadow: 0px 2px 10px rgba(142,142,142,0.6);
|
||||
opacity: 0.4;}
|
||||
|
||||
.task-index-head-top-course{padding:30px;background:linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);}
|
||||
/*linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);*/
|
||||
.task-inde-head-title{ color:#fff; }
|
||||
.task-index-head-info{ background:#fff; padding:10px 30px;}
|
||||
.task-index-head-info li{ width:100px; float: left; text-align: center; color:#666;}
|
||||
|
||||
.task-index-list{ width: 1200px;}
|
||||
|
||||
|
||||
.task-index-list-box{box-sizing:border-box; width:23.87%;margin: 0 1.5% 30px 0px; border-radius:2px;border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
|
||||
.task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; }
|
||||
.task-index-list-box:hover .black-half{display: block;}
|
||||
.task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;}
|
||||
.task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
|
||||
.task-index-list-box-top{padding:16px; padding-top:30px; background:#fff; text-align: center; position:relative; height: 160px;}
|
||||
.task-index-list-title{ max-width:80%; display: block; margin:10px auto 0px; font-size:14px; font-weight: bold;}
|
||||
.task-index-list-user{padding:5px 10px; border-radius:25px;background: #F5F6F7; margin:0px auto 20px; display: inline-block;}
|
||||
.task-index-list-box-bottom{ background: #F5F6F7; color:#666; padding:10px 10%; text-align: center;}
|
||||
.task-index-list-box-bottom li{ display: inline; margin: 0 5px;}
|
||||
.task-index-list-box-bottom2{ background: #fff; color:#666; padding:10px 10%; text-align: center;}
|
||||
.task-index-list-box-bottom2 li{ display: inline; margin: 0 5px;}
|
||||
.task-vip{ position: absolute; right:15px; top:15px;}
|
||||
@-webkit-keyframes bounce-down {
|
||||
25% {-webkit-transform: translateY(-10px);}
|
||||
50%, 100% {-webkit-transform: translateY(0);}
|
||||
}
|
||||
|
||||
@keyframes bounce-down {
|
||||
25% {transform: translateY(-10px);}
|
||||
50%, 100% {transform: translateY(0);}
|
||||
}
|
||||
.task-index-list-hover{ position:absolute; top:0; left:0; color:#fff; width: 100%; height: 100%; border-radius:2px 2px 0 0; }
|
||||
.task-index-list-hover p{ margin:15px;overflow:hidden; text-align: left; height: 85%;}
|
||||
.task-index-list-hover{ display: none; }
|
||||
.task-mg8:hover .task-index-list-hover{display: block;}
|
||||
.task-mg8:hover{ box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;}
|
||||
.task-dropdown{}
|
||||
.task-dropdown-menu{ min-width: 100px; border: 1px solid rgba(0,0,0,.05);box-shadow: 0 6px 12px rgba(0,0,0,.15);}
|
||||
.task-dropdown-menu li a{ color:#666; }
|
||||
/* 伸展型搜索 20170330byLB */
|
||||
.search-wrapper {position: absolute; font-size:14px; }
|
||||
.search-wrapper .input-holder { overflow: hidden; height: 30px; position: relative; width:32px;background: none;}
|
||||
.search-wrapper.active .input-holder { width:320px; border:none; border-bottom:2px solid #ccc; }
|
||||
.search-wrapper .input-holder .search-input { width:100%; height: 30px; font-size:14px; position: absolute; top:0px; left:0; border:none; opacity: 0; }
|
||||
.search-wrapper.active .input-holder .search-input { opacity: 1; outline:none; background: none;}
|
||||
.search-wrapper .search-icon { width:20px; height:20px; border:none; padding:0px; outline:none; position: relative; z-index: 2; float:right; cursor: pointer; background: none; color: #666; top:2px;}
|
||||
.search-wrapper .close { position: absolute; z-index: 1; top:2px; right:20px; width:25px; height:25px; cursor: pointer; opacity: 0;color: #666;}
|
||||
.search-wrapper.active .close {right:-35px; opacity: 1;}
|
||||
a.sortArrowActiveD {background:url(../images/post_image_list.png) -0px -20px no-repeat; width:7px; height:9px; float:left; margin-top: 10px;margin-left: 5px;}
|
||||
a.sortArrowActiveU {background:url(../images/post_image_list.png) -17px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:10px;}
|
||||
.postSort {width:75px; float:right}
|
||||
.shixunPostSort {width:60px; float:right}
|
||||
.remove_li li{ list-style-type: none!important;}
|
||||
|
||||
a.shixun-task-btn { display: inline-block;font-weight: bold;border: none;padding: 0 12px;color: #666;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; }
|
||||
a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weight: bold;border: none;padding: 0 12px;color: #666;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; cursor: default;}
|
||||
.shixun-panel-list > div:nth-child(odd){ background:#f9f9f9; }
|
||||
.shixun-panel-list > div:nth-child(even){ background:#fff; }
|
||||
.shixun-panel-list {background: #fff; margin: 0 1px;}
|
||||
.shixun-panel-inner { background: #EFF2F7; padding: 15px; height: 70px;}
|
||||
.challange_operate{display: none}
|
||||
.shixun-panel-inner:hover .challange_operate{display: block}
|
||||
.shixun_title {color: #333;font-size: 16px;}
|
||||
.g_frame{border: 1px solid #29bd8b;color: #29bd8b;padding:0 5px;border-radius: 3px;text-align:center;}
|
||||
.loading-center{text-align: center; align-items: center;justify-content: center;}
|
||||
.center{vertical-align: middle;text-align: center; }
|
||||
.itoblock_w150{ display: block; float:left; width:150px }
|
||||
.itoblock_w75{ display: block; float:left; width:75px }
|
||||
|
||||
/*实训--技能勋章*/
|
||||
.modal-list li{float: left;padding: 0px 15px;background:#ff7500;color: #ffffff;border-radius: 4px;margin-right: 10px}
|
||||
.modal-list li:before{content: '●';color: #FFFFFF;margin-right: 5px;font-size: 14px}
|
||||
.modal-list span{width: 8px;height: 8px;border-radius: 50%;background: #ffffff;display: block;float: left;margin-right: 5px;margin-top:10px;}
|
||||
|
||||
/* 合作者 20170516byLB */
|
||||
.task-partner-list{ padding:15px; border-bottom:1px solid #eee;}
|
||||
.task-width33{ width:33.3%;}
|
||||
|
||||
.read_only{ -moz-user-select: none; -webkit-user-select: none; }
|
||||
|
||||
.task-form-28{width: 28%;padding:0px 10px}
|
||||
|
||||
|
||||
/* 实训首页的搜索 */
|
||||
.xy_box{padding:16px;height:180px}
|
||||
.task_yx_bo{margin: 0px auto 13px;}
|
||||
.course-nav-box{padding:0px 10px;margin:30px 0px}
|
||||
.xy_level{width: 80%;margin: 0px auto;border-top: 1px solid #eee;margin-top: 5px;line-height: 35px;}
|
||||
.course-nav-row{padding:7px 0px}
|
||||
.course-nav-row_item li{width:auto;height: 30px;line-height: 30px;margin: 5px;padding:0px 15px;}
|
||||
.course-nav-row_item label{cursor: pointer;}
|
||||
.check_item{height:40px;line-height: 40px;padding: 0px 15px;}
|
||||
.more_check{position: absolute;bottom: 5px;right: 10px;cursor: pointer;}
|
||||
|
||||
|
||||
.bottomdashed1{border-bottom: 1px dashed #eeeeee;}
|
||||
|
||||
/*更多和收起*/
|
||||
.two_line_lesson{height: 80px;overflow: hidden;}
|
||||
.more_line_lesson{max-height: 200px;display: block;}
|
||||
.scroll_lesson{overflow-x: hidden;overflow-y: scroll;}
|
||||
|
||||
.searchFor{width:auto;}
|
||||
.searchFor .searchCon{width:250px;border-bottom:1px solid #cccccc;float: left;height: 30px;}
|
||||
.searchFor .searchCon input{border: none;outline: none;height: 29px;width:91%;}
|
||||
.searchFor .searchImg{margin:5px 10px 0px 0px;cursor: pointer;}
|
||||
.searchFor .search_close{font-size: 18px;float: right;color: #666;height: 29px;line-height: 29px;cursor: pointer;}
|
||||
|
||||
.tab_color{color: #bfbfbf!important;}
|
||||
|
||||
/*_game_show.html.erb页面新增的一个tab*/
|
||||
.comments_item_content img{border-radius: 50%;margin-right: 5px}
|
||||
.comment_item_one{flex: 1;}
|
||||
.comment_item_bottom{border-bottom: 1px solid #efefef;display: flex}
|
||||
.comment_item_top{border-top: 1px solid #efefef}
|
||||
.comment_item_left_green{border-left: 3px solid #29bd8b}
|
||||
.return_item{height: 20px;line-height: 20px;margin-top: 5px;}
|
||||
.comment-input{width: 100%;margin: 10px;margin-right: 17px;}
|
||||
.comment-input textarea{border: none !important;width:100%; outline: none;height: 30px;border-radius: 4px;padding-left: 5px;float:left}
|
||||
.comment_position{ position: absolute;bottom: 8px;right: 20px}
|
||||
|
||||
/*-------新建阶段添加选项部分----------*/
|
||||
.option-item{border:1px solid #e2e2e2;}
|
||||
.option-item,.add-option-item{display: block;width: 38px;height: 38px;text-align: center;line-height: 38px;border-radius: 4px}
|
||||
.check-option-bg{background: #FF7500;color: #ffffff!important;border: 1px solid #FF7500}
|
||||
.add-option-input{padding: 5px;width: 90%;height: 40px;min-width: 700px;}
|
||||
.add-option-input a{display: block;width: 100%;height: 100%;cursor: pointer}
|
||||
.position-delete{position: absolute;right: -22px;top: 12px;cursor: pointer}
|
||||
|
||||
/*--------TPI的答案选项卡------*/
|
||||
.quiz-task-options:not(.-compact) {padding:10px;}
|
||||
.card {position: relative;border-radius: 2px;overflow: hidden;}
|
||||
/*.card:hover{background: #3f3f3f;}*/
|
||||
.card-check{background: #3498db!important;}
|
||||
.-justify {justify-content: space-between;}
|
||||
.-center { align-items: center;min-height: 66px;}
|
||||
.markdown {letter-spacing: 0;line-height: 1.6;word-wrap: break-word;word-break: break-word;}
|
||||
.markdown code {padding:0;line-height: 23px;margin: 0;font-family: "微软雅黑","宋体";}
|
||||
|
||||
|
||||
/*模拟实战---加载等待*/
|
||||
.loading_all{background:#ffffff;z-index: 100000;width: 100%;height: 100%;position: fixed;left: 0px;top:0px;text-align: center;}
|
||||
.loading_main img{border-radius: 4px;}
|
||||
.loading_main span{font-size: 44px;font-weight: bold;color: #ff7500;letter-spacing: 5px;margin-left: 5px;}
|
||||
.load{width: auto;top:50%;margin-top:-100px;position: relative;}
|
||||
.loading_seconde{color: #ff7500;letter-spacing: 3px;font-size: 16px;}
|
||||
#ajax-indicator-base {
|
||||
position: absolute; /* fixed not supported by IE*//*
|
||||
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -20px;
|
||||
margin-top: -40px;
|
||||
width: 20%;
|
||||
height: 5%; */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
/*padding:0.6em;*/
|
||||
z-index:9999;
|
||||
background: rgba(225,225,225,0);
|
||||
}
|
||||
html>body #ajax-indicator-base { position: fixed; }
|
||||
|
||||
#ajax-indicator-base embed{
|
||||
position: relative;
|
||||
top: 40%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-left: -40px;
|
||||
left: 50%;
|
||||
}
|
||||
/*#ajax-indicator-base span{
|
||||
color:#fff;
|
||||
background-position: 0% 40%;
|
||||
background-repeat: no-repeat;
|
||||
*//*background-image: url(/images/loading.gif);*//*
|
||||
padding-left: 26px;
|
||||
vertical-align: bottom;
|
||||
z-index:999;
|
||||
}*/
|
||||
|
||||
.save-tip{display:none;position: fixed;top:0px;left: 0px;width: 100%;height: 100%;}
|
||||
.save-tip-content{position: absolute;top:50%;left: 50%;margin-left: -36px;margin-top:-19px;background: rgba(0,0,0,0.7);color:#fff;padding:5px 15px;border-radius: 4px}
|
||||
.empty{background: #494A4C;display: inline; margin: 0 2px; padding: 0 3px;}
|
||||
.tab-key{background: #494A4C;display: inline; margin: 0 2px; padding: 0 6px;}
|
||||
|
||||
/*二次回复的提示语的样式*/
|
||||
.points-data-tip-top{position:absolute;left:100px;top:-30px;opacity:.7;width:150px;height:30px;z-index:9999;display:none;}
|
||||
.data-tip-top1{position:relative;box-shadow:0px 0px 8px #000;background:#000;color:#fff;word-wrap: break-word;
|
||||
text-align:center;border-radius:4px;padding:0 10px;border:1px solid #000;}
|
||||
.data-tip-top1:after,.data-tip-top1:before{position: absolute;content:'';width:0;height:0;left: 45%;bottom:-10px;border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;border-top: 10px solid #000;}
|
||||
.data-tip-top1:before{bottom:-11px;}
|
||||
/*选择题tab切换*/
|
||||
.nav_option li{overflow: hidden;width: 110px; text-align: center;cursor: pointer;height: 38px;line-height: 38px;border-top-right-radius: 5px;border-top-left-radius: 5px;border:1px solid #e2e2e2;border-bottom: 0px;color: #FF7500;border-right: none;}
|
||||
.nav_option li:last-child{border-right: 1px solid #e2e2e2;}
|
||||
.nav_option li a{width: 100%;height: 100%;display: block;}
|
||||
|
||||
/*---------------------试卷----------------------*/
|
||||
.question_item_con{font-weight: normal!important;border:1px solid #EEEEEE!important;color: #333!important;background: #FFFFff!important;position: relative}
|
||||
.exam_operator{cursor: pointer;position: absolute;right: 15px;top: 11px;}
|
||||
.question_item_con .write_answer{border-top:1px solid #EEEEEE;background:#EFF9FD;padding: 10px 15px;text-align:justify;}
|
||||
.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #ff7500;border-radius: 3px;margin-left: 15px;cursor: pointer;color: #ff7500!important;}
|
||||
.add_item_part:hover{color:#fff!important;background-color: #ff7500}
|
||||
|
||||
/*作业问答*/
|
||||
.work_search_ul{border: 1px solid #EEEEEE;border-radius: 4px;}
|
||||
.work_search_ul li span{display:block;float: left;height: 38px;line-height: 38px}
|
||||
.work_search_ul li{border-bottom: 1px dashed #EEEEEE;}
|
||||
.work_search_ul li:last-child{border-bottom: none}
|
||||
.work_search_ul .magic-radio + label,.work_search_ul .magic-checkbox + label{top:5px}
|
||||
|
||||
/*更新提示*/
|
||||
.update_back_main{display: none;position: fixed;left: 0px;top:0px;background: rgba(0,0,0,0.3);width: 100%;z-index: 7001;height: 100%;}
|
||||
.tip-panel-animate-left{position: absolute;z-index: 9000;left: 80px;top:290px;background: #FFFFff;width: 430px;height: 140px;border-radius: 3px;}
|
||||
.tip-panel-animate{position: absolute;z-index: 10001;right: 4px;top:40px;background: #FFFFff;width: 430px;height: 140px;border-radius: 3px;display: none}
|
||||
.tip-panel-animate .tip-img,.tip-panel-animate-left .tip-img{width: 130px;text-align: center;background-color: #E8E9ED;height: 100%;}
|
||||
.tip-panel-animate .tip-img img,.tip-panel-animate-left .tip-img img{width: 70px;height: 70px;margin: 35px 30px;}
|
||||
.tip-right-con{width: 69.7%;height: 100%;}
|
||||
.tip-operator-btn{width:100%;border-top: 1px solid #eee;height: 40px;position: absolute;right: 0px;bottom: 0px;text-align: center;}
|
||||
.tip-operator-btn a,.tip-operator-btn span{height: 100%;text-align: center;line-height: 40px;width: 50%}
|
||||
.tip-operator-btn a:hover,.tip-operator-btn span:hover{background-color:#f9f9f9}
|
||||
.tip-operator-btn a:first-child,.tip-operator-btn span:first-child{border-right: 1px solid #eee;width: 49.5%}
|
||||
.animate-tip{animation:rightToleft 1s;}
|
||||
.animate-tip-hide{animation:leftToright 1s;}
|
||||
@keyframes rightToleft
|
||||
{
|
||||
from {right: -400px;}
|
||||
to {right: 4px;}
|
||||
}
|
||||
@keyframes leftToright
|
||||
{
|
||||
from {right: 4px;}
|
||||
to {right: -420px;}
|
||||
}
|
||||
.animate-tip-l{animation:rightToleft-l 1s;}
|
||||
.animate-tip-hide-l{animation:leftToright-l 1s;}
|
||||
@keyframes rightToleft-l
|
||||
{
|
||||
from {left: -400px;}
|
||||
to {left: 80px;}
|
||||
}
|
||||
@keyframes leftToright-l
|
||||
{
|
||||
from {left: 80px;}
|
||||
to {left: -420px;}
|
||||
}
|
||||
|
||||
|
||||
/*----------实训TPI图片查看效果--------------*/
|
||||
.photo_display{box-sizing: border-box;width: 100%;position: fixed;top: 0px;left: 0px;padding-top: 64px;padding-left: 80px;background: rgba(0,0,0,0);height: 100%;z-index: 100}
|
||||
.photo_display .task-popup{width: 100%!important;height: 100%!important;}
|
||||
#picture-content img{max-width: 100%;height: 400px;display: block; margin:0px auto;margin-bottom: 20px;}
|
||||
#box-img{width:100%;height:100%;display:table;text-align:center;background:#fff;}
|
||||
#box-img span{display:table-cell;vertical-align:middle;}
|
||||
|
||||
/*-------------学员统计 通关排行榜------------*/
|
||||
.rankings_num{position: absolute;width: 100%;top: 3px;height: 15px;line-height: 15px;left: 0px;font-size: 12px;color: #F24B27;text-align: center}
|
||||
|
||||
.census_main{width: 1086px;overflow: hidden;position: relative;min-height: 350px;margin:0px 45px;}
|
||||
.census_main ul{position: absolute;min-width: 1086px;}
|
||||
.census_main ul>li{float:left;width: 260px;margin:6px 6px;min-height: 335px}
|
||||
.census_main ul>li:nth-child(4n){margin-right: 0px;}
|
||||
.part_main{border-radius: 5px;background: #FFFFff;border:1px solid #EEEEEE}
|
||||
.part_main .part_top{background: #FF9E6A;color: #FFFFff;padding: 10px 15px;border-radius: 5px 5px 0px 0px;}
|
||||
.wipe{display: none;cursor: pointer;line-height: 332px;color:#FFFFff!important;font-size:16px ;width: 100%;position: absolute;left: 0px;top:0px;background:rgba(0,0,0,0.3);height: 100%;z-index: 3;text-align: center;border-radius: 5px; }
|
||||
.part_main:hover .wipe{display: block;}
|
||||
|
||||
|
||||
#census_left,#census_right{display: none;position: absolute;cursor: pointer;background: #FCF2EC;padding: 10px 5px;width: 35px;box-sizing: border-box;top:122.5px;text-align: center}
|
||||
#census_left i,#census_right i{color:#FBBD81;}
|
||||
|
||||
|
||||
/*-----------实训配置、评测脚本-------------*/
|
||||
.edit_script_text .test_script_text{word-break: break-all;background-color: #f7f7f7;}
|
||||
.edit_script_text .CodeMirror-lines{padding: 0px!important;padding-bottom: 4px}
|
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
After Width: | Height: | Size: 154 KiB |
|
@ -0,0 +1,213 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
|
||||
<!-- <meta name="viewport" content=""> -->
|
||||
<meta name=”Keywords” Content=”EduCoder,信息技术实践教学,精品课程网,慕课MOOC″>
|
||||
<meta name=”Keywords” Content=”实践课程,项目实战,java实训,python实战,人工智能技术,后端开发学习,移动开发入门″>
|
||||
<meta name=”Keywords” Content=”翻转课堂,高效课堂创建,教学模式″>
|
||||
<meta name=”Keywords” Content=”实训项目,python教程,C语言入门,java书,php后端开发,app前端开发,数据库技术″>
|
||||
<meta name=”Keywords” Content=”在线竞赛,计算机应用大赛,编程大赛,大学生计算机设计大赛,全国高校绿色计算机大赛″>
|
||||
<meta name=”Description” Content=”EduCoder是信息技术类实践教学平台。EduCoder涵盖了计算机、大数据、云计算、人工智能、软件工程、物联网等专业课程。超10000个实训案例及22000个技能评测点,建立学、练、评、测一体化实验环境。”>
|
||||
<meta name=”Description” Content=”EduCoder实践课程,旨在于通过企业级实战实训案例,帮助众多程序员提升各项业务能力。解决学生、学员、企业员工等程序设计能力、算法设计能力、问题求解能力、应用开发能力、系统运维能力等。”>
|
||||
<meta name=”Description” Content=”EduCoder翻转课堂教学模式,颠覆了传统教学模式,让教师与学生的关系由“权威”变成了“伙伴”。将学习的主动权转交给学生,使学生可个性化化学,学生的学习主体得到了彰显。”>
|
||||
<meta name=”Description” Content=”EduCoder实训项目为单个知识点关卡实践训练,帮助学生巩固单一弱点,强化学习。 ”>
|
||||
<meta name=”Description” Content=”EduCoder实践教学平台,各类大赛为进一步提高各类学生综合运用高级语言程序设计能力,培养创新意识和实践探索精神,发掘优秀软件人才。 ”>
|
||||
<!-- <meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3, user-scalable=no">-->
|
||||
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3">
|
||||
|
||||
<meta name="theme-color" content="#000000">
|
||||
<!--<meta http-equiv="cache-control" content="no-cache,no-store, must-revalidate" />-->
|
||||
<!--<meta http-equiv="pragma" content="no-cache" />-->
|
||||
<!--<meta http-equiv="Expires" content="0" />-->
|
||||
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||
|
||||
<!-- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">-->
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<!-- <title>EduCoder</title>-->
|
||||
<!--react-ssr-head-->
|
||||
<script type="text/javascript">
|
||||
|
||||
window.__isR = true;
|
||||
// 不支持ie9 ie10
|
||||
if (
|
||||
( navigator.userAgent.indexOf('MSIE 9') != -1
|
||||
|| navigator.userAgent.indexOf('MSIE 10') != -1 )
|
||||
&&
|
||||
location.pathname.indexOf("/compatibility") == -1) {
|
||||
debugger;
|
||||
// location.href = './compatibility'
|
||||
location.href = '/compatibility.html'
|
||||
}
|
||||
// const isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
|
||||
const isWeiXin = (/MicroMessenger/i.test(navigator.userAgent.toLowerCase()));
|
||||
if (isWeiXin) {
|
||||
document.write('<script type="text/javascript" src="/javascripts/wx/jweixin-1.3.0.js"><\/script>');
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="/css/edu-common.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/edu-public.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/taskstyle.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/font-awesome.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/editormd.min.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/merge.css"> -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">
|
||||
|
||||
<!--<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">-->
|
||||
|
||||
<!--<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_653600_nm6lho7nxxq.css">-->
|
||||
|
||||
<!-- <link href="/react/build/css/iconfont.css" rel="stylesheet" type="text/css"> -->
|
||||
|
||||
<!--<link href="http://47.96.87.25:48080/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">-->
|
||||
|
||||
<!--<link href="https://pandao.github.io/editor.md/examples/css/style.css" rel="stylesheet" type="text/css">-->
|
||||
|
||||
<!--<link href="https://pandao.github.io/editor.md/css/editormd.preview.css" rel="stylesheet" type="text/css">-->
|
||||
<!-- <link href="https://testeduplus2.educoder.net/stylesheets/css/edu-common.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/edu-main.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/antd.min.css" rel="stylesheet" type="text/css"> -->
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="https://www.educoder.net/stylesheets/css/font-awesome.css?1510652321"> -->
|
||||
|
||||
<!--<link rel="stylesheet" type="text/css" href="http://47.96.87.25:48080/stylesheets/educoder/iconfont/iconfont.css">-->
|
||||
|
||||
<!--需要去build js配置-->
|
||||
<link rel="stylesheet" type="text/css" href="/css/iconfont.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css">
|
||||
<style>
|
||||
/*<!--去除浏览器点击操作后有蓝色的底块-->*/
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<!--用于markdown转html -->
|
||||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit widthunit">
|
||||
<!--<div class="d2-home">-->
|
||||
<!--<div class="d2-home__main">-->
|
||||
<!--<!–<img class="d2-home__loading"–>-->
|
||||
<!--<!–src="loading-spin.svg"–>-->
|
||||
<!--<!–alt="loading">–>-->
|
||||
<!--<div class="lds-ripple"><div></div><div></div></div>-->
|
||||
<!--<div class="d2-home__title">-->
|
||||
<!--正在加载资源-->
|
||||
<!--</div>-->
|
||||
<!--<div class="d2-home__sub-title">-->
|
||||
<!--加载资源可能需要较多时间 请耐心等待-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="d2-home__footer">-->
|
||||
<!--<!–<a href="www.educoder.net"–>-->
|
||||
<!--<!–target="_blank">–>-->
|
||||
<!--<!––>-->
|
||||
<!--<!–</a>–>-->
|
||||
<!--EduCoder-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<!-- js css合并 文件优先级的问题 -->
|
||||
<script type="text/javascript" src="/js/js_min_all.js"></script>
|
||||
<!-- <script type="text/javascript" src="/js/js_min_all_2.js"></script> -->
|
||||
|
||||
<!--
|
||||
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/underscore.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/marked.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/prettify.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/raphael.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/sequence-diagram.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/flowchart.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/jquery.flowchart.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/editormd.min.js"></script>
|
||||
-->
|
||||
<!-- codemirror addon -->
|
||||
<!--
|
||||
<script type="text/javascript" src="/js/codemirror/codemirror.js"></script>
|
||||
<script type="text/javascript" src="/js/codemirror/mode/javascript.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/diff_match_patch.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/merge.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/edu_tpi.js"></script>
|
||||
-->
|
||||
<!-- testbdweb.trustie.net testbdweb.educoder.net -->
|
||||
|
||||
<!-- 在tpi js里加载这3个脚本 -->
|
||||
<script>
|
||||
(function() { // Scoping function to avoid globals
|
||||
var href = location.href;
|
||||
if(window.location.port === "3007"){
|
||||
if (href.indexOf('/tasks/') != -1) {
|
||||
document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>');
|
||||
// build.js中会将这个url附加一个前缀 react/build
|
||||
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>');
|
||||
document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
|
||||
} else if (href.indexOf('/paths/') != -1) {
|
||||
document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>');
|
||||
|
||||
}
|
||||
}else{
|
||||
if (href.indexOf('/tasks/') != -1) {
|
||||
document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>');
|
||||
// build.js中会将这个url附加一个前缀 react/build
|
||||
document.write('<script type="text/javascript" src="/js/create_kindeditor.js"><\/script>');
|
||||
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
|
||||
} else if (href.indexOf('/paths/') != -1) {
|
||||
document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
</script>
|
||||
<!-- <script type="text/javascript" src="https://testeduplus2.educoder.net/assets/kindeditor/kindeditor.js"></script>
|
||||
<script type="text/javascript" src="/js/create_kindeditor.js"></script>
|
||||
<script type="text/javascript" src="https://testeduplus2.educoder.net/javascripts/educoder/edu_application.js"></script> -->
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script>
|
||||
|
||||
<!-- <script>-->
|
||||
<!-- document.body.addEventListener('touchmove', function (e) {-->
|
||||
<!-- e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)-->
|
||||
<!-- }, {passive: false});-->
|
||||
<!-- </script>-->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is added to the
|
||||
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||
<!-- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">-->
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<!-- <title>Educoder</title>-->
|
||||
<!--react-ssr-head-->
|
||||
<script type="text/javascript">
|
||||
window.__isR = true;
|
||||
</script>
|
||||
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="/css/edu-common.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/edu-public.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/taskstyle.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/font-awesome.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/editormd.min.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/merge.css"> -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">
|
||||
|
||||
<link href="/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_653600_qa9lwwv74z.css">
|
||||
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="https://www.educoder.net/stylesheets/css/font-awesome.css?1510652321"> -->
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<!--用于markdown转html -->
|
||||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit">
|
||||
</div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
|
||||
<!-- js css合并 文件优先级的问题 -->
|
||||
|
||||
<!---->
|
||||
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/lib/underscore.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/lib/marked.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/lib/prettify.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/lib/raphael.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/sequence-diagram.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/flowchart.min.js"></script>
|
||||
<script type="text/javascript" src="/js/editormd/jquery.flowchart.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/editormd/editormd.min.js"></script>
|
||||
|
||||
<!-- codemirror addon -->
|
||||
<script type="text/javascript" src="/js/codemirror/codemirror.js"></script>
|
||||
|
||||
<!--hint-->
|
||||
<script type="text/javascript" src="/js/codemirror/lib/fuzzysort.js"></script>
|
||||
<script type="text/javascript" src="/js/codemirror/addon/hint/show-hint.js"></script>
|
||||
<!-- <script type="text/javascript" src="/js/codemirror/addon/hint/javascript-hint.js"></script> -->
|
||||
<script type="text/javascript" src="/js/codemirror/addon/hint/anyword-hint.js"></script>
|
||||
<script type="text/javascript" src="/js/codemirror/mode/javascript.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/diff_match_patch.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/merge.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/js/edu_tpi.js"></script>
|
||||
<script type="text/javascript" src="http://localhost:3000/javascripts/application.js"></script>
|
||||
|
||||
<script type="text/javascript" src="http://localhost:3000/assets/kindeditor/kindeditor.js"></script>
|
||||
|
||||
<!-- // <script type="text/javascript" src="http://localhost:3000/javascripts/create_kindeditor.js"></script> -->
|
||||
<script type="text/javascript" src="/js/create_kindeditor.js"></script>
|
||||
<script type="text/javascript" src="http://localhost:3000/javascripts/educoder/edu_application.js"></script>
|
||||
</body>
|
||||
</html>
|
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,70 @@
|
|||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
var WRAP_CLASS = "CodeMirror-activeline";
|
||||
var BACK_CLASS = "CodeMirror-activeline-background";
|
||||
var GUTT_CLASS = "CodeMirror-activeline-gutter";
|
||||
|
||||
CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
|
||||
var prev = old == CodeMirror.Init ? false : old;
|
||||
if (val == prev) return
|
||||
if (prev) {
|
||||
cm.off("beforeSelectionChange", selectionChange);
|
||||
clearActiveLines(cm);
|
||||
delete cm.state.activeLines;
|
||||
}
|
||||
if (val) {
|
||||
cm.state.activeLines = [];
|
||||
updateActiveLines(cm, cm.listSelections());
|
||||
cm.on("beforeSelectionChange", selectionChange);
|
||||
}
|
||||
});
|
||||
|
||||
function clearActiveLines(cm) {
|
||||
for (var i = 0; i < cm.state.activeLines.length; i++) {
|
||||
cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
|
||||
cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
|
||||
cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);
|
||||
}
|
||||
}
|
||||
|
||||
function sameArray(a, b) {
|
||||
if (a.length != b.length) return false;
|
||||
for (var i = 0; i < a.length; i++)
|
||||
if (a[i] != b[i]) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateActiveLines(cm, ranges) {
|
||||
var active = [];
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
var range = ranges[i];
|
||||
var option = cm.getOption("styleActiveLine");
|
||||
if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())
|
||||
continue
|
||||
var line = cm.getLineHandleVisualStart(range.head.line);
|
||||
if (active[active.length - 1] != line) active.push(line);
|
||||
}
|
||||
if (sameArray(cm.state.activeLines, active)) return;
|
||||
cm.operation(function() {
|
||||
clearActiveLines(cm);
|
||||
for (var i = 0; i < active.length; i++) {
|
||||
cm.addLineClass(active[i], "wrap", WRAP_CLASS);
|
||||
cm.addLineClass(active[i], "background", BACK_CLASS);
|
||||
cm.addLineClass(active[i], "gutter", GUTT_CLASS);
|
||||
}
|
||||
cm.state.activeLines = active;
|
||||
});
|
||||
}
|
||||
|
||||
function selectionChange(cm, sel) {
|
||||
updateActiveLines(cm, sel.ranges);
|
||||
}
|
||||
});
|
|
@ -0,0 +1,43 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
// var WORD = /[\w$]+/
|
||||
var WORD = /[A-z]+/
|
||||
, RANGE = 500;
|
||||
|
||||
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
|
||||
var word = options && options.word || WORD;
|
||||
var range = options && options.range || RANGE;
|
||||
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
|
||||
var end = cur.ch, start = end;
|
||||
while (start && word.test(curLine.charAt(start - 1))) --start;
|
||||
var curWord = start != end && curLine.slice(start, end);
|
||||
|
||||
var list = options && options.list || [], seen = {};
|
||||
var re = new RegExp(word.source, "g");
|
||||
for (var dir = -1; dir <= 1; dir += 2) {
|
||||
var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
|
||||
for (; line != endLine; line += dir) {
|
||||
var text = editor.getLine(line), m;
|
||||
while (m = re.exec(text)) {
|
||||
if (line == cur.line && m[0] === curWord) continue;
|
||||
if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {
|
||||
seen[m[0]] = true;
|
||||
list.push(m[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
|
||||
});
|
||||
});
|
|
@ -0,0 +1,188 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
var Pos = CodeMirror.Pos;
|
||||
|
||||
function forEach(arr, f) {
|
||||
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
|
||||
}
|
||||
|
||||
function arrayContains(arr, item) {
|
||||
if (!Array.prototype.indexOf) {
|
||||
var i = arr.length;
|
||||
while (i--) {
|
||||
if (arr[i] === item) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return arr.indexOf(item) != -1;
|
||||
}
|
||||
|
||||
function scriptHint(editor, keywords, getToken, options) {
|
||||
// Find the token at the cursor
|
||||
var cur = editor.getCursor(), token = getToken(editor, cur);
|
||||
if (/\b(?:string|comment)\b/.test(token.type)) return;
|
||||
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
|
||||
|
||||
// If it's not a 'word-style' token, ignore the token.
|
||||
if (!/^[\w$_]*$/.test(token.string)) {
|
||||
token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
|
||||
type: token.string == "." ? "property" : null};
|
||||
} else if (token.end > cur.ch) {
|
||||
token.end = cur.ch;
|
||||
token.string = token.string.slice(0, cur.ch - token.start);
|
||||
}
|
||||
|
||||
var tprop = token;
|
||||
// If it is a property, find out what it is a property of.
|
||||
while (tprop.type == "property") {
|
||||
tprop = getToken(editor, Pos(cur.line, tprop.start));
|
||||
if (tprop.string != ".") return;
|
||||
tprop = getToken(editor, Pos(cur.line, tprop.start));
|
||||
if (!context) var context = [];
|
||||
context.push(tprop);
|
||||
}
|
||||
// 发消息让其他组件注入 其他hint
|
||||
CodeMirror.signal(editor, "hinting");
|
||||
var myhints = editor.state.myhints
|
||||
var needToClearJSHint = editor.state.needToClearJSHint
|
||||
if (needToClearJSHint) { // 不使用js的hint,可能注入了其他语言的hint
|
||||
keywords = []
|
||||
editor.state.needToClearJSHint = false;
|
||||
}
|
||||
myhints && myhints.forEach(function(item) {
|
||||
if (!arrayContains(keywords, item)) keywords.push(item)
|
||||
})
|
||||
|
||||
return {list: getCompletions(token, context, keywords, options),
|
||||
from: Pos(cur.line, token.start),
|
||||
to: Pos(cur.line, token.end)};
|
||||
}
|
||||
|
||||
function javascriptHint(editor, options) {
|
||||
return scriptHint(editor, javascriptKeywords,
|
||||
function (e, cur) {return e.getTokenAt(cur);},
|
||||
options);
|
||||
};
|
||||
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
|
||||
|
||||
function getCoffeeScriptToken(editor, cur) {
|
||||
// This getToken, it is for coffeescript, imitates the behavior of
|
||||
// getTokenAt method in javascript.js, that is, returning "property"
|
||||
// type and treat "." as indepenent token.
|
||||
var token = editor.getTokenAt(cur);
|
||||
if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
|
||||
token.end = token.start;
|
||||
token.string = '.';
|
||||
token.type = "property";
|
||||
}
|
||||
else if (/^\.[\w$_]*$/.test(token.string)) {
|
||||
token.type = "property";
|
||||
token.start++;
|
||||
token.string = token.string.replace(/\./, '');
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
function coffeescriptHint(editor, options) {
|
||||
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
|
||||
}
|
||||
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
|
||||
|
||||
/* var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
|
||||
"toUpperCase toLowerCase split concat match replace search").split(" ");
|
||||
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
|
||||
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
|
||||
var funcProps = "prototype apply call bind".split(" ");*/
|
||||
var javascriptKeywords = ("double float int long short null true false enum super this void auto for register static const friend mutable explicit virtual template typename printf " +
|
||||
"break continue return do while if else for instanceof switch case default try catch finally throw throws assert import package boolean byte char delete private " +
|
||||
"inline struct union signed unsigned export extern namespace using operator sizeof typedef typeid and del from not as elif or with pass except " +
|
||||
"print exec raise is def lambda private protected public abstract class extends final implements interface native new static strictfp synchronized transient main " +
|
||||
"String string System println vector bool boolean FALSE TRUE function").split(" ");
|
||||
/*
|
||||
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
|
||||
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
|
||||
*/
|
||||
|
||||
function forAllProps(obj, callback) {
|
||||
if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {
|
||||
for (var name in obj) callback(name)
|
||||
} else {
|
||||
for (var o = obj; o; o = Object.getPrototypeOf(o))
|
||||
Object.getOwnPropertyNames(o).forEach(callback)
|
||||
}
|
||||
}
|
||||
|
||||
function getCompletions(token, context, keywords, options) {
|
||||
var found = [], start = token.string, global = options && options.globalScope || window;
|
||||
function maybeAdd(str) {
|
||||
// var results = fuzzysort.go(start, [str])
|
||||
// if ( results.total && !arrayContains(found, str) ) found.push(str);
|
||||
|
||||
if (fuzzysort && fuzzysort.single) {
|
||||
// 使用模糊搜索
|
||||
var results = fuzzysort.single(start, str)
|
||||
if ( results && results.score <= 0 && !arrayContains(found, str)) found.push(str);
|
||||
} else {
|
||||
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
|
||||
}
|
||||
}
|
||||
function gatherCompletions(obj) {
|
||||
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
||||
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
||||
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
||||
forAllProps(obj, maybeAdd)
|
||||
}
|
||||
|
||||
// 不启用context context强制要求了lib的调用才提示,比如Math.a 就会提示 Math.abs
|
||||
if (false && context && context.length) {
|
||||
// If this is a property, see if it belongs to some object we can
|
||||
// find in the current environment.
|
||||
var obj = context.pop(), base;
|
||||
if (obj.type && obj.type.indexOf("variable") === 0) {
|
||||
if (options && options.additionalContext)
|
||||
base = options.additionalContext[obj.string];
|
||||
if (!options || options.useGlobalScope !== false)
|
||||
base = base || global[obj.string];
|
||||
} else if (obj.type == "string") {
|
||||
base = "";
|
||||
} else if (obj.type == "atom") {
|
||||
base = 1;
|
||||
} else if (obj.type == "function") {
|
||||
if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
|
||||
(typeof global.jQuery == 'function'))
|
||||
base = global.jQuery();
|
||||
else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
|
||||
base = global._();
|
||||
}
|
||||
while (base != null && context.length)
|
||||
base = base[context.pop().string];
|
||||
if (base != null) gatherCompletions(base);
|
||||
} else {
|
||||
// If not, just look in the global object and any local scope
|
||||
// (reading into JS mode internals to get at the local and global variables)
|
||||
/* for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);*/
|
||||
/* for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
|
||||
if (!options || options.useGlobalScope !== false)
|
||||
gatherCompletions(global);*/
|
||||
|
||||
// forEach(keywords, maybeAdd);
|
||||
|
||||
var result = fuzzysort.go(start, keywords)
|
||||
result && result.forEach(function(item) {
|
||||
found.push(item.target)
|
||||
})
|
||||
}
|
||||
return found;
|
||||
}
|
||||
});
|
|
@ -0,0 +1,36 @@
|
|||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
|
@ -0,0 +1,458 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var HINT_ELEMENT_CLASS = "CodeMirror-hint";
|
||||
var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";
|
||||
|
||||
// This is the old interface, kept around for now to stay
|
||||
// backwards-compatible.
|
||||
CodeMirror.showHint = function(cm, getHints, options) {
|
||||
if (!getHints) return cm.showHint(options);
|
||||
if (options && options.async) getHints.async = true;
|
||||
var newOpts = {hint: getHints};
|
||||
if (options) for (var prop in options) newOpts[prop] = options[prop];
|
||||
return cm.showHint(newOpts);
|
||||
};
|
||||
|
||||
CodeMirror.defineExtension("showHint", function(options) {
|
||||
options = parseOptions(this, this.getCursor("start"), options);
|
||||
var selections = this.listSelections()
|
||||
if (selections.length > 1) return;
|
||||
// By default, don't allow completion when something is selected.
|
||||
// A hint function can have a `supportsSelection` property to
|
||||
// indicate that it can handle selections.
|
||||
if (this.somethingSelected()) {
|
||||
if (!options.hint.supportsSelection) return;
|
||||
// Don't try with cross-line selections
|
||||
for (var i = 0; i < selections.length; i++)
|
||||
if (selections[i].head.line != selections[i].anchor.line) return;
|
||||
}
|
||||
|
||||
if (this.state.completionActive) this.state.completionActive.close();
|
||||
var completion = this.state.completionActive = new Completion(this, options);
|
||||
if (!completion.options.hint) return;
|
||||
|
||||
CodeMirror.signal(this, "startCompletion", this);
|
||||
completion.update(true);
|
||||
});
|
||||
|
||||
function Completion(cm, options) {
|
||||
this.cm = cm;
|
||||
this.options = options;
|
||||
this.widget = null;
|
||||
this.debounce = 0;
|
||||
this.tick = 0;
|
||||
this.startPos = this.cm.getCursor("start");
|
||||
this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
|
||||
|
||||
var self = this;
|
||||
cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
|
||||
}
|
||||
|
||||
var requestAnimationFrame = window.requestAnimationFrame || function(fn) {
|
||||
return setTimeout(fn, 1000/60);
|
||||
};
|
||||
var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
|
||||
|
||||
Completion.prototype = {
|
||||
close: function() {
|
||||
if (!this.active()) return;
|
||||
this.cm.state.completionActive = null;
|
||||
this.tick = null;
|
||||
this.cm.off("cursorActivity", this.activityFunc);
|
||||
|
||||
if (this.widget && this.data) CodeMirror.signal(this.data, "close");
|
||||
if (this.widget) this.widget.close();
|
||||
CodeMirror.signal(this.cm, "endCompletion", this.cm);
|
||||
},
|
||||
|
||||
active: function() {
|
||||
return this.cm.state.completionActive == this;
|
||||
},
|
||||
|
||||
pick: function(data, i) {
|
||||
var completion = data.list[i];
|
||||
if (completion.hint) completion.hint(this.cm, data, completion);
|
||||
else this.cm.replaceRange(getText(completion), completion.from || data.from,
|
||||
completion.to || data.to, "complete");
|
||||
CodeMirror.signal(data, "pick", completion);
|
||||
this.close();
|
||||
},
|
||||
|
||||
cursorActivity: function() {
|
||||
if (this.debounce) {
|
||||
cancelAnimationFrame(this.debounce);
|
||||
this.debounce = 0;
|
||||
}
|
||||
|
||||
var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
|
||||
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
|
||||
pos.ch < this.startPos.ch || this.cm.somethingSelected() ||
|
||||
(pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
|
||||
this.close();
|
||||
} else {
|
||||
var self = this;
|
||||
this.debounce = requestAnimationFrame(function() {self.update();});
|
||||
if (this.widget) this.widget.disable();
|
||||
}
|
||||
},
|
||||
|
||||
update: function(first) {
|
||||
if (this.tick == null) return
|
||||
var self = this, myTick = ++this.tick
|
||||
fetchHints(this.options.hint, this.cm, this.options, function(data) {
|
||||
if (self.tick == myTick) self.finishUpdate(data, first)
|
||||
})
|
||||
},
|
||||
|
||||
finishUpdate: function(data, first) {
|
||||
if (this.data) CodeMirror.signal(this.data, "update");
|
||||
|
||||
var picked = (this.widget && this.widget.picked) // || (first && this.options.completeSingle);
|
||||
if (this.widget) this.widget.close();
|
||||
|
||||
if (data && this.data && isNewCompletion(this.data, data)) return;
|
||||
this.data = data;
|
||||
|
||||
if (data && data.list.length) {
|
||||
if (picked && data.list.length == 1) {
|
||||
this.pick(data, 0);
|
||||
} else {
|
||||
// 使得输入完后,刚好输入和hint一样,则不再显示hint
|
||||
if (data.list.length == 1 && data.to.ch - data.from.ch === data.list[0].length) {
|
||||
return;
|
||||
}
|
||||
this.widget = new Widget(this, data);
|
||||
CodeMirror.signal(data, "shown");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function isNewCompletion(old, nw) {
|
||||
var moved = CodeMirror.cmpPos(nw.from, old.from)
|
||||
return moved > 0 && old.to.ch - old.from.ch != nw.to.ch - nw.from.ch
|
||||
}
|
||||
|
||||
function parseOptions(cm, pos, options) {
|
||||
var editor = cm.options.hintOptions;
|
||||
var out = {};
|
||||
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
|
||||
if (editor) for (var prop in editor)
|
||||
if (editor[prop] !== undefined) out[prop] = editor[prop];
|
||||
if (options) for (var prop in options)
|
||||
if (options[prop] !== undefined) out[prop] = options[prop];
|
||||
if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
|
||||
return out;
|
||||
}
|
||||
|
||||
function getText(completion) {
|
||||
if (typeof completion == "string") return completion;
|
||||
else return completion.text;
|
||||
}
|
||||
|
||||
function buildKeyMap(completion, handle) {
|
||||
var baseMap = {
|
||||
Up: function() {handle.moveFocus(-1);},
|
||||
Down: function() {handle.moveFocus(1);},
|
||||
PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},
|
||||
PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},
|
||||
Home: function() {handle.setFocus(0);},
|
||||
End: function() {handle.setFocus(handle.length - 1);},
|
||||
Enter: handle.pick,
|
||||
Tab: handle.pick,
|
||||
Esc: handle.close
|
||||
};
|
||||
var custom = completion.options.customKeys;
|
||||
var ourMap = custom ? {} : baseMap;
|
||||
function addBinding(key, val) {
|
||||
var bound;
|
||||
if (typeof val != "string")
|
||||
bound = function(cm) { return val(cm, handle); };
|
||||
// This mechanism is deprecated
|
||||
else if (baseMap.hasOwnProperty(val))
|
||||
bound = baseMap[val];
|
||||
else
|
||||
bound = val;
|
||||
ourMap[key] = bound;
|
||||
}
|
||||
if (custom)
|
||||
for (var key in custom) if (custom.hasOwnProperty(key))
|
||||
addBinding(key, custom[key]);
|
||||
var extra = completion.options.extraKeys;
|
||||
if (extra)
|
||||
for (var key in extra) if (extra.hasOwnProperty(key))
|
||||
addBinding(key, extra[key]);
|
||||
return ourMap;
|
||||
}
|
||||
|
||||
function getHintElement(hintsElement, el) {
|
||||
while (el && el != hintsElement) {
|
||||
if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
|
||||
el = el.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
function Widget(completion, data) {
|
||||
this.completion = completion;
|
||||
this.data = data;
|
||||
this.picked = false;
|
||||
var widget = this, cm = completion.cm;
|
||||
|
||||
var hints = this.hints = document.createElement("ul");
|
||||
hints.className = "CodeMirror-hints";
|
||||
this.selectedHint = data.selectedHint || 0;
|
||||
|
||||
var completions = data.list;
|
||||
for (var i = 0; i < completions.length; ++i) {
|
||||
var elt = hints.appendChild(document.createElement("li")), cur = completions[i];
|
||||
var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
|
||||
if (cur.className != null) className = cur.className + " " + className;
|
||||
elt.className = className;
|
||||
if (cur.render) cur.render(elt, data, cur);
|
||||
else elt.appendChild(document.createTextNode(cur.displayText || getText(cur)));
|
||||
elt.hintId = i;
|
||||
}
|
||||
|
||||
var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
|
||||
var left = pos.left, top = pos.bottom, below = true;
|
||||
hints.style.left = left + "px";
|
||||
hints.style.top = top + "px";
|
||||
// If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
|
||||
var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
|
||||
var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
|
||||
(completion.options.container || document.body).appendChild(hints);
|
||||
var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
|
||||
var scrolls = hints.scrollHeight > hints.clientHeight + 1
|
||||
var startScroll = cm.getScrollInfo();
|
||||
|
||||
if (overlapY > 0) {
|
||||
var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
|
||||
if (curTop - height > 0) { // Fits above cursor
|
||||
hints.style.top = (top = pos.top - height) + "px";
|
||||
below = false;
|
||||
} else if (height > winH) {
|
||||
hints.style.height = (winH - 5) + "px";
|
||||
hints.style.top = (top = pos.bottom - box.top) + "px";
|
||||
var cursor = cm.getCursor();
|
||||
if (data.from.ch != cursor.ch) {
|
||||
pos = cm.cursorCoords(cursor);
|
||||
hints.style.left = (left = pos.left) + "px";
|
||||
box = hints.getBoundingClientRect();
|
||||
}
|
||||
}
|
||||
}
|
||||
var overlapX = box.right - winW;
|
||||
if (overlapX > 0) {
|
||||
if (box.right - box.left > winW) {
|
||||
hints.style.width = (winW - 5) + "px";
|
||||
overlapX -= (box.right - box.left) - winW;
|
||||
}
|
||||
hints.style.left = (left = pos.left - overlapX) + "px";
|
||||
}
|
||||
if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
|
||||
node.style.paddingRight = cm.display.nativeBarWidth + "px"
|
||||
|
||||
cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
|
||||
moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
|
||||
setFocus: function(n) { widget.changeActive(n); },
|
||||
menuSize: function() { return widget.screenAmount(); },
|
||||
length: completions.length,
|
||||
close: function() { completion.close(); },
|
||||
pick: function() { widget.pick(); },
|
||||
data: data
|
||||
}));
|
||||
|
||||
if (completion.options.closeOnUnfocus) {
|
||||
var closingOnBlur;
|
||||
cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });
|
||||
cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });
|
||||
}
|
||||
|
||||
cm.on("scroll", this.onScroll = function() {
|
||||
var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
|
||||
var newTop = top + startScroll.top - curScroll.top;
|
||||
var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop);
|
||||
if (!below) point += hints.offsetHeight;
|
||||
if (point <= editor.top || point >= editor.bottom) return completion.close();
|
||||
hints.style.top = newTop + "px";
|
||||
hints.style.left = (left + startScroll.left - curScroll.left) + "px";
|
||||
});
|
||||
|
||||
CodeMirror.on(hints, "dblclick", function(e) {
|
||||
var t = getHintElement(hints, e.target || e.srcElement);
|
||||
if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}
|
||||
});
|
||||
|
||||
CodeMirror.on(hints, "click", function(e) {
|
||||
var t = getHintElement(hints, e.target || e.srcElement);
|
||||
if (t && t.hintId != null) {
|
||||
widget.changeActive(t.hintId);
|
||||
if (completion.options.completeOnSingleClick) widget.pick();
|
||||
}
|
||||
});
|
||||
|
||||
CodeMirror.on(hints, "mousedown", function() {
|
||||
setTimeout(function(){cm.focus();}, 20);
|
||||
});
|
||||
|
||||
CodeMirror.signal(data, "select", completions[0], hints.firstChild);
|
||||
return true;
|
||||
}
|
||||
|
||||
Widget.prototype = {
|
||||
close: function() {
|
||||
if (this.completion.widget != this) return;
|
||||
this.completion.widget = null;
|
||||
this.hints.parentNode.removeChild(this.hints);
|
||||
this.completion.cm.removeKeyMap(this.keyMap);
|
||||
|
||||
var cm = this.completion.cm;
|
||||
if (this.completion.options.closeOnUnfocus) {
|
||||
cm.off("blur", this.onBlur);
|
||||
cm.off("focus", this.onFocus);
|
||||
}
|
||||
cm.off("scroll", this.onScroll);
|
||||
},
|
||||
|
||||
disable: function() {
|
||||
this.completion.cm.removeKeyMap(this.keyMap);
|
||||
var widget = this;
|
||||
this.keyMap = {Enter: function() { widget.picked = true; }};
|
||||
this.completion.cm.addKeyMap(this.keyMap);
|
||||
},
|
||||
|
||||
pick: function() {
|
||||
this.completion.pick(this.data, this.selectedHint);
|
||||
},
|
||||
|
||||
changeActive: function(i, avoidWrap) {
|
||||
if (i >= this.data.list.length)
|
||||
i = avoidWrap ? this.data.list.length - 1 : 0;
|
||||
else if (i < 0)
|
||||
i = avoidWrap ? 0 : this.data.list.length - 1;
|
||||
if (this.selectedHint == i) return;
|
||||
var node = this.hints.childNodes[this.selectedHint];
|
||||
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
|
||||
node = this.hints.childNodes[this.selectedHint = i];
|
||||
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
|
||||
if (node.offsetTop < this.hints.scrollTop)
|
||||
this.hints.scrollTop = node.offsetTop - 3;
|
||||
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
|
||||
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
|
||||
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
|
||||
},
|
||||
|
||||
screenAmount: function() {
|
||||
return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
|
||||
}
|
||||
};
|
||||
|
||||
function applicableHelpers(cm, helpers) {
|
||||
if (!cm.somethingSelected()) return helpers
|
||||
var result = []
|
||||
for (var i = 0; i < helpers.length; i++)
|
||||
if (helpers[i].supportsSelection) result.push(helpers[i])
|
||||
return result
|
||||
}
|
||||
|
||||
function fetchHints(hint, cm, options, callback) {
|
||||
if (hint.async) {
|
||||
hint(cm, callback, options)
|
||||
} else {
|
||||
var result = hint(cm, options)
|
||||
if (result && result.then) result.then(callback)
|
||||
else callback(result)
|
||||
}
|
||||
}
|
||||
|
||||
function resolveAutoHints(cm, pos) {
|
||||
var helpers = cm.getHelpers(pos, "hint"), words
|
||||
if (helpers.length) {
|
||||
var resolved = function(cm, callback, options) {
|
||||
var app = applicableHelpers(cm, helpers);
|
||||
function run(i) {
|
||||
if (i == app.length) return callback(null)
|
||||
fetchHints(app[i], cm, options, function(result) {
|
||||
if (result && result.list.length > 0) callback(result)
|
||||
else run(i + 1)
|
||||
})
|
||||
}
|
||||
run(0)
|
||||
}
|
||||
resolved.async = true
|
||||
resolved.supportsSelection = true
|
||||
return resolved
|
||||
} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
|
||||
// 发消息让其他组件注入 其他hint
|
||||
CodeMirror.signal(cm, "hinting", words);
|
||||
var myhints = cm.state.myhints
|
||||
var wordsTemp = words.slice(0)
|
||||
myhints && myhints.forEach(function(item) {
|
||||
if (words.indexOf(item) === -1) wordsTemp.push(item)
|
||||
})
|
||||
return function(cm) {
|
||||
return CodeMirror.hint.fromList(cm, {words: wordsTemp})
|
||||
}
|
||||
} else if (CodeMirror.hint.anyword) {
|
||||
return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }
|
||||
} else {
|
||||
return function() {}
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.registerHelper("hint", "auto", {
|
||||
resolve: resolveAutoHints
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
|
||||
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
|
||||
var to = CodeMirror.Pos(cur.line, token.end);
|
||||
if (token.string && /\w/.test(token.string[token.string.length - 1])) {
|
||||
var term = token.string, from = CodeMirror.Pos(cur.line, token.start);
|
||||
} else {
|
||||
var term = "", from = to;
|
||||
}
|
||||
var found = [];
|
||||
|
||||
if (fuzzysort && fuzzysort.go) {
|
||||
var result = fuzzysort.go(term, options.words)
|
||||
result && result.forEach(function(item) {
|
||||
found.push(item.target)
|
||||
})
|
||||
} else {
|
||||
for (var i = 0; i < options.words.length; i++) {
|
||||
var word = options.words[i];
|
||||
if (word.slice(0, term.length) == term)
|
||||
found.push(word);
|
||||
}
|
||||
}
|
||||
if (found.length) return {list: found, from: from, to: to};
|
||||
});
|
||||
|
||||
CodeMirror.commands.autocomplete = CodeMirror.showHint;
|
||||
|
||||
var defaultOptions = {
|
||||
hint: CodeMirror.hint.auto,
|
||||
completeSingle: true,
|
||||
alignWithWord: true,
|
||||
closeCharacters: /[\s()\[\]{};:>,]/,
|
||||
closeOnUnfocus: true,
|
||||
completeOnSingleClick: true,
|
||||
container: null,
|
||||
customKeys: null,
|
||||
extraKeys: null
|
||||
};
|
||||
|
||||
CodeMirror.defineOption("hintOptions", null);
|
||||
});
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,603 @@
|
|||
/*
|
||||
WHAT: SublimeText-like Fuzzy Search
|
||||
USAGE:
|
||||
fuzzysort.single('fs', 'Fuzzy Search') // {score: -16}
|
||||
fuzzysort.single('test', 'test') // {score: 0}
|
||||
fuzzysort.single('doesnt exist', 'target') // null
|
||||
fuzzysort.go('mr', ['Monitor.cpp', 'MeshRenderer.cpp'])
|
||||
// [{score: -18, target: "MeshRenderer.cpp"}, {score: -6009, target: "Monitor.cpp"}]
|
||||
fuzzysort.highlight(fuzzysort.single('fs', 'Fuzzy Search'), '<b>', '</b>')
|
||||
// <b>F</b>uzzy <b>S</b>earch
|
||||
|
||||
https://github.com/farzher/fuzzysort
|
||||
*/
|
||||
|
||||
// UMD (Universal Module Definition) for fuzzysort
|
||||
;(function(root, UMD) {
|
||||
if(typeof define === 'function' && define.amd) define([], UMD)
|
||||
else if(typeof module === 'object' && module.exports) module.exports = UMD()
|
||||
else root.fuzzysort = UMD()
|
||||
})(this, function UMD() { function fuzzysortNew(instanceOptions) {
|
||||
|
||||
var fuzzysort = {
|
||||
|
||||
single: function(search, target, options) {
|
||||
if(!search) return null
|
||||
if(!isObj(search)) search = fuzzysort.getPreparedSearch(search)
|
||||
|
||||
if(!target) return null
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
|
||||
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
|
||||
: true
|
||||
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
|
||||
return algorithm(search, target, search[0])
|
||||
// var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
|
||||
// var result = algorithm(search, target, search[0])
|
||||
// if(result === null) return null
|
||||
// if(result.score < threshold) return null
|
||||
// return result
|
||||
},
|
||||
|
||||
go: function(search, targets, options) {
|
||||
if(!search) return noResults
|
||||
search = fuzzysort.prepareSearch(search)
|
||||
var searchLowerCode = search[0]
|
||||
|
||||
var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
|
||||
var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991
|
||||
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
|
||||
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
|
||||
: true
|
||||
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
|
||||
var resultsLen = 0; var limitedCount = 0
|
||||
var targetsLen = targets.length
|
||||
|
||||
// This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
|
||||
|
||||
// options.keys
|
||||
if(options && options.keys) {
|
||||
var scoreFn = options.scoreFn || defaultScoreFn
|
||||
var keys = options.keys
|
||||
var keysLen = keys.length
|
||||
for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]
|
||||
var objResults = new Array(keysLen)
|
||||
for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
|
||||
var key = keys[keyI]
|
||||
var target = getValue(obj, key)
|
||||
if(!target) { objResults[keyI] = null; continue }
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
objResults[keyI] = algorithm(search, target, searchLowerCode)
|
||||
}
|
||||
objResults.obj = obj // before scoreFn so scoreFn can use it
|
||||
var score = scoreFn(objResults)
|
||||
if(score === null) continue
|
||||
if(score < threshold) continue
|
||||
objResults.score = score
|
||||
if(resultsLen < limit) { q.add(objResults); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(score > q.peek().score) q.replaceTop(objResults)
|
||||
}
|
||||
}
|
||||
|
||||
// options.key
|
||||
} else if(options && options.key) {
|
||||
var key = options.key
|
||||
for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]
|
||||
var target = getValue(obj, key)
|
||||
if(!target) continue
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
var result = algorithm(search, target, searchLowerCode)
|
||||
if(result === null) continue
|
||||
if(result.score < threshold) continue
|
||||
|
||||
// have to clone result so duplicate targets from different obj can each reference the correct obj
|
||||
result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden
|
||||
|
||||
if(resultsLen < limit) { q.add(result); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(result.score > q.peek().score) q.replaceTop(result)
|
||||
}
|
||||
}
|
||||
|
||||
// no keys
|
||||
} else {
|
||||
for(var i = targetsLen - 1; i >= 0; --i) { var target = targets[i]
|
||||
if(!target) continue
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
var result = algorithm(search, target, searchLowerCode)
|
||||
if(result === null) continue
|
||||
if(result.score < threshold) continue
|
||||
if(resultsLen < limit) { q.add(result); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(result.score > q.peek().score) q.replaceTop(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(resultsLen === 0) return noResults
|
||||
var results = new Array(resultsLen)
|
||||
for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()
|
||||
results.total = resultsLen + limitedCount
|
||||
return results
|
||||
},
|
||||
|
||||
goAsync: function(search, targets, options) {
|
||||
var canceled = false
|
||||
var p = new Promise(function(resolve, reject) {
|
||||
if(!search) return resolve(noResults)
|
||||
search = fuzzysort.prepareSearch(search)
|
||||
var searchLowerCode = search[0]
|
||||
|
||||
var q = fastpriorityqueue()
|
||||
var iCurrent = targets.length - 1
|
||||
var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
|
||||
var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991
|
||||
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
|
||||
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
|
||||
: true
|
||||
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
|
||||
var resultsLen = 0; var limitedCount = 0
|
||||
function step() {
|
||||
if(canceled) return reject('canceled')
|
||||
|
||||
var startMs = Date.now()
|
||||
|
||||
// This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
|
||||
|
||||
// options.keys
|
||||
if(options && options.keys) {
|
||||
var scoreFn = options.scoreFn || defaultScoreFn
|
||||
var keys = options.keys
|
||||
var keysLen = keys.length
|
||||
for(; iCurrent >= 0; --iCurrent) { var obj = targets[iCurrent]
|
||||
var objResults = new Array(keysLen)
|
||||
for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
|
||||
var key = keys[keyI]
|
||||
var target = getValue(obj, key)
|
||||
if(!target) { objResults[keyI] = null; continue }
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
objResults[keyI] = algorithm(search, target, searchLowerCode)
|
||||
}
|
||||
objResults.obj = obj // before scoreFn so scoreFn can use it
|
||||
var score = scoreFn(objResults)
|
||||
if(score === null) continue
|
||||
if(score < threshold) continue
|
||||
objResults.score = score
|
||||
if(resultsLen < limit) { q.add(objResults); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(score > q.peek().score) q.replaceTop(objResults)
|
||||
}
|
||||
|
||||
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
|
||||
if(Date.now() - startMs >= 10/*asyncInterval*/) {
|
||||
isNode?setImmediate(step):setTimeout(step)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// options.key
|
||||
} else if(options && options.key) {
|
||||
var key = options.key
|
||||
for(; iCurrent >= 0; --iCurrent) { var obj = targets[iCurrent]
|
||||
var target = getValue(obj, key)
|
||||
if(!target) continue
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
var result = algorithm(search, target, searchLowerCode)
|
||||
if(result === null) continue
|
||||
if(result.score < threshold) continue
|
||||
|
||||
// have to clone result so duplicate targets from different obj can each reference the correct obj
|
||||
result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden
|
||||
|
||||
if(resultsLen < limit) { q.add(result); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(result.score > q.peek().score) q.replaceTop(result)
|
||||
}
|
||||
|
||||
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
|
||||
if(Date.now() - startMs >= 10/*asyncInterval*/) {
|
||||
isNode?setImmediate(step):setTimeout(step)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no keys
|
||||
} else {
|
||||
for(; iCurrent >= 0; --iCurrent) { var target = targets[iCurrent]
|
||||
if(!target) continue
|
||||
if(!isObj(target)) target = fuzzysort.getPrepared(target)
|
||||
|
||||
var result = algorithm(search, target, searchLowerCode)
|
||||
if(result === null) continue
|
||||
if(result.score < threshold) continue
|
||||
if(resultsLen < limit) { q.add(result); ++resultsLen }
|
||||
else {
|
||||
++limitedCount
|
||||
if(result.score > q.peek().score) q.replaceTop(result)
|
||||
}
|
||||
|
||||
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
|
||||
if(Date.now() - startMs >= 10/*asyncInterval*/) {
|
||||
isNode?setImmediate(step):setTimeout(step)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(resultsLen === 0) return resolve(noResults)
|
||||
var results = new Array(resultsLen)
|
||||
for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()
|
||||
results.total = resultsLen + limitedCount
|
||||
resolve(results)
|
||||
}
|
||||
|
||||
isNode?setImmediate(step):step()
|
||||
})
|
||||
p.cancel = function() { canceled = true }
|
||||
return p
|
||||
},
|
||||
|
||||
highlight: function(result, hOpen, hClose) {
|
||||
if(result === null) return null
|
||||
if(hOpen === undefined) hOpen = '<b>'
|
||||
if(hClose === undefined) hClose = '</b>'
|
||||
var highlighted = ''
|
||||
var matchesIndex = 0
|
||||
var opened = false
|
||||
var target = result.target
|
||||
var targetLen = target.length
|
||||
var matchesBest = result.indexes
|
||||
for(var i = 0; i < targetLen; ++i) { var char = target[i]
|
||||
if(matchesBest[matchesIndex] === i) {
|
||||
++matchesIndex
|
||||
if(!opened) { opened = true
|
||||
highlighted += hOpen
|
||||
}
|
||||
|
||||
if(matchesIndex === matchesBest.length) {
|
||||
highlighted += char + hClose + target.substr(i+1)
|
||||
break
|
||||
}
|
||||
} else {
|
||||
if(opened) { opened = false
|
||||
highlighted += hClose
|
||||
}
|
||||
}
|
||||
highlighted += char
|
||||
}
|
||||
|
||||
return highlighted
|
||||
},
|
||||
|
||||
prepare: function(target) {
|
||||
if(!target) return
|
||||
return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:null, score:null, indexes:null, obj:null} // hidden
|
||||
},
|
||||
prepareSlow: function(target) {
|
||||
if(!target) return
|
||||
return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:fuzzysort.prepareNextBeginningIndexes(target), score:null, indexes:null, obj:null} // hidden
|
||||
},
|
||||
prepareSearch: function(search) {
|
||||
if(!search) return
|
||||
return fuzzysort.prepareLowerCodes(search)
|
||||
},
|
||||
|
||||
|
||||
|
||||
// Below this point is only internal code
|
||||
// Below this point is only internal code
|
||||
// Below this point is only internal code
|
||||
// Below this point is only internal code
|
||||
|
||||
|
||||
|
||||
getPrepared: function(target) {
|
||||
if(target.length > 999) return fuzzysort.prepare(target) // don't cache huge targets
|
||||
var targetPrepared = preparedCache.get(target)
|
||||
if(targetPrepared !== undefined) return targetPrepared
|
||||
targetPrepared = fuzzysort.prepare(target)
|
||||
preparedCache.set(target, targetPrepared)
|
||||
return targetPrepared
|
||||
},
|
||||
getPreparedSearch: function(search) {
|
||||
if(search.length > 999) return fuzzysort.prepareSearch(search) // don't cache huge searches
|
||||
var searchPrepared = preparedSearchCache.get(search)
|
||||
if(searchPrepared !== undefined) return searchPrepared
|
||||
searchPrepared = fuzzysort.prepareSearch(search)
|
||||
preparedSearchCache.set(search, searchPrepared)
|
||||
return searchPrepared
|
||||
},
|
||||
|
||||
algorithm: function(searchLowerCodes, prepared, searchLowerCode) {
|
||||
var targetLowerCodes = prepared._targetLowerCodes
|
||||
var searchLen = searchLowerCodes.length
|
||||
var targetLen = targetLowerCodes.length
|
||||
var searchI = 0 // where we at
|
||||
var targetI = 0 // where you at
|
||||
var typoSimpleI = 0
|
||||
var matchesSimpleLen = 0
|
||||
|
||||
// very basic fuzzy match; to remove non-matching targets ASAP!
|
||||
// walk through target. find sequential matches.
|
||||
// if all chars aren't found then exit
|
||||
for(;;) {
|
||||
var isMatch = searchLowerCode === targetLowerCodes[targetI]
|
||||
if(isMatch) {
|
||||
matchesSimple[matchesSimpleLen++] = targetI
|
||||
++searchI; if(searchI === searchLen) break
|
||||
searchLowerCode = searchLowerCodes[typoSimpleI===0?searchI : (typoSimpleI===searchI?searchI+1 : (typoSimpleI===searchI-1?searchI-1 : searchI))]
|
||||
}
|
||||
|
||||
++targetI; if(targetI >= targetLen) { // Failed to find searchI
|
||||
// Check for typo or exit
|
||||
// we go as far as possible before trying to transpose
|
||||
// then we transpose backwards until we reach the beginning
|
||||
for(;;) {
|
||||
if(searchI <= 1) return null // not allowed to transpose first char
|
||||
if(typoSimpleI === 0) { // we haven't tried to transpose yet
|
||||
--searchI
|
||||
var searchLowerCodeNew = searchLowerCodes[searchI]
|
||||
if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char
|
||||
typoSimpleI = searchI
|
||||
} else {
|
||||
if(typoSimpleI === 1) return null // reached the end of the line for transposing
|
||||
--typoSimpleI
|
||||
searchI = typoSimpleI
|
||||
searchLowerCode = searchLowerCodes[searchI + 1]
|
||||
var searchLowerCodeNew = searchLowerCodes[searchI]
|
||||
if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char
|
||||
}
|
||||
matchesSimpleLen = searchI
|
||||
targetI = matchesSimple[matchesSimpleLen - 1] + 1
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var searchI = 0
|
||||
var typoStrictI = 0
|
||||
var successStrict = false
|
||||
var matchesStrictLen = 0
|
||||
|
||||
var nextBeginningIndexes = prepared._nextBeginningIndexes
|
||||
if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)
|
||||
var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]
|
||||
|
||||
// Our target string successfully matched all characters in sequence!
|
||||
// Let's try a more advanced and strict test to improve the score
|
||||
// only count it as a match if it's consecutive or a beginning character!
|
||||
if(targetI !== targetLen) for(;;) {
|
||||
if(targetI >= targetLen) {
|
||||
// We failed to find a good spot for this search char, go back to the previous search char and force it forward
|
||||
if(searchI <= 0) { // We failed to push chars forward for a better match
|
||||
// transpose, starting from the beginning
|
||||
++typoStrictI; if(typoStrictI > searchLen-2) break
|
||||
if(searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI+1]) continue // doesn't make sense to transpose a repeat char
|
||||
targetI = firstPossibleI
|
||||
continue
|
||||
}
|
||||
|
||||
--searchI
|
||||
var lastMatch = matchesStrict[--matchesStrictLen]
|
||||
targetI = nextBeginningIndexes[lastMatch]
|
||||
|
||||
} else {
|
||||
var isMatch = searchLowerCodes[typoStrictI===0?searchI : (typoStrictI===searchI?searchI+1 : (typoStrictI===searchI-1?searchI-1 : searchI))] === targetLowerCodes[targetI]
|
||||
if(isMatch) {
|
||||
matchesStrict[matchesStrictLen++] = targetI
|
||||
++searchI; if(searchI === searchLen) { successStrict = true; break }
|
||||
++targetI
|
||||
} else {
|
||||
targetI = nextBeginningIndexes[targetI]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{ // tally up the score & keep track of matches for highlighting later
|
||||
if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }
|
||||
else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }
|
||||
var score = 0
|
||||
var lastTargetI = -1
|
||||
for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]
|
||||
// score only goes down if they're not consecutive
|
||||
if(lastTargetI !== targetI - 1) score -= targetI
|
||||
lastTargetI = targetI
|
||||
}
|
||||
if(!successStrict) {
|
||||
score *= 1000
|
||||
if(typoSimpleI !== 0) score += -20/*typoPenalty*/
|
||||
} else {
|
||||
if(typoStrictI !== 0) score += -20/*typoPenalty*/
|
||||
}
|
||||
score -= targetLen - searchLen
|
||||
prepared.score = score
|
||||
prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]
|
||||
|
||||
return prepared
|
||||
}
|
||||
},
|
||||
|
||||
algorithmNoTypo: function(searchLowerCodes, prepared, searchLowerCode) {
|
||||
var targetLowerCodes = prepared._targetLowerCodes
|
||||
var searchLen = searchLowerCodes.length
|
||||
var targetLen = targetLowerCodes.length
|
||||
var searchI = 0 // where we at
|
||||
var targetI = 0 // where you at
|
||||
var matchesSimpleLen = 0
|
||||
|
||||
// very basic fuzzy match; to remove non-matching targets ASAP!
|
||||
// walk through target. find sequential matches.
|
||||
// if all chars aren't found then exit
|
||||
for(;;) {
|
||||
var isMatch = searchLowerCode === targetLowerCodes[targetI]
|
||||
if(isMatch) {
|
||||
matchesSimple[matchesSimpleLen++] = targetI
|
||||
++searchI; if(searchI === searchLen) break
|
||||
searchLowerCode = searchLowerCodes[searchI]
|
||||
}
|
||||
++targetI; if(targetI >= targetLen) return null // Failed to find searchI
|
||||
}
|
||||
|
||||
var searchI = 0
|
||||
var successStrict = false
|
||||
var matchesStrictLen = 0
|
||||
|
||||
var nextBeginningIndexes = prepared._nextBeginningIndexes
|
||||
if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)
|
||||
var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]
|
||||
|
||||
// Our target string successfully matched all characters in sequence!
|
||||
// Let's try a more advanced and strict test to improve the score
|
||||
// only count it as a match if it's consecutive or a beginning character!
|
||||
if(targetI !== targetLen) for(;;) {
|
||||
if(targetI >= targetLen) {
|
||||
// We failed to find a good spot for this search char, go back to the previous search char and force it forward
|
||||
if(searchI <= 0) break // We failed to push chars forward for a better match
|
||||
|
||||
--searchI
|
||||
var lastMatch = matchesStrict[--matchesStrictLen]
|
||||
targetI = nextBeginningIndexes[lastMatch]
|
||||
|
||||
} else {
|
||||
var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI]
|
||||
if(isMatch) {
|
||||
matchesStrict[matchesStrictLen++] = targetI
|
||||
++searchI; if(searchI === searchLen) { successStrict = true; break }
|
||||
++targetI
|
||||
} else {
|
||||
targetI = nextBeginningIndexes[targetI]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{ // tally up the score & keep track of matches for highlighting later
|
||||
if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }
|
||||
else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }
|
||||
var score = 0
|
||||
var lastTargetI = -1
|
||||
for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]
|
||||
// score only goes down if they're not consecutive
|
||||
if(lastTargetI !== targetI - 1) score -= targetI
|
||||
lastTargetI = targetI
|
||||
}
|
||||
if(!successStrict) score *= 1000
|
||||
score -= targetLen - searchLen
|
||||
prepared.score = score
|
||||
prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]
|
||||
|
||||
return prepared
|
||||
}
|
||||
},
|
||||
|
||||
prepareLowerCodes: function(str) {
|
||||
var strLen = str.length
|
||||
var lowerCodes = [] // new Array(strLen) sparse array is too slow
|
||||
var lower = str.toLowerCase()
|
||||
for(var i = 0; i < strLen; ++i) lowerCodes[i] = lower.charCodeAt(i)
|
||||
return lowerCodes
|
||||
},
|
||||
prepareBeginningIndexes: function(target) {
|
||||
var targetLen = target.length
|
||||
var beginningIndexes = []; var beginningIndexesLen = 0
|
||||
var wasUpper = false
|
||||
var wasAlphanum = false
|
||||
for(var i = 0; i < targetLen; ++i) {
|
||||
var targetCode = target.charCodeAt(i)
|
||||
var isUpper = targetCode>=65&&targetCode<=90
|
||||
var isAlphanum = isUpper || targetCode>=97&&targetCode<=122 || targetCode>=48&&targetCode<=57
|
||||
var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum
|
||||
wasUpper = isUpper
|
||||
wasAlphanum = isAlphanum
|
||||
if(isBeginning) beginningIndexes[beginningIndexesLen++] = i
|
||||
}
|
||||
return beginningIndexes
|
||||
},
|
||||
prepareNextBeginningIndexes: function(target) {
|
||||
var targetLen = target.length
|
||||
var beginningIndexes = fuzzysort.prepareBeginningIndexes(target)
|
||||
var nextBeginningIndexes = [] // new Array(targetLen) sparse array is too slow
|
||||
var lastIsBeginning = beginningIndexes[0]
|
||||
var lastIsBeginningI = 0
|
||||
for(var i = 0; i < targetLen; ++i) {
|
||||
if(lastIsBeginning > i) {
|
||||
nextBeginningIndexes[i] = lastIsBeginning
|
||||
} else {
|
||||
lastIsBeginning = beginningIndexes[++lastIsBeginningI]
|
||||
nextBeginningIndexes[i] = lastIsBeginning===undefined ? targetLen : lastIsBeginning
|
||||
}
|
||||
}
|
||||
return nextBeginningIndexes
|
||||
},
|
||||
|
||||
cleanup: cleanup,
|
||||
new: fuzzysortNew,
|
||||
}
|
||||
return fuzzysort
|
||||
} // fuzzysortNew
|
||||
|
||||
// This stuff is outside fuzzysortNew, because it's shared with instances of fuzzysort.new()
|
||||
var isNode = typeof require !== 'undefined' && typeof window === 'undefined'
|
||||
// var MAX_INT = Number.MAX_SAFE_INTEGER
|
||||
// var MIN_INT = Number.MIN_VALUE
|
||||
var preparedCache = new Map()
|
||||
var preparedSearchCache = new Map()
|
||||
var noResults = []; noResults.total = 0
|
||||
var matchesSimple = []; var matchesStrict = []
|
||||
function cleanup() { preparedCache.clear(); preparedSearchCache.clear(); matchesSimple = []; matchesStrict = [] }
|
||||
function defaultScoreFn(a) {
|
||||
var max = -9007199254740991
|
||||
for (var i = a.length - 1; i >= 0; --i) {
|
||||
var result = a[i]; if(result === null) continue
|
||||
var score = result.score
|
||||
if(score > max) max = score
|
||||
}
|
||||
if(max === -9007199254740991) return null
|
||||
return max
|
||||
}
|
||||
|
||||
// prop = 'key' 2.5ms optimized for this case, seems to be about as fast as direct obj[prop]
|
||||
// prop = 'key1.key2' 10ms
|
||||
// prop = ['key1', 'key2'] 27ms
|
||||
function getValue(obj, prop) {
|
||||
var tmp = obj[prop]; if(tmp !== undefined) return tmp
|
||||
var segs = prop
|
||||
if(!Array.isArray(prop)) segs = prop.split('.')
|
||||
var len = segs.length
|
||||
var i = -1
|
||||
while (obj && (++i < len)) obj = obj[segs[i]]
|
||||
return obj
|
||||
}
|
||||
|
||||
function isObj(x) { return typeof x === 'object' } // faster as a function
|
||||
|
||||
// Hacked version of https://github.com/lemire/FastPriorityQueue.js
|
||||
var fastpriorityqueue=function(){var r=[],o=0,e={};function n(){for(var e=0,n=r[e],c=1;c<o;){var f=c+1;e=c,f<o&&r[f].score<r[c].score&&(e=f),r[e-1>>1]=r[e],c=1+(e<<1)}for(var a=e-1>>1;e>0&&n.score<r[a].score;a=(e=a)-1>>1)r[e]=r[a];r[e]=n}return e.add=function(e){var n=o;r[o++]=e;for(var c=n-1>>1;n>0&&e.score<r[c].score;c=(n=c)-1>>1)r[n]=r[c];r[n]=e},e.poll=function(){if(0!==o){var e=r[0];return r[0]=r[--o],n(),e}},e.peek=function(e){if(0!==o)return r[0]},e.replaceTop=function(o){r[0]=o,n()},e};
|
||||
var q = fastpriorityqueue() // reuse this, except for async, it needs to make its own
|
||||
|
||||
return fuzzysortNew()
|
||||
}) // UMD
|
||||
|
||||
// TODO: (performance) wasm version!?
|
||||
|
||||
// TODO: (performance) layout memory in an optimal way to go fast by avoiding cache misses
|
||||
|
||||
// TODO: (performance) preparedCache is a memory leak
|
||||
|
||||
// TODO: (like sublime) backslash === forwardslash
|
||||
|
||||
// TODO: (performance) i have no idea how well optizmied the allowing typos algorithm is
|
|
@ -0,0 +1,111 @@
|
|||
|
||||
.CodeMirror-merge {
|
||||
position: relative;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
|
||||
min-height:50px;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
|
||||
|
||||
.CodeMirror-merge-pane {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
.CodeMirror-merge-pane-rightmost {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-gap {
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #515151;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-scrolllock-wrap {
|
||||
position: absolute;
|
||||
bottom: 0; left: 50%;
|
||||
}
|
||||
.CodeMirror-merge-scrolllock {
|
||||
position: relative;
|
||||
left: -50%;
|
||||
cursor: pointer;
|
||||
color: #d8d8d8;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
right: 0; bottom: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #ce374b;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy-reverse {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
|
||||
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
|
||||
|
||||
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-chunk { background: #9a6868; }
|
||||
.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
|
||||
.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
|
||||
.CodeMirror-merge-r-connect { fill:#9a6868;}
|
||||
|
||||
.CodeMirror-merge-l-chunk { background: #eef; }
|
||||
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
|
||||
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
|
||||
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
|
||||
|
||||
.CodeMirror-merge-collapsed-widget:before {
|
||||
content: "(...)";
|
||||
}
|
||||
.CodeMirror-merge-collapsed-widget {
|
||||
cursor: pointer;
|
||||
color: #88b;
|
||||
background: #eef;
|
||||
border: 1px solid #ddf;
|
||||
font-size: 90%;
|
||||
padding: 0 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,692 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// mode javascript
|
||||
// TODO actually recognize syntax of TypeScript constructs
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
var jsonldMode = parserConfig.jsonld;
|
||||
var jsonMode = parserConfig.json || jsonldMode;
|
||||
var isTS = parserConfig.typescript;
|
||||
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
|
||||
|
||||
// Tokenizer
|
||||
|
||||
var keywords = function(){
|
||||
function kw(type) {return {type: type, style: "keyword"};}
|
||||
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
|
||||
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
||||
|
||||
var jsKeywords = {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
|
||||
"var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C
|
||||
};
|
||||
|
||||
// Extend the 'normal' keywords with the TypeScript language extensions
|
||||
if (isTS) {
|
||||
var type = {type: "variable", style: "variable-3"};
|
||||
var tsKeywords = {
|
||||
// object-like things
|
||||
"interface": kw("interface"),
|
||||
"extends": kw("extends"),
|
||||
"constructor": kw("constructor"),
|
||||
|
||||
// scope modifiers
|
||||
"public": kw("public"),
|
||||
"private": kw("private"),
|
||||
"protected": kw("protected"),
|
||||
"static": kw("static"),
|
||||
|
||||
// types
|
||||
"string": type, "number": type, "bool": type, "any": type
|
||||
};
|
||||
|
||||
for (var attr in tsKeywords) {
|
||||
jsKeywords[attr] = tsKeywords[attr];
|
||||
}
|
||||
}
|
||||
|
||||
return jsKeywords;
|
||||
}();
|
||||
|
||||
var isOperatorChar = /[+\-*&%=<>!?|~^]/;
|
||||
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
|
||||
|
||||
function readRegexp(stream) {
|
||||
var escaped = false, next, inSet = false;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped) {
|
||||
if (next == "/" && !inSet) return;
|
||||
if (next == "[") inSet = true;
|
||||
else if (inSet && next == "]") inSet = false;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
}
|
||||
|
||||
// Used as scratch variables to communicate multiple values without
|
||||
// consing up tons of objects.
|
||||
var type, content;
|
||||
function ret(tp, style, cont) {
|
||||
type = tp; content = cont;
|
||||
return style;
|
||||
}
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '"' || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
|
||||
return ret("number", "number");
|
||||
} else if (ch == "." && stream.match("..")) {
|
||||
return ret("spread", "meta");
|
||||
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
return ret(ch);
|
||||
} else if (ch == "=" && stream.eat(">")) {
|
||||
return ret("=>", "operator");
|
||||
} else if (ch == "0" && stream.eat(/x/i)) {
|
||||
stream.eatWhile(/[\da-f]/i);
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
} else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
} else if (state.lastType == "operator" || state.lastType == "keyword c" ||
|
||||
state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
} else {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", "operator", stream.current());
|
||||
}
|
||||
} else if (ch == "`") {
|
||||
state.tokenize = tokenQuasi;
|
||||
return tokenQuasi(stream, state);
|
||||
} else if (ch == "#") {
|
||||
stream.skipToEnd();
|
||||
return ret("error", "error");
|
||||
} else if (isOperatorChar.test(ch)) {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", "operator", stream.current());
|
||||
} else if (wordRE.test(ch)) {
|
||||
stream.eatWhile(wordRE);
|
||||
var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
|
||||
return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
|
||||
ret("variable", "variable", word);
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, next;
|
||||
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
|
||||
state.tokenize = tokenBase;
|
||||
return ret("jsonld-keyword", "meta");
|
||||
}
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == quote && !escaped) break;
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
if (!escaped) state.tokenize = tokenBase;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
|
||||
function tokenQuasi(stream, state) {
|
||||
var escaped = false, next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
return ret("quasi", "string-2", stream.current());
|
||||
}
|
||||
|
||||
var brackets = "([{}])";
|
||||
// This is a crude lookahead trick to try and notice that we're
|
||||
// parsing the argument patterns for a fat-arrow function before we
|
||||
// actually hit the arrow token. It only works if the arrow is on
|
||||
// the same line as the arguments and there's no strange noise
|
||||
// (comments) in between. Fallback is to only notice when we hit the
|
||||
// arrow, and not declare the arguments as locals for the arrow
|
||||
// body.
|
||||
function findFatArrow(stream, state) {
|
||||
if (state.fatArrowAt) state.fatArrowAt = null;
|
||||
var arrow = stream.string.indexOf("=>", stream.start);
|
||||
if (arrow < 0) return;
|
||||
|
||||
var depth = 0, sawSomething = false;
|
||||
for (var pos = arrow - 1; pos >= 0; --pos) {
|
||||
var ch = stream.string.charAt(pos);
|
||||
var bracket = brackets.indexOf(ch);
|
||||
if (bracket >= 0 && bracket < 3) {
|
||||
if (!depth) { ++pos; break; }
|
||||
if (--depth == 0) break;
|
||||
} else if (bracket >= 3 && bracket < 6) {
|
||||
++depth;
|
||||
} else if (wordRE.test(ch)) {
|
||||
sawSomething = true;
|
||||
} else if (/["'\/]/.test(ch)) {
|
||||
return;
|
||||
} else if (sawSomething && !depth) {
|
||||
++pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sawSomething && !depth) state.fatArrowAt = pos;
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
|
||||
|
||||
function JSLexical(indented, column, type, align, prev, info) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.prev = prev;
|
||||
this.info = info;
|
||||
if (align != null) this.align = align;
|
||||
}
|
||||
|
||||
function inScope(state, varname) {
|
||||
for (var v = state.localVars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
for (var cx = state.context; cx; cx = cx.prev) {
|
||||
for (var v = cx.vars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
}
|
||||
}
|
||||
|
||||
function parseJS(state, style, type, content, stream) {
|
||||
var cc = state.cc;
|
||||
// Communicate our context to the combinators.
|
||||
// (Less wasteful than consing up a hundred closures on every call.)
|
||||
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
|
||||
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = true;
|
||||
|
||||
while(true) {
|
||||
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
|
||||
if (combinator(type, content)) {
|
||||
while(cc.length && cc[cc.length - 1].lex)
|
||||
cc.pop()();
|
||||
if (cx.marked) return cx.marked;
|
||||
if (type == "variable" && inScope(state, content)) return "variable-2";
|
||||
return style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combinator utils
|
||||
|
||||
var cx = {state: null, column: null, marked: null, cc: null};
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function register(varname) {
|
||||
function inList(list) {
|
||||
for (var v = list; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
return false;
|
||||
}
|
||||
var state = cx.state;
|
||||
if (state.context) {
|
||||
cx.marked = "def";
|
||||
if (inList(state.localVars)) return;
|
||||
state.localVars = {name: varname, next: state.localVars};
|
||||
} else {
|
||||
if (inList(state.globalVars)) return;
|
||||
if (parserConfig.globalVars)
|
||||
state.globalVars = {name: varname, next: state.globalVars};
|
||||
}
|
||||
}
|
||||
|
||||
// Combinators
|
||||
|
||||
var defaultVars = {name: "this", next: {name: "arguments"}};
|
||||
function pushcontext() {
|
||||
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
|
||||
cx.state.localVars = defaultVars;
|
||||
}
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars;
|
||||
cx.state.context = cx.state.context.prev;
|
||||
}
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
if (state.lexical.type == "stat") indent = state.lexical.indented;
|
||||
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
|
||||
indent = outer.indented;
|
||||
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
||||
};
|
||||
result.lex = true;
|
||||
return result;
|
||||
}
|
||||
function poplex() {
|
||||
var state = cx.state;
|
||||
if (state.lexical.prev) {
|
||||
if (state.lexical.type == ")")
|
||||
state.indented = state.lexical.indented;
|
||||
state.lexical = state.lexical.prev;
|
||||
}
|
||||
}
|
||||
poplex.lex = true;
|
||||
|
||||
function expect(wanted) {
|
||||
function exp(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";") return pass();
|
||||
else return cont(exp);
|
||||
};
|
||||
return exp;
|
||||
}
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "{") return cont(pushlex("}"), block, poplex);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
cx.state.cc.pop()();
|
||||
return cont(pushlex("form"), expression, statement, poplex, maybeelse);
|
||||
}
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
||||
if (type == "variable") return cont(pushlex("stat"), maybelabel);
|
||||
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
|
||||
block, poplex, poplex);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
||||
statement, poplex, popcontext);
|
||||
if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
|
||||
if (type == "class") return cont(pushlex("form"), className, poplex);
|
||||
if (type == "export") return cont(pushlex("form"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("form"), afterImport, poplex);
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function expression(type) {
|
||||
return expressionInner(type, false);
|
||||
}
|
||||
function expressionNoComma(type) {
|
||||
return expressionInner(type, true);
|
||||
}
|
||||
function expressionInner(type, noComma) {
|
||||
if (cx.state.fatArrowAt == cx.stream.start) {
|
||||
var body = noComma ? arrowBodyNoComma : arrowBody;
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
|
||||
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
|
||||
}
|
||||
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef, maybeop);
|
||||
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
|
||||
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
||||
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
||||
if (type == "quasi") { return pass(quasi, maybeop); }
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expression);
|
||||
}
|
||||
function maybeexpressionNoComma(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expressionNoComma);
|
||||
}
|
||||
|
||||
function maybeoperatorComma(type, value) {
|
||||
if (type == ",") return cont(expression);
|
||||
return maybeoperatorNoComma(type, value, false);
|
||||
}
|
||||
function maybeoperatorNoComma(type, value, noComma) {
|
||||
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
||||
var expr = noComma == false ? expression : expressionNoComma;
|
||||
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
||||
if (type == "operator") {
|
||||
if (/\+\+|--/.test(value)) return cont(me);
|
||||
if (value == "?") return cont(expression, expect(":"), expr);
|
||||
return cont(expr);
|
||||
}
|
||||
if (type == "quasi") { return pass(quasi, me); }
|
||||
if (type == ";") return;
|
||||
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
|
||||
if (type == ".") return cont(property, me);
|
||||
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
||||
}
|
||||
function quasi(type, value) {
|
||||
if (type != "quasi") return pass();
|
||||
if (value.slice(value.length - 2) != "${") return cont(quasi);
|
||||
return cont(expression, continueQuasi);
|
||||
}
|
||||
function continueQuasi(type) {
|
||||
if (type == "}") {
|
||||
cx.marked = "string-2";
|
||||
cx.state.tokenize = tokenQuasi;
|
||||
return cont(quasi);
|
||||
}
|
||||
}
|
||||
function arrowBody(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expression);
|
||||
}
|
||||
function arrowBodyNoComma(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expressionNoComma);
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
}
|
||||
function property(type) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
return cont(afterprop);
|
||||
} else if (type == "number" || type == "string") {
|
||||
cx.marked = jsonldMode ? "property" : (cx.style + " property");
|
||||
return cont(afterprop);
|
||||
} else if (type == "jsonld-keyword") {
|
||||
return cont(afterprop);
|
||||
} else if (type == "[") {
|
||||
return cont(expression, expect("]"), afterprop);
|
||||
}
|
||||
}
|
||||
function getterSetter(type) {
|
||||
if (type != "variable") return pass(afterprop);
|
||||
cx.marked = "property";
|
||||
return cont(functiondef);
|
||||
}
|
||||
function afterprop(type) {
|
||||
if (type == ":") return cont(expressionNoComma);
|
||||
if (type == "(") return pass(functiondef);
|
||||
}
|
||||
function commasep(what, end) {
|
||||
function proceed(type) {
|
||||
if (type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(what, proceed);
|
||||
}
|
||||
if (type == end) return cont();
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type) {
|
||||
if (type == end) return cont();
|
||||
return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
function contCommasep(what, end, info) {
|
||||
for (var i = 3; i < arguments.length; i++)
|
||||
cx.cc.push(arguments[i]);
|
||||
return cont(pushlex(end, info), commasep(what, end), poplex);
|
||||
}
|
||||
function block(type) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type) {
|
||||
if (isTS && type == ":") return cont(typedef);
|
||||
}
|
||||
function typedef(type) {
|
||||
if (type == "variable"){cx.marked = "variable-3"; return cont();}
|
||||
}
|
||||
function vardef() {
|
||||
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
||||
}
|
||||
function pattern(type, value) {
|
||||
if (type == "variable") { register(value); return cont(); }
|
||||
if (type == "[") return contCommasep(pattern, "]");
|
||||
if (type == "{") return contCommasep(proppattern, "}");
|
||||
}
|
||||
function proppattern(type, value) {
|
||||
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
|
||||
register(value);
|
||||
return cont(maybeAssign);
|
||||
}
|
||||
if (type == "variable") cx.marked = "property";
|
||||
return cont(expect(":"), pattern, maybeAssign);
|
||||
}
|
||||
function maybeAssign(_type, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
}
|
||||
function vardefCont(type) {
|
||||
if (type == ",") return cont(vardef);
|
||||
}
|
||||
function maybeelse(type, value) {
|
||||
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
||||
}
|
||||
function forspec(type) {
|
||||
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
||||
}
|
||||
function forspec1(type) {
|
||||
if (type == "var") return cont(vardef, expect(";"), forspec2);
|
||||
if (type == ";") return cont(forspec2);
|
||||
if (type == "variable") return cont(formaybeinof);
|
||||
return pass(expression, expect(";"), forspec2);
|
||||
}
|
||||
function formaybeinof(_type, value) {
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return cont(maybeoperatorComma, forspec2);
|
||||
}
|
||||
function forspec2(type, value) {
|
||||
if (type == ";") return cont(forspec3);
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return pass(expression, expect(";"), forspec3);
|
||||
}
|
||||
function forspec3(type) {
|
||||
if (type != ")") cont(expression);
|
||||
}
|
||||
function functiondef(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
|
||||
}
|
||||
function funarg(type) {
|
||||
if (type == "spread") return cont(funarg);
|
||||
return pass(pattern, maybetype);
|
||||
}
|
||||
function className(type, value) {
|
||||
if (type == "variable") {register(value); return cont(classNameAfter);}
|
||||
}
|
||||
function classNameAfter(type, value) {
|
||||
if (value == "extends") return cont(expression, classNameAfter);
|
||||
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
||||
}
|
||||
function classBody(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
|
||||
return cont(functiondef, classBody);
|
||||
}
|
||||
if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (type == ";") return cont(classBody);
|
||||
if (type == "}") return cont();
|
||||
}
|
||||
function classGetterSetter(type) {
|
||||
if (type != "variable") return pass();
|
||||
cx.marked = "property";
|
||||
return cont();
|
||||
}
|
||||
function afterModule(type, value) {
|
||||
if (type == "string") return cont(statement);
|
||||
if (type == "variable") { register(value); return cont(maybeFrom); }
|
||||
}
|
||||
function afterExport(_type, value) {
|
||||
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
|
||||
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
|
||||
return pass(statement);
|
||||
}
|
||||
function afterImport(type) {
|
||||
if (type == "string") return cont();
|
||||
return pass(importSpec, maybeFrom);
|
||||
}
|
||||
function importSpec(type, value) {
|
||||
if (type == "{") return contCommasep(importSpec, "}");
|
||||
if (type == "variable") register(value);
|
||||
return cont();
|
||||
}
|
||||
function maybeFrom(_type, value) {
|
||||
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
|
||||
}
|
||||
function arrayLiteral(type) {
|
||||
if (type == "]") return cont();
|
||||
return pass(expressionNoComma, maybeArrayComprehension);
|
||||
}
|
||||
function maybeArrayComprehension(type) {
|
||||
if (type == "for") return pass(comprehension, expect("]"));
|
||||
if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
|
||||
return pass(commasep(expressionNoComma, "]"));
|
||||
}
|
||||
function comprehension(type) {
|
||||
if (type == "for") return cont(forspec, comprehension);
|
||||
if (type == "if") return cont(expression, comprehension);
|
||||
}
|
||||
|
||||
function isContinuedStatement(state, textAfter) {
|
||||
return state.lastType == "operator" || state.lastType == "," ||
|
||||
isOperatorChar.test(textAfter.charAt(0)) ||
|
||||
/[,.]/.test(textAfter.charAt(0));
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
var state = {
|
||||
tokenize: tokenBase,
|
||||
lastType: "sof",
|
||||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
||||
indented: 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
state.globalVars = parserConfig.globalVars;
|
||||
return state;
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = false;
|
||||
state.indented = stream.indentation();
|
||||
findFatArrow(stream, state);
|
||||
}
|
||||
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if (type == "comment") return style;
|
||||
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
||||
return parseJS(state, style, type, content, stream);
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == tokenComment) return CodeMirror.Pass;
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse) break;
|
||||
}
|
||||
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
|
||||
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
||||
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
||||
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
||||
else return lexical.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
||||
blockCommentStart: jsonMode ? null : "/*",
|
||||
blockCommentEnd: jsonMode ? null : "*/",
|
||||
lineComment: jsonMode ? null : "//",
|
||||
fold: "brace",
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonldMode: jsonldMode,
|
||||
jsonMode: jsonMode
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
|
||||
|
||||
CodeMirror.defineMIME("text/javascript", "javascript");
|
||||
CodeMirror.defineMIME("text/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/x-javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
|
||||
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
||||
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
||||
|
||||
});
|
|
@ -0,0 +1,429 @@
|
|||
//需求:表情栏可以隐藏显示,高度只要一点高
|
||||
function sd_create_editor(params){
|
||||
// var minHeight; //最小高度
|
||||
var paramsHeight = params.height; //设定的高度
|
||||
var id = arguments[1] ? arguments[1] : undefined;
|
||||
var type = arguments[2] ? arguments[2] : '';
|
||||
var paramsWidth = params.width == undefined ? "100%" : params.width;
|
||||
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"94%",
|
||||
height:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||
width:params.width,
|
||||
/*
|
||||
items:['emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','more'],*/
|
||||
items : ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview',"more"
|
||||
],
|
||||
afterChange:function(){//按键事件
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(paramsHeight);
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+7)) , paramsHeight));
|
||||
},
|
||||
afterBlur:function(){
|
||||
//params.toolbar_container.hide();
|
||||
params.textarea.blur();
|
||||
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
if(this.isEmpty()) {
|
||||
this.edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
|
||||
}
|
||||
//params.toolbar_container.hide();
|
||||
$('#reply_image_' + id).addClass('imageFuzzy');
|
||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
|
||||
params.submit_btn.hide();
|
||||
params.toolbar_container.hide();
|
||||
this.resize("100%", null);
|
||||
}else if(this.edit.html().trim() != ""){
|
||||
params.submit_btn.show();
|
||||
params.toolbar_container.show();
|
||||
}
|
||||
|
||||
//params.submit_btn.css("display","none");
|
||||
|
||||
},
|
||||
afterFocus: function(){
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
|
||||
edit.html('');
|
||||
}
|
||||
params.submit_btn.show();
|
||||
params.contentmsg.hide();
|
||||
params.toolbar_container.show();
|
||||
// params.toolbar_container.show();
|
||||
$('#reply_image_' + id).removeClass('imageFuzzy');
|
||||
//edit.iframe.width(paramsWidth);
|
||||
|
||||
this.resize("100%", null);
|
||||
this.resize(paramsWidth, null);
|
||||
//params.submit_btn.show();
|
||||
|
||||
},
|
||||
|
||||
afterCreate:function(){
|
||||
//params.submit_btn.hide();
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
toolbar.css('display','inline');
|
||||
toolbar.css('padding',0);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
params.toolbar_container.hide();
|
||||
params.submit_btn.hide();
|
||||
//init
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
body.style.overflowY = 'hidden';
|
||||
//reset height
|
||||
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
|
||||
edit.iframe.height(paramsHeight);
|
||||
edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
|
||||
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
|
||||
// params.toolbar_container.hide();
|
||||
if(typeof enableAt === 'function'){
|
||||
enableAt(this, id, type);
|
||||
}
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function sd_create_shixun_editor(params){
|
||||
// var minHeight; //最小高度
|
||||
var paramsHeight = params.height; //设定的高度
|
||||
var id = arguments[1] ? arguments[1] : undefined;
|
||||
var type = arguments[2] ? arguments[2] : '';
|
||||
var paramsWidth = params.width == undefined ? "100%" : params.width;
|
||||
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"94%",
|
||||
height:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
|
||||
width:params.width,
|
||||
/*
|
||||
items:['emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','more'],*/
|
||||
items : ['imagedirectupload'],
|
||||
afterChange:function(){//按键事件
|
||||
if(this.isEmpty() || this.edit.doc.body.innerText == '说点什么') {
|
||||
$('#mini_comment_section').height('auto')
|
||||
} else {
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
var newHeight = 0;
|
||||
|
||||
var FF = !(window.mozInnerScreenX == null);
|
||||
if (FF) { // 火狐下处理方式不一样
|
||||
newHeight = $(body).height()
|
||||
} else {
|
||||
$(body).children().each(function(){newHeight+=$(this).height()});
|
||||
}
|
||||
// var newHeight = $(body).height()
|
||||
|
||||
var maxHeight = 357 // $(window).height() - 150 - 57; // 150 上部距离 57 下部距离
|
||||
|
||||
newHeight = newHeight <= maxHeight ? newHeight : maxHeight
|
||||
|
||||
|
||||
if (newHeight > 150) {
|
||||
if (FF) { // 火狐下处理方式不一样
|
||||
this.resize("100%", (newHeight + 20) + 'px');
|
||||
} else {
|
||||
this.resize("100%", newHeight + 'px');
|
||||
}
|
||||
$('#mini_comment_section').height(newHeight+57)
|
||||
} else {
|
||||
this.resize("100%", '150px');
|
||||
$('#mini_comment_section').height('auto')
|
||||
}
|
||||
}
|
||||
|
||||
//edit.iframe.height(paramsHeight);
|
||||
//this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+7)) , 15));
|
||||
},
|
||||
afterBlur:function(){
|
||||
//params.toolbar_container.hide();
|
||||
params.textarea.blur();
|
||||
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
if(this.isEmpty()) {
|
||||
$('#mini_comment_section').height('auto')
|
||||
this.edit.html("<span id='hint' style='color:#999999;font-size:14px;'>说点什么</span>");
|
||||
params.submit_btn.hide();
|
||||
params.toolbar_container.hide();
|
||||
this.resize("100%", "30px");
|
||||
$("#dis_reply_id").val("");
|
||||
if($("#editor_panel").length>0){
|
||||
$("#editor_panel").attr("style","margin-top:9px;flex: 1;");
|
||||
$("#editor_panel").parents("form").addClass("df")
|
||||
}
|
||||
}
|
||||
//params.toolbar_container.hide();
|
||||
/*$('#reply_image_' + id).addClass('imageFuzzy');
|
||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
|
||||
params.submit_btn.hide();
|
||||
params.toolbar_container.hide();
|
||||
this.resize("100%", "30px");
|
||||
}else if(this.edit.html().trim() != ""){
|
||||
params.submit_btn.show();
|
||||
params.toolbar_container.show();
|
||||
}*/
|
||||
//params.submit_btn.css("display","none");
|
||||
|
||||
// $('#mini_comment_section').height('auto')
|
||||
},
|
||||
afterFocus: function(){
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
|
||||
edit.html("");
|
||||
}
|
||||
params.submit_btn.show();
|
||||
params.contentmsg.hide();
|
||||
params.toolbar_container.show();
|
||||
// params.toolbar_container.show();
|
||||
$('#reply_image_' + id).removeClass('imageFuzzy');
|
||||
//edit.iframe.width(paramsWidth);
|
||||
|
||||
var newHeight = $(body).height()
|
||||
if (newHeight < 150) {
|
||||
this.resize("100%", "150px");
|
||||
this.resize(paramsWidth, "150px");
|
||||
}
|
||||
if($("#editor_panel").length>0){
|
||||
$("#editor_panel").attr("style","width:100%;margin-top:9px;");
|
||||
$("#editor_panel").parents("form").removeClass("df")
|
||||
}
|
||||
//params.submit_btn.show();
|
||||
|
||||
// $('#mini_comment_section').height('244px')
|
||||
},
|
||||
|
||||
afterCreate:function(){
|
||||
//params.submit_btn.hide();
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
toolbar.css('display','inline');
|
||||
toolbar.css('padding',0);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
params.toolbar_container.hide();
|
||||
params.submit_btn.hide();
|
||||
//init
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
// body.style.overflowY = 'hidden';
|
||||
body.style['padding-top']= '2px';
|
||||
body.style['padding-left']= '5px';
|
||||
// <style type='text/css'>body{padding-top: 2px;padding-left: 5px;}</style>
|
||||
//reset height
|
||||
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
|
||||
edit.iframe.height(paramsHeight);
|
||||
edit.html("<span id='hint' style='color:#999999;font-size:14px;'>说点什么</span>");
|
||||
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
|
||||
// params.toolbar_container.hide();
|
||||
if(typeof enableAt === 'function'){
|
||||
enableAt(this, id, type);
|
||||
}
|
||||
|
||||
var iframe = edit.iframe[0]
|
||||
$(iframe.contentDocument.head).append(
|
||||
$("<style type='text/css'>::-webkit-scrollbar{height: 10px;width: 6px !important;background: rgba(0,0,0,.1) !important;} ::-webkit-scrollbar-thumb {border-radius: 6px;background: #ADADAD;};</style>"));
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function sd_check_editor_form_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function sd_create_form(params){
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = sd_check_editor_form_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function sd_reset_editor_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
//第二个参数是高度,可以传,可以不传
|
||||
function sd_create_editor_from_data(id){
|
||||
var height = arguments[1] ? arguments[1] : undefined;
|
||||
var width = arguments[2] ? arguments[2] : undefined;
|
||||
var type = arguments[3] ? arguments[3] : undefined;
|
||||
// KindEditor.ready(function (K) {
|
||||
// react 环境不需要ready方法,页面已经加载完了才执行sd_create_editor_from_data
|
||||
var K = KindEditor;
|
||||
$("div[nhname='new_message_" + id + "']").each(function () {
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form", params.div_form);
|
||||
if (params.form == undefined || params.form.length == 0) {
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
|
||||
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn_" + id);
|
||||
params.submit_btn = $("#new_message_submit_btn_" + id);
|
||||
params.height = height;
|
||||
params.width = width;
|
||||
if (params.textarea.data('init') == undefined) {
|
||||
params.editor = sd_create_editor(params,id, type);
|
||||
sd_create_form(params);
|
||||
params.cancel_btn.click(function () {
|
||||
sd_reset_editor_form(params);
|
||||
});
|
||||
params.submit_btn.click(function () {
|
||||
var tContents = $("#comment_news_" + id).val();
|
||||
if(tContents != undefined){
|
||||
var beforeImage = tContents.split("<img");
|
||||
var afterImage = tContents.split("/>");
|
||||
if(beforeImage[0] == "" && afterImage[1] == ""){
|
||||
notice_box('不支持纯图片评论<br/>请在评论中增加文字信息');
|
||||
return;
|
||||
}
|
||||
|
||||
if (tContents.startsWith('<') && tContents.endsWith('>')
|
||||
&& (tContents.indexOf('<link') != -1 || tContents.indexOf('<script') != -1 )) {
|
||||
notice_box('不支持包含link或script标签的html内容');
|
||||
return;
|
||||
}
|
||||
}
|
||||
// react环境下,发消息给react组件
|
||||
if (window['__isR'] === true) {
|
||||
$(document).trigger("onReply", { commentContent:tContents, id:id, editor:params.editor } );
|
||||
} else {
|
||||
params.form.submit();
|
||||
}
|
||||
});
|
||||
params.textarea.focus(function (){
|
||||
params.editor.focus();
|
||||
});
|
||||
params.textarea.data('init', 1);
|
||||
$(this).show();
|
||||
|
||||
__editor = params.editor
|
||||
}
|
||||
});
|
||||
// });
|
||||
|
||||
div_form = $("div[nhname='new_message_" + id + "']");
|
||||
$(".ke-edit", div_form).css("height","33px");
|
||||
$(".ke-edit-iframe",div_form).css("height","33px");
|
||||
|
||||
return __editor;
|
||||
}
|
||||
|
||||
|
||||
//第二个参数是高度,可以传,可以不传
|
||||
function sd_create_editor_from_shixun_data(id){
|
||||
var height = arguments[1] ? arguments[1] : undefined;
|
||||
var width = arguments[2] ? arguments[2] : undefined;
|
||||
var type = arguments[3] ? arguments[3] : undefined;
|
||||
// KindEditor.ready(function (K) {
|
||||
// react 环境不需要ready方法,页面已经加载完了才执行sd_create_editor_from_data
|
||||
var K = KindEditor;
|
||||
|
||||
$("div[nhname='new_message_" + id + "']").each(function () {
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form", params.div_form);
|
||||
if (params.form == undefined || params.form.length == 0) {
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
|
||||
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn_" + id);
|
||||
params.submit_btn = $("#new_message_submit_btn_" + id);
|
||||
params.height = height;
|
||||
params.width = width;
|
||||
if (params.textarea.data('init') == undefined) {
|
||||
params.editor = sd_create_shixun_editor(params,id, type);
|
||||
window._commentInput = params.editor;
|
||||
sd_create_form(params);
|
||||
params.cancel_btn.click(function () {
|
||||
sd_reset_editor_form(params);
|
||||
});
|
||||
// 在react组件中hide
|
||||
// params.submit_btn.click(function () {
|
||||
// $(this).hide()
|
||||
// });
|
||||
// 非react环境才监听这个click
|
||||
!window['__isR'] && params.submit_btn.click(function () {
|
||||
var tContents = $("#comment_news_" + id).val();
|
||||
|
||||
if(tContents != undefined){
|
||||
var beforeImage = tContents.split("<img");
|
||||
var afterImage = tContents.split("/>");
|
||||
if(beforeImage[0] == "" && afterImage[1] == ""){
|
||||
notice_box('不支持纯图片评论<br/>请在评论中增加文字信息');
|
||||
return;
|
||||
}
|
||||
}
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.focus(function (){
|
||||
params.editor.focus();
|
||||
});
|
||||
params.textarea.data('init', 1);
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
// });
|
||||
|
||||
div_form = $("div[nhname='new_message_" + id + "']");
|
||||
$(".ke-edit", div_form).css("height","33px");
|
||||
$(".ke-edit-iframe",div_form).css("height","33px");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
/*!
|
||||
* Cropper.js v1.5.2
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2019-06-30T06:01:02.389Z
|
||||
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,49 @@
|
|||
(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}
|
||||
diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,
|
||||
b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};
|
||||
diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100<a.length&&100<b.length?this.diff_lineMode_(a,b,
|
||||
d):this.diff_bisect_(a,b,d)};
|
||||
diff_match_patch.prototype.diff_lineMode_=function(a,b,c){var d=this.diff_linesToChars_(a,b);a=d.chars1;b=d.chars2;d=d.lineArray;a=this.diff_main(a,b,!1,c);this.diff_charsToLines_(a,d);this.diff_cleanupSemantic(a);a.push([0,""]);for(var e=d=b=0,f="",g="";b<a.length;){switch(a[b][0]){case 1:e++;g+=a[b][1];break;case -1:d++;f+=a[b][1];break;case 0:if(1<=d&&1<=e){a.splice(b-d-e,d+e);b=b-d-e;d=this.diff_main(f,g,!1,c);for(e=d.length-1;0<=e;e--)a.splice(b,0,d[e]);b+=d.length}d=e=0;g=f=""}b++}a.pop();return a};
|
||||
diff_match_patch.prototype.diff_bisect_=function(a,b,c){for(var d=a.length,e=b.length,f=Math.ceil((d+e)/2),g=f,h=2*f,j=Array(h),i=Array(h),k=0;k<h;k++)j[k]=-1,i[k]=-1;j[g+1]=0;i[g+1]=0;for(var k=d-e,q=0!=k%2,r=0,t=0,p=0,w=0,v=0;v<f&&!((new Date).getTime()>c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]<j[l+1]?j[l+1]:j[l-1]+1;for(var s=m-n;m<d&&s<e&&a.charAt(m)==b.charAt(s);)m++,s++;j[l]=m;if(m>d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l<h&&-1!=i[l])){var u=d-i[l];if(m>=
|
||||
u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]<i[l+1]?i[l+1]:i[l-1]+1;for(m=u-n;u<d&&m<e&&a.charAt(d-u-1)==b.charAt(e-m-1);)u++,m++;i[l]=u;if(u>d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l<h&&-1!=j[l])&&(m=j[l],s=g+m-l,u=d-u,m>=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};
|
||||
diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};
|
||||
diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;f<a.length-1;){f=a.indexOf("\n",c);-1==f&&(f=a.length-1);var r=a.substring(c,f+1),c=f+1;(e.hasOwnProperty?e.hasOwnProperty(r):void 0!==e[r])?b+=String.fromCharCode(e[r]):(b+=String.fromCharCode(g),e[r]=g,d[g++]=r)}return b}var d=[],e={};d[0]="";var f=c(a),g=c(b);return{chars1:f,chars2:g,lineArray:d}};
|
||||
diff_match_patch.prototype.diff_charsToLines_=function(a,b){for(var c=0;c<a.length;c++){for(var d=a[c][1],e=[],f=0;f<d.length;f++)e[f]=b[d.charCodeAt(f)];a[c][1]=e.join("")}};diff_match_patch.prototype.diff_commonPrefix=function(a,b){if(!a||!b||a.charAt(0)!=b.charAt(0))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(f,e)==b.substring(f,e)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
|
||||
diff_match_patch.prototype.diff_commonSuffix=function(a,b){if(!a||!b||a.charAt(a.length-1)!=b.charAt(b.length-1))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(a.length-e,a.length-f)==b.substring(b.length-e,b.length-f)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
|
||||
diff_match_patch.prototype.diff_commonOverlap_=function(a,b){var c=a.length,d=b.length;if(0==c||0==d)return 0;c>d?a=a.substring(c-d):c<d&&(b=b.substring(0,c));c=Math.min(c,d);if(a==b)return c;for(var d=0,e=1;;){var f=a.substring(c-e),f=b.indexOf(f);if(-1==f)return d;e+=f;if(0==f||a.substring(c-e)==b.substring(0,e))d=e,e++}};
|
||||
diff_match_patch.prototype.diff_halfMatch_=function(a,b){function c(a,b,c){for(var d=a.substring(c,c+Math.floor(a.length/4)),e=-1,g="",h,j,n,l;-1!=(e=b.indexOf(d,e+1));){var m=f.diff_commonPrefix(a.substring(c),b.substring(e)),s=f.diff_commonSuffix(a.substring(0,c),b.substring(0,e));g.length<s+m&&(g=b.substring(e-s,e)+b.substring(e,e+m),h=a.substring(0,c-s),j=a.substring(c+m),n=b.substring(0,e-s),l=b.substring(e+m))}return 2*g.length>=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;
|
||||
var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.length<d.length)return null;var f=this,g=c(d,e,Math.ceil(d.length/4)),d=c(d,e,Math.ceil(d.length/2)),h;if(!g&&!d)return null;h=d?g?g[4].length>d[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};
|
||||
diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f<a.length;)0==a[f][0]?(c[d++]=f,g=j,h=i,i=j=0,e=a[f][1]):(1==a[f][0]?j+=a[f][1].length:i+=a[f][1].length,e&&(e.length<=Math.max(g,h)&&e.length<=Math.max(j,i))&&(a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,d--,f=0<d?c[d-1]:-1,i=j=h=g=0,e=null,b=!0)),f++;b&&this.diff_cleanupMerge(a);this.diff_cleanupSemanticLossless(a);for(f=1;f<a.length;){if(-1==a[f-1][0]&&1==a[f][0]){b=a[f-1][1];c=a[f][1];
|
||||
d=this.diff_commonOverlap_(b,c);e=this.diff_commonOverlap_(c,b);if(d>=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};
|
||||
diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);
|
||||
return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c<a.length-1;){if(0==a[c-1][0]&&0==a[c+1][0]){var d=a[c-1][1],e=a[c][1],f=a[c+1][1],g=this.diff_commonSuffix(d,e);if(g)var h=e.substring(e.length-g),d=d.substring(0,d.length-g),e=h+e.substring(0,e.length-g),f=h+f;for(var g=d,h=e,j=f,i=b(d,e)+b(e,f);e.charAt(0)===f.charAt(0);){var d=d+e.charAt(0),e=e.substring(1)+f.charAt(0),f=f.substring(1),k=b(d,e)+b(e,f);k>=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=
|
||||
h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;
|
||||
diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;f<a.length;){if(0==a[f][0])a[f][1].length<this.Diff_EditCost&&(j||i)?(c[d++]=f,g=j,h=i,e=a[f][1]):(d=0,e=null),j=i=!1;else if(-1==a[f][0]?i=!0:j=!0,e&&(g&&h&&j&&i||e.length<this.Diff_EditCost/2&&3==g+h+j+i))a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,e=null,g&&h?(j=i=!0,d=0):(d--,f=0<d?c[d-1]:-1,j=i=!1),b=!0;f++}b&&this.diff_cleanupMerge(a)};
|
||||
diff_match_patch.prototype.diff_cleanupMerge=function(a){a.push([0,""]);for(var b=0,c=0,d=0,e="",f="",g;b<a.length;)switch(a[b][0]){case 1:d++;f+=a[b][1];b++;break;case -1:c++;e+=a[b][1];b++;break;case 0:1<c+d?(0!==c&&0!==d&&(g=this.diff_commonPrefix(f,e),0!==g&&(0<b-c-d&&0==a[b-c-d-1][0]?a[b-c-d-1][1]+=f.substring(0,g):(a.splice(0,0,[0,f.substring(0,g)]),b++),f=f.substring(g),e=e.substring(g)),g=this.diff_commonSuffix(f,e),0!==g&&(a[b][1]=f.substring(f.length-g)+a[b][1],f=f.substring(0,f.length-
|
||||
g),e=e.substring(0,e.length-g))),0===c?a.splice(b-d,c+d,[1,f]):0===d?a.splice(b-c,c+d,[-1,e]):a.splice(b-c-d,c+d,[-1,e],[1,f]),b=b-c-d+(c?1:0)+(d?1:0)+1):0!==b&&0==a[b-1][0]?(a[b-1][1]+=a[b][1],a.splice(b,1)):b++,c=d=0,f=e=""}""===a[a.length-1][1]&&a.pop();c=!1;for(b=1;b<a.length-1;)0==a[b-1][0]&&0==a[b+1][0]&&(a[b][1].substring(a[b][1].length-a[b-1][1].length)==a[b-1][1]?(a[b][1]=a[b-1][1]+a[b][1].substring(0,a[b][1].length-a[b-1][1].length),a[b+1][1]=a[b-1][1]+a[b+1][1],a.splice(b-1,1),c=!0):a[b][1].substring(0,
|
||||
a[b+1][1].length)==a[b+1][1]&&(a[b-1][1]+=a[b+1][1],a[b][1]=a[b][1].substring(a[b+1][1].length)+a[b+1][1],a.splice(b+1,1),c=!0)),b++;c&&this.diff_cleanupMerge(a)};diff_match_patch.prototype.diff_xIndex=function(a,b){var c=0,d=0,e=0,f=0,g;for(g=0;g<a.length;g++){1!==a[g][0]&&(c+=a[g][1].length);-1!==a[g][0]&&(d+=a[g][1].length);if(c>b)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};
|
||||
diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=/</g,e=/>/g,f=/\n/g,g=0;g<a.length;g++){var h=a[g][0],j=a[g][1],j=j.replace(c,"&").replace(d,"<").replace(e,">").replace(f,"¶<br>");switch(h){case 1:b[g]='<ins style="background:#e6ffe6;">'+j+"</ins>";break;case -1:b[g]='<del style="background:#ffe6e6;">'+j+"</del>";break;case 0:b[g]="<span>"+j+"</span>"}}return b.join("")};
|
||||
diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;c<a.length;c++)1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_text2=function(a){for(var b=[],c=0;c<a.length;c++)-1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_levenshtein=function(a){for(var b=0,c=0,d=0,e=0;e<a.length;e++){var f=a[e][0],g=a[e][1];switch(f){case 1:c+=g.length;break;case -1:d+=g.length;break;case 0:b+=Math.max(c,d),d=c=0}}return b+=Math.max(c,d)};
|
||||
diff_match_patch.prototype.diff_toDelta=function(a){for(var b=[],c=0;c<a.length;c++)switch(a[c][0]){case 1:b[c]="+"+encodeURI(a[c][1]);break;case -1:b[c]="-"+a[c][1].length;break;case 0:b[c]="="+a[c][1].length}return b.join("\t").replace(/%20/g," ")};
|
||||
diff_match_patch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/g),g=0;g<f.length;g++){var h=f[g].substring(1);switch(f[g].charAt(0)){case "+":try{c[d++]=[1,decodeURI(h)]}catch(j){throw Error("Illegal escape in diff_fromDelta: "+h);}break;case "-":case "=":var i=parseInt(h,10);if(isNaN(i)||0>i)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+
|
||||
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
|
||||
diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<<b.length-1,h=-1,i,k,q=b.length+a.length,r,t=0;t<b.length;t++){i=0;for(k=q;i<k;)d(t,c+
|
||||
k)<=g?i=k:q=k,k=Math.floor((q-i)/2+i);q=k;i=Math.max(1,c-k+1);var p=Math.min(c+k,a.length)+b.length;k=Array(p+2);for(k[p+1]=(1<<t)-1;p>=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};
|
||||
diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=0;for(c=0;c<a.length;c++)b[a.charAt(c)]|=1<<a.length-c-1;return b};
|
||||
diff_match_patch.prototype.patch_addContext_=function(a,b){if(0!=b.length){for(var c=b.substring(a.start2,a.start2+a.length1),d=0;b.indexOf(c)!=b.lastIndexOf(c)&&c.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)d+=this.Patch_Margin,c=b.substring(a.start2-d,a.start2+a.length1+d);d+=this.Patch_Margin;(c=b.substring(a.start2-d,a.start2))&&a.diffs.unshift([0,c]);(d=b.substring(a.start2+a.length1,a.start2+a.length1+d))&&a.diffs.push([0,d]);a.start1-=c.length;a.start2-=c.length;a.length1+=
|
||||
c.length+d.length;a.length2+=c.length+d.length}};
|
||||
diff_match_patch.prototype.patch_make=function(a,b,c){var d;if("string"==typeof a&&"string"==typeof b&&"undefined"==typeof c)d=a,b=this.diff_main(d,b,!0),2<b.length&&(this.diff_cleanupSemantic(b),this.diff_cleanupEfficiency(b));else if(a&&"object"==typeof a&&"undefined"==typeof b&&"undefined"==typeof c)b=a,d=this.diff_text1(b);else if("string"==typeof a&&b&&"object"==typeof b&&"undefined"==typeof c)d=a;else if("string"==typeof a&&"string"==typeof b&&c&&"object"==typeof c)d=a,b=c;else throw Error("Unknown call format to patch_make.");
|
||||
if(0===b.length)return[];c=[];a=new diff_match_patch.patch_obj;for(var e=0,f=0,g=0,h=d,j=0;j<b.length;j++){var i=b[j][0],k=b[j][1];!e&&0!==i&&(a.start1=f,a.start2=g);switch(i){case 1:a.diffs[e++]=b[j];a.length2+=k.length;d=d.substring(0,g)+k+d.substring(g);break;case -1:a.length1+=k.length;a.diffs[e++]=b[j];d=d.substring(0,g)+d.substring(g+k.length);break;case 0:k.length<=2*this.Patch_Margin&&e&&b.length!=j+1?(a.diffs[e++]=b[j],a.length1+=k.length,a.length2+=k.length):k.length>=2*this.Patch_Margin&&
|
||||
e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=new diff_match_patch.patch_obj;e.diffs=[];for(var f=0;f<d.diffs.length;f++)e.diffs[f]=d.diffs[f].slice();e.start1=d.start1;e.start2=d.start2;e.length1=d.length1;e.length2=d.length2;b[c]=e}return b};
|
||||
diff_match_patch.prototype.patch_apply=function(a,b){if(0==a.length)return[b,[]];a=this.patch_deepCopy(a);var c=this.patch_addPadding(a);b=c+b+c;this.patch_splitMax(a);for(var d=0,e=[],f=0;f<a.length;f++){var g=a[f].start2+d,h=this.diff_text1(a[f].diffs),j,i=-1;if(h.length>this.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);
|
||||
if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;i<a[f].diffs.length;i++){var q=a[f].diffs[i];0!==q[0]&&(k=this.diff_xIndex(g,h));1===q[0]?b=b.substring(0,
|
||||
j+k)+q[1]+b.substring(j+k):-1===q[0]&&(b=b.substring(0,j+k)+b.substring(j+this.diff_xIndex(g,h+q[1].length)));-1!==q[0]&&(h+=q[1].length)}}}b=b.substring(c.length,b.length-c.length);return[b,e]};
|
||||
diff_match_patch.prototype.patch_addPadding=function(a){for(var b=this.Patch_Margin,c="",d=1;d<=b;d++)c+=String.fromCharCode(d);for(d=0;d<a.length;d++)a[d].start1+=b,a[d].start2+=b;var d=a[0],e=d.diffs;if(0==e.length||0!=e[0][0])e.unshift([0,c]),d.start1-=b,d.start2-=b,d.length1+=b,d.length2+=b;else if(b>e[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,
|
||||
c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};
|
||||
diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c<a.length;c++)if(!(a[c].length1<=b)){var d=a[c];a.splice(c--,1);for(var e=d.start1,f=d.start2,g="";0!==d.diffs.length;){var h=new diff_match_patch.patch_obj,j=!0;h.start1=e-g.length;h.start2=f-g.length;""!==g&&(h.length1=h.length2=g.length,h.diffs.push([0,g]));for(;0!==d.diffs.length&&h.length1<b-this.Patch_Margin;){var g=d.diffs[0][0],i=d.diffs[0][1];1===g?(h.length2+=i.length,f+=i.length,h.diffs.push(d.diffs.shift()),
|
||||
j=!1):-1===g&&1==h.diffs.length&&0==h.diffs[0][0]&&i.length>2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&&
|
||||
(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b.join("")};
|
||||
diff_match_patch.prototype.patch_fromText=function(a){var b=[];if(!a)return b;a=a.split("\n");for(var c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<a.length;){var e=a[c].match(d);if(!e)throw Error("Invalid patch string: "+a[c]);var f=new diff_match_patch.patch_obj;b.push(f);f.start1=parseInt(e[1],10);""===e[2]?(f.start1--,f.length1=1):"0"==e[2]?f.length1=0:(f.start1--,f.length1=parseInt(e[2],10));f.start2=parseInt(e[3],10);""===e[4]?(f.start2--,f.length2=1):"0"==e[4]?f.length2=0:(f.start2--,f.length2=
|
||||
parseInt(e[4],10));for(c++;c<a.length;){e=a[c].charAt(0);try{var g=decodeURI(a[c].substring(1))}catch(h){throw Error("Illegal escape in patch_fromText: "+g);}if("-"==e)f.diffs.push([-1,g]);else if("+"==e)f.diffs.push([1,g]);else if(" "==e)f.diffs.push([0,g]);else if("@"==e)break;else if(""!==e)throw Error('Invalid patch mode "'+e+'" in: '+g);c++}}return b};diff_match_patch.patch_obj=function(){this.diffs=[];this.start2=this.start1=null;this.length2=this.length1=0};
|
||||
diff_match_patch.patch_obj.prototype.toString=function(){var a,b;a=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;b=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;a=["@@ -"+a+" +"+b+" @@\n"];var c;for(b=0;b<this.diffs.length;b++){switch(this.diffs[b][0]){case 1:c="+";break;case -1:c="-";break;case 0:c=" "}a[b+1]=c+encodeURI(this.diffs[b][1])+"\n"}return a.join("").replace(/%20/g," ")};
|
||||
this.diff_match_patch=diff_match_patch;this.DIFF_DELETE=-1;this.DIFF_INSERT=1;this.DIFF_EQUAL=0;})();
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
/*! jQuery.flowchart.js v1.1.0 | jquery.flowchart.min.js | jQuery plugin for flowchart.js. | MIT License | By: Pandao | https://github.com/pandao/jquery.flowchart.js | 2015-03-09 */
|
||||
(function(factory){if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){module.exports=factory}else{if(typeof define==="function"){factory(jQuery,flowchart)}else{factory($,flowchart)}}}(function(jQuery,flowchart){(function($){$.fn.flowChart=function(options){options=options||{};var defaults={"x":0,"y":0,"line-width":2,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black","fill":"white","yes-text":"yes","no-text":"no","arrow-end":"block","symbols":{"start":{"font-color":"black","element-color":"black","fill":"white"},"end":{"class":"end-element"}},"flowstate":{"past":{"fill":"#CCCCCC","font-size":12},"current":{"fill":"black","font-color":"white","font-weight":"bold"},"future":{"fill":"white"},"request":{"fill":"blue"},"invalid":{"fill":"#444444"},"approved":{"fill":"#58C4A3","font-size":12,"yes-text":"APPROVED","no-text":"n/a"},"rejected":{"fill":"#C45879","font-size":12,"yes-text":"n/a","no-text":"REJECTED"}}};return this.each(function(){var $this=$(this);var diagram=flowchart.parse($this.text());var settings=$.extend(true,defaults,options);$this.html("");diagram.drawSVG(this,settings)})}})(jQuery)}));
|
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
|
@ -0,0 +1,103 @@
|
|||
function Base64() {
|
||||
|
||||
// private property
|
||||
_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
|
||||
// public method for encoding
|
||||
this.encode = function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = _utf8_encode(input);
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
output = output +
|
||||
_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
|
||||
_keyStr.charAt(enc3) + _keyStr.charAt(enc4);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
// public method for decoding
|
||||
this.decode = function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
while (i < input.length) {
|
||||
enc1 = _keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = _keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = _keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = _keyStr.indexOf(input.charAt(i++));
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
output = _utf8_decode(output);
|
||||
return output;
|
||||
}
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode = function (string) {
|
||||
string = string.replace(/\r\n/g,"\n");
|
||||
var utftext = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
}
|
||||
return utftext;
|
||||
}
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode = function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
while ( i < utftext.length ) {
|
||||
c = utftext.charCodeAt(i);
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i+1);
|
||||
c3 = utftext.charCodeAt(i+2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
/*
|
||||
Jquery
|
||||
janchie 2010.1
|
||||
1.02版
|
||||
*/
|
||||
|
||||
var validResult = {};
|
||||
var errorMsg = {};
|
||||
|
||||
(function ($) {
|
||||
$.fn.extend({
|
||||
valid: function () {
|
||||
if (!$(this).is("form")) return;
|
||||
|
||||
var items = $.isArray(arguments[0]) ? arguments[0] : [],
|
||||
isBindSubmit = typeof arguments[1] === "boolean" ? arguments[1] : true,
|
||||
isAlert = typeof arguments[2] === "boolean" ? arguments[2] : false,
|
||||
|
||||
rule = {
|
||||
"eng": /^[A-Za-z]+$/,
|
||||
"chn": /^[\u0391-\uFFE5]+$/,
|
||||
"mail": /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
|
||||
"url": /^http[s]?:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/,
|
||||
"currency": /^\d+(\.\d+)?$/,
|
||||
"number": /^\d+$/,
|
||||
"int": /^[0-9]{1,30}$/,
|
||||
"double": /^[-\+]?\d+(\.\d+)?$/,
|
||||
"username": /^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){3,19}$/,
|
||||
"password": /^[\w\W]{6,20}$/,
|
||||
"safe": />|<|,|\[|\]|\{|\}|\?|\/|\+|=|\||\'|\\|\"|:|;|\~|\!|\@|\#|\*|\$|\%|\^|\&|\(|\)|`/i,
|
||||
"dbc": /[a-zA-Z0-9!@#¥%^&*()_+{}[]|:"';.,/?<>`~ ]/,
|
||||
"qq": /[1-9][0-9]{4,}/,
|
||||
"date": /^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/,
|
||||
"year": /^(19|20)[0-9]{2}$/,
|
||||
"month": /^(0?[1-9]|1[0-2])$/,
|
||||
"day": /^((0?[1-9])|((1|2)[0-9])|30|31)$/,
|
||||
"hour": /^((0?[1-9])|((1|2)[0-3]))$/,
|
||||
"minute": /^((0?[1-9])|((1|5)[0-9]))$/,
|
||||
"second": /^((0?[1-9])|((1|5)[0-9]))$/,
|
||||
"mobile": /^((\(\d{2,3}\))|(\d{3}\-))?13\d{9}$/,
|
||||
"phone": /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/,
|
||||
"zipcode": /^[1-9]\d{5}$/,
|
||||
"IDcard": /^((1[1-5])|(2[1-3])|(3[1-7])|(4[1-6])|(5[0-4])|(6[1-5])|71|(8[12])|91)\d{4}((19\d{2}(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(19\d{2}(0[13578]|1[02])31)|(19\d{2}02(0[1-9]|1\d|2[0-8]))|(19([13579][26]|[2468][048]|0[48])0229))\d{3}(\d|X|x)?$/,
|
||||
"ip": /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,
|
||||
"file": /^[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
|
||||
"image": /.+\.(jpg|gif|png|bmp)$/i,
|
||||
"word": /.+\.(doc|rtf|pdf)$/i,
|
||||
|
||||
"port": function (port) {
|
||||
return (!isNaN(port) && port > 0 && port < 65536) ? true : false;
|
||||
},
|
||||
"eq": function (arg1, arg2) {
|
||||
return arg1 == arg2 ? true : false;
|
||||
},
|
||||
"gt": function (arg1, arg2) {
|
||||
return arg1 > arg2 ? true : false;
|
||||
},
|
||||
"gte": function (arg1, arg2) {
|
||||
return arg1 >= arg2 ? true : false;
|
||||
},
|
||||
"lt": function (arg1, arg2) {
|
||||
return arg1 < arg2 ? true : false;
|
||||
},
|
||||
"lte": function (arg1, arg2) {
|
||||
return arg1 <= arg2 ? true : false;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
msgSuffix = {
|
||||
"eng": "only english welcomed",
|
||||
"chn": "only chinese welcomed",
|
||||
"mail": "invalid email format",
|
||||
"url": "invalid url format",
|
||||
"currency": "invalid number format",
|
||||
"number": "only number welcomed",
|
||||
"int": "only integer welcomed",
|
||||
"double": "only float welcomed",
|
||||
"username": "invalid username format,4-20 characters",
|
||||
"password": "warning, you'd better use 6-20 characters",
|
||||
"safe": "forbidden special characters",
|
||||
"dbc": "forbidden full width characters",
|
||||
"qq": "invalid qq format",
|
||||
"date": "invalid date format",
|
||||
"year": "invalid year format",
|
||||
"month": "invalid month format",
|
||||
"day": "invalid day format",
|
||||
"hour": "invalid hour format",
|
||||
"minute": "invalid minute format",
|
||||
"second": "invalid second format",
|
||||
"mobile": "invalid mobile format",
|
||||
"phone": "invalid phone format",
|
||||
"zipcode": "invalid zipcode format",
|
||||
"IDcard": "invalid identity format",
|
||||
"ip": "invalid ip format",
|
||||
"port": "invalid port format",
|
||||
"file": "invalid file format",
|
||||
"image": "invalid image format",
|
||||
"word": "invalid word file format",
|
||||
"eq": "not equal",
|
||||
"gt": "no greater than",
|
||||
"gte": "no greater than or equal",
|
||||
"lt": "no smaller than",
|
||||
"lte": "no smaller than or equal"
|
||||
},
|
||||
|
||||
msg = "", formObj = $(this), checkRet = true, isAll,
|
||||
tipname = function (namestr) {
|
||||
return "tip_" + namestr.replace(/([a-zA-Z0-9])/g, "-$1");
|
||||
},
|
||||
|
||||
typeTest = function () {
|
||||
var result = true, args = arguments;
|
||||
if (rule.hasOwnProperty(args[0])) {
|
||||
var t = rule[args[0]], v = args[1];
|
||||
result = args.length > 2 ? t.apply(arguments, [].slice.call(args, 1)) : ($.isFunction(t) ? t(v) : t.test(v));
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
showError = function (fieldObj, filedName, warnInfo) {
|
||||
checkRet = false;
|
||||
var tipObj = $("#" + tipname(filedName));
|
||||
if (tipObj.length > 0) tipObj.remove();
|
||||
var tipPosition = fieldObj.next().length > 0 ? fieldObj.nextAll().eq(this.length - 1) : fieldObj.eq(this.length - 1);
|
||||
//tipPosition.after("<span class='tooltip' id='" + tipname(filedName) + "'> " + warnInfo + " </span>");
|
||||
validResult[filedName] = false;
|
||||
errorMsg[filedName] = warnInfo;
|
||||
if (isAlert && isAll) msg = warnInfo;
|
||||
},
|
||||
|
||||
showRight = function (fieldObj, filedName) {
|
||||
var tipObj = $("#" + tipname(filedName));
|
||||
if (tipObj.length > 0) tipObj.remove();
|
||||
var tipPosition = fieldObj.next().length > 0 ? fieldObj.nextAll().eq(this.length - 1) : fieldObj.eq(this.length - 1);
|
||||
//tipPosition.after("<span class='tooltip' id='" + tipname(filedName) + "'>correct</span>");
|
||||
validResult[filedName] = true;
|
||||
},
|
||||
|
||||
findTo = function (objName) {
|
||||
var find;
|
||||
$.each(items, function () {
|
||||
if (this.name == objName && this.simple) {
|
||||
find = this.simple;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (!find) find = $("[name='" + objName + "']")[0].name;
|
||||
return find;
|
||||
},
|
||||
|
||||
fieldCheck = function (item) {
|
||||
var i = item, field = $("[name='" + i.name + "']", formObj[0]);
|
||||
if (!field[0]) return;
|
||||
|
||||
var warnMsg, fv = $.trim(field.val()), isRq = typeof i.require === "boolean" ? i.require : true;
|
||||
|
||||
if (isRq && ((field.is(":radio") || field.is(":checkbox")) && !field.is(":checked"))) {
|
||||
warnMsg = i.message || "choice needed";
|
||||
showError(field, i.name, warnMsg);
|
||||
|
||||
} else if (isRq && fv == "") {
|
||||
warnMsg = i.message || ( field.is("select") ? "choice needed" : "not none" );
|
||||
showError(field, i.name, warnMsg);
|
||||
|
||||
} else if (fv != "") {
|
||||
if (i.min || i.max) {
|
||||
var len = fv.length, min = i.min || 0, max = i.max;
|
||||
warnMsg = i.message || (max ? "range" + min + "~" + max + "" : "min length" + min);
|
||||
|
||||
if ((max && (len > max || len < min)) || (!max && len < min)) {
|
||||
showError(field, i.name, warnMsg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (i.type) {
|
||||
var matchVal = i.to ? $.trim($("[name='" + i.to + "']").val()) : i.value;
|
||||
var matchRet = matchVal ? typeTest(i.type, fv, matchVal) : typeTest(i.type, fv);
|
||||
|
||||
warnMsg = i.message || msgSuffix[i.type];
|
||||
if (matchVal) warnMsg += (i.to ? findTo(i.to) + "value" : i.value);
|
||||
|
||||
if (!matchRet) showError(field, i.name, warnMsg);
|
||||
else showRight(field, i.name);
|
||||
|
||||
} else {
|
||||
showRight(field, i.name);
|
||||
}
|
||||
|
||||
} else if (isRq) {
|
||||
showRight(field, i.name);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
validate = function () {
|
||||
$.each(items, function () {
|
||||
isAll = true;
|
||||
fieldCheck(this);
|
||||
});
|
||||
|
||||
if (isAlert && msg != "") {
|
||||
alert(msg);
|
||||
msg = "";
|
||||
}
|
||||
return checkRet;
|
||||
};
|
||||
|
||||
$.each(items, function () {
|
||||
var field = $("[name='" + this.name + "']", formObj[0]);
|
||||
if (field.is(":hidden")) return;
|
||||
|
||||
var obj = this, toCheck = function () {
|
||||
isAll = false;
|
||||
fieldCheck(obj);
|
||||
};
|
||||
if (field.is(":file") || field.is("select")) {
|
||||
field.change(toCheck);
|
||||
} else {
|
||||
field.blur(toCheck);
|
||||
}
|
||||
});
|
||||
|
||||
if (isBindSubmit) {
|
||||
$(this).submit(validate);
|
||||
} else {
|
||||
return validate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,201 @@
|
|||
/**
|
||||
这里是非iframe版本的openTerminal
|
||||
TODO 换一个消息机制,替代iframe情况下使用的postMessage
|
||||
消息得种类有:
|
||||
发送
|
||||
1、postMessage({tp: 'sshWorking'}, "*"); ssh正在被使用
|
||||
2、window.parent.postMessage({tp: 'setSSHConnectStatus', tab: options.tab}, "*");
|
||||
|
||||
接收
|
||||
1、 if(event.data.tp === 'resize'){ 改变命令行窗体大小
|
||||
2、 } else if (event.data.tp === 'reload') { 异常中断后重连
|
||||
3、 } else if (event.data.tp === 'close_ssh_cocket') { 中断命令行websocket
|
||||
*/
|
||||
function openTerminal(options) {
|
||||
// 为了多个实例能同时存在
|
||||
(function () {
|
||||
var heartBeatInterval;
|
||||
var force_close_socket = false;
|
||||
//var CONNECT_TIME = 0; // 请求连接次数
|
||||
Rows = parseInt(options.rows);
|
||||
var parentDomId = options.parentDomId || ''
|
||||
var client = new WSSHClient();
|
||||
var base64 = new Base64();
|
||||
var term = new Terminal({cols: options.columns, rows: Rows, screenKeys: true, useStyle: true
|
||||
// TODO 默认是canvas,可能被其他样式影响了 canvas用不了
|
||||
, rendererType: 'dom'
|
||||
, fontSize: 16
|
||||
});
|
||||
term.on('data', function (data) {
|
||||
console.log("xterm data: ");
|
||||
console.log(data);
|
||||
client.sendClientData(data);
|
||||
|
||||
window.parent.postMessage({tp: 'sshWorking'}, "*");
|
||||
});
|
||||
term.open();
|
||||
$('body>.terminal').detach().appendTo( parentDomId + ' #term' );
|
||||
$(parentDomId + " #term").show();
|
||||
term.write("Connecting...");
|
||||
console.log(options)
|
||||
console.debug(options);
|
||||
|
||||
//var interTime = setInterval(client_connect, 1000)
|
||||
setTimeout(client_connect, 3000);
|
||||
|
||||
heartBeatInterval = setInterval(function(){
|
||||
client.sendHeartBeat()
|
||||
}, 30 * 1000)
|
||||
/**
|
||||
* 重新设置窗口大小
|
||||
* @param o
|
||||
*/
|
||||
var resizeTerminal = function (o) {
|
||||
if (typeof term === 'object') {
|
||||
var rows = term.rows;
|
||||
var cols = term.cols;
|
||||
if (o.rows > 0) {
|
||||
rows = o.rows;
|
||||
}
|
||||
if (o.cols > 0) {
|
||||
cols = o.cols;
|
||||
}
|
||||
term.resize(cols, rows);
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("message", function (event) {
|
||||
console.log("post message: ");
|
||||
console.log(event.data);
|
||||
if(event.data.tp === 'resize'){
|
||||
resizeTerminal(event.data);
|
||||
} else if (event.data.tp === 'reload') {
|
||||
window.location.reload()
|
||||
} else if (event.data.tp === 'close_ssh_cocket') {
|
||||
force_close_socket = true; // 强制关闭socket,用于不开启自动重连
|
||||
client && client.close();
|
||||
}
|
||||
}, false);
|
||||
|
||||
var intervalId = null;
|
||||
function client_connect() {
|
||||
var CONNECTED = false; // 是否连接成功过
|
||||
console.log("连接中....");
|
||||
console.log(options);
|
||||
|
||||
client.connect({
|
||||
onError: function (error) {
|
||||
term.write('Error: ' + error + '\r\n');
|
||||
console.log('error happened');
|
||||
},
|
||||
onConnect: function () {
|
||||
console.log('connection established');
|
||||
client.sendInitData(options);
|
||||
term.focus();
|
||||
},
|
||||
onClose: function () {
|
||||
debugger;
|
||||
|
||||
clearInterval(heartBeatInterval);
|
||||
|
||||
console.log("连接关闭");
|
||||
term.write("\r\nconnection closed");
|
||||
if (CONNECTED) {
|
||||
console.log('connection reset by peer');
|
||||
$('term').hide();
|
||||
}
|
||||
if (force_close_socket === false) {
|
||||
// $(window).trigger('setSSHConnectStatus');
|
||||
window.parent.postMessage({tp: 'setSSHConnectStatus', tab: options.tab}, "*");
|
||||
} else {
|
||||
// 主动关闭连接时,不自动重连
|
||||
force_close_socket = false;
|
||||
}
|
||||
},
|
||||
onData: function (data) {
|
||||
if (!CONNECTED) {
|
||||
console.log("first connected.");
|
||||
// 问题重现的实训 带代码tab的 命令行实训 https://www.educoder.net/tasks/83hflni9es7tl
|
||||
setTimeout(function() {
|
||||
// TODO canvas模式下,没有body
|
||||
if ( term && term.body && term.body.innerText
|
||||
&& term.body.innerText.indexOf('Connecting') != -1 ) {
|
||||
term.clear(); // 有的连上后还出现了“Connecting。。。”
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
term.write("\r"); //换行
|
||||
term.focus(); //焦点移动到框上
|
||||
}
|
||||
/*if(interTime){
|
||||
clearInterval(interTime);
|
||||
}*/
|
||||
CONNECTED = true;
|
||||
|
||||
data = base64.decode(data);
|
||||
/* TIMEINIT = 0;*/
|
||||
term.write(data);
|
||||
console.log('get data:' + data);
|
||||
}
|
||||
})
|
||||
}
|
||||
}());
|
||||
}
|
||||
|
||||
var charWidth = 6.2;
|
||||
var charHeight = 15.2;
|
||||
|
||||
/**
|
||||
* for full screen
|
||||
* @returns {{w: number, h: number}}
|
||||
*/
|
||||
function getTerminalSize() {
|
||||
var width = window.innerWidth;
|
||||
var height = window.innerHeight;
|
||||
return {
|
||||
w: Math.floor(width / charWidth),
|
||||
h: Math.floor(height / charHeight)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function store(options) {
|
||||
window.localStorage.host = options.host
|
||||
window.localStorage.port = options.port
|
||||
window.localStorage.username = options.username
|
||||
window.localStorage.ispwd = options.ispwd;
|
||||
window.localStorage.secret = options.secret
|
||||
}
|
||||
|
||||
function check() {
|
||||
return validResult["host"] && validResult["port"] && validResult["username"];
|
||||
}
|
||||
|
||||
function connect() {
|
||||
var remember = $("#remember").is(":checked")
|
||||
var options = {
|
||||
host: $("#host").val(),
|
||||
port: $("#port").val(),
|
||||
username: $("#username").val(),
|
||||
secret: $("#password").val(),
|
||||
gameid: $("#gameid").val(),
|
||||
rows: parseInt( $("#terminalRow").val() ),
|
||||
columns: parseInt( $("#terminalColumn").val() ),
|
||||
width: parseInt( $("#terminalWidth").val() ),
|
||||
height: parseInt( $("#terminalHeight").val() ),
|
||||
tab: $("#terminalTab").val(),
|
||||
}
|
||||
if (remember) {
|
||||
store(options)
|
||||
}
|
||||
if (true) {
|
||||
openTerminal(options)
|
||||
} else {
|
||||
for (var key in validResult) {
|
||||
if (!validResult[key]) {
|
||||
alert(errorMsg[key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
function WSSHClient() {
|
||||
};
|
||||
|
||||
WSSHClient.prototype._generateEndpoint = function () {
|
||||
return g_websocket_url;
|
||||
};
|
||||
|
||||
WSSHClient.prototype.connect = function (options) {
|
||||
var endpoint = this._generateEndpoint();
|
||||
|
||||
if (window.WebSocket) {
|
||||
this._connection = new WebSocket(endpoint);
|
||||
}
|
||||
else if (window.MozWebSocket) {
|
||||
this._connection = MozWebSocket(endpoint);
|
||||
}
|
||||
else {
|
||||
options.onError('WebSocket Not Supported');
|
||||
return;
|
||||
}
|
||||
|
||||
this._connection.onopen = function () {
|
||||
options.onConnect();
|
||||
};
|
||||
|
||||
this._connection.onmessage = function (evt) {
|
||||
var data = evt.data.toString()
|
||||
options.onData(data);
|
||||
};
|
||||
|
||||
|
||||
this._connection.onclose = function (evt) {
|
||||
options.onClose();
|
||||
};
|
||||
};
|
||||
|
||||
WSSHClient.prototype.close = function () {
|
||||
this._connection.close();
|
||||
};
|
||||
|
||||
WSSHClient.prototype.send = function (data) {
|
||||
this._connection.send(JSON.stringify(data));
|
||||
};
|
||||
|
||||
WSSHClient.prototype.sendInitData = function (options) {
|
||||
var data = {
|
||||
hostname: options.host,
|
||||
port: options.port,
|
||||
username: options.username,
|
||||
ispwd: options.ispwd,
|
||||
secret: options.secret
|
||||
};
|
||||
this._connection.send(JSON.stringify({"tp": "init", "data": options}))
|
||||
console.log("发送初始化数据:" + options)
|
||||
}
|
||||
|
||||
WSSHClient.prototype.sendClientData = function (data) {
|
||||
this._connection.send(JSON.stringify({"tp": "client", "data": data}))
|
||||
console.log("发送客户端数据:" + data)
|
||||
}
|
||||
|
||||
WSSHClient.prototype.sendHeartBeat = function (data) {
|
||||
this._connection.send(JSON.stringify({"tp": "h"}))
|
||||
console.log("发送客户端数据:" + data)
|
||||
}
|
||||
|
||||
var client = new WSSHClient();
|
|
@ -0,0 +1,323 @@
|
|||
// 记录手动加到js_min_all.js中的脚本
|
||||
// js_min_all_2是js_min_all的混淆后版本
|
||||
|
||||
|
||||
// codemirror 已经加载了,codemirror会有插件,重复加载会使得之前加载的插件失效
|
||||
// editormd.loadScript(loadPath + "codemirror/codemirror.min", function() {
|
||||
|
||||
// codemirror 已经加载了
|
||||
// editormd.loadCSS(loadPath + "codemirror/codemirror.min");
|
||||
|
||||
// active-line application.js部分 弹框 ke自动保存等
|
||||
|
||||
|
||||
// ----------------------------- ----------------------------- active-line.js
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
var WRAP_CLASS = "CodeMirror-activeline";
|
||||
var BACK_CLASS = "CodeMirror-activeline-background";
|
||||
var GUTT_CLASS = "CodeMirror-activeline-gutter";
|
||||
|
||||
CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
|
||||
var prev = old == CodeMirror.Init ? false : old;
|
||||
if (val == prev) return
|
||||
if (prev) {
|
||||
cm.off("beforeSelectionChange", selectionChange);
|
||||
clearActiveLines(cm);
|
||||
delete cm.state.activeLines;
|
||||
}
|
||||
if (val) {
|
||||
cm.state.activeLines = [];
|
||||
updateActiveLines(cm, cm.listSelections());
|
||||
cm.on("beforeSelectionChange", selectionChange);
|
||||
}
|
||||
});
|
||||
|
||||
function clearActiveLines(cm) {
|
||||
for (var i = 0; i < cm.state.activeLines.length; i++) {
|
||||
cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
|
||||
cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
|
||||
cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);
|
||||
}
|
||||
}
|
||||
|
||||
function sameArray(a, b) {
|
||||
if (a.length != b.length) return false;
|
||||
for (var i = 0; i < a.length; i++)
|
||||
if (a[i] != b[i]) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateActiveLines(cm, ranges) {
|
||||
var active = [];
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
var range = ranges[i];
|
||||
var option = cm.getOption("styleActiveLine");
|
||||
if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())
|
||||
continue
|
||||
var line = cm.getLineHandleVisualStart(range.head.line);
|
||||
if (active[active.length - 1] != line) active.push(line);
|
||||
}
|
||||
if (sameArray(cm.state.activeLines, active)) return;
|
||||
cm.operation(function() {
|
||||
clearActiveLines(cm);
|
||||
for (var i = 0; i < active.length; i++) {
|
||||
cm.addLineClass(active[i], "wrap", WRAP_CLASS);
|
||||
cm.addLineClass(active[i], "background", BACK_CLASS);
|
||||
cm.addLineClass(active[i], "gutter", GUTT_CLASS);
|
||||
}
|
||||
cm.state.activeLines = active;
|
||||
});
|
||||
}
|
||||
|
||||
function selectionChange(cm, sel) {
|
||||
updateActiveLines(cm, sel.ranges);
|
||||
}
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// ----------------------------- ----------------------------- active-line.js END
|
||||
|
||||
|
||||
// ------------------------------------------- application.js到最底部
|
||||
//自动保存草稿
|
||||
var editor2;
|
||||
function elocalStorage(editor,mdu,id){
|
||||
if (window.sessionStorage){
|
||||
editor2 = editor;
|
||||
var oc = window.sessionStorage.getItem('content'+mdu);
|
||||
if(oc !== null ){
|
||||
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="color-orange05" onclick="rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="color-orange05" onclick="clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>';
|
||||
$("#e_tips_"+id).html(h);
|
||||
}
|
||||
setInterval(function() {
|
||||
d = new Date();
|
||||
var h = d.getHours();
|
||||
var m = d.getMinutes();
|
||||
var s = d.getSeconds();
|
||||
h = h < 10 ? '0' + h : h;
|
||||
m = m < 10 ? '0' + m : m;
|
||||
s = s < 10 ? '0' + s : s;
|
||||
editor.sync();
|
||||
if(!editor.isEmpty()){
|
||||
add_data("content",mdu,editor.html());
|
||||
var id1 = "#e_tip_"+id;
|
||||
var id2 = "#e_tips_"+id;
|
||||
$(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
|
||||
$(id2).html("");
|
||||
}
|
||||
},10000);
|
||||
|
||||
}else{
|
||||
$('.ke-edit').after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!');
|
||||
}
|
||||
}
|
||||
|
||||
function add_data(k,mdu,d){
|
||||
window.sessionStorage.setItem(k+mdu,d);
|
||||
}
|
||||
|
||||
// 公共弹框样式
|
||||
// 建议左右栏的:Width:460,Height:190
|
||||
// 建议宽屏对应值:Width:760,Height:500
|
||||
function pop_box_new(value, Width, Height){
|
||||
if($("#popupAll").length > 0){
|
||||
$("#popupAll").remove();
|
||||
}
|
||||
w = ($(window).width() - Width)/2;
|
||||
h = ($(window).height() - Height)/2;
|
||||
var html="<div class=\"popupAll none\" id='popupAll'><div class=\"pr\"><div id=\"popupWrap\"></div></div></div>";
|
||||
$(document.body).append(html);
|
||||
$("#popupWrap").html(value);
|
||||
$('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999","background-color":"#fff","border-radius":"10px"});
|
||||
$("#popupWrap").parent().parent().show();
|
||||
$('#popupWrap').find("a[class*='pop_close']").click(function(){
|
||||
$("#popupAll").hide();
|
||||
});
|
||||
// w = ($(window).width() - Width)/2;
|
||||
// h = ($(window).height() - Height)/2;
|
||||
// $("#ajax-modal").html(value);
|
||||
// showModal('ajax-modal', Width + 'px');
|
||||
// $('#ajax-modal').siblings().remove();
|
||||
// $('#ajax-modal').parent().css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed"});
|
||||
// $('#ajax-modal').parent().removeClass("resourceUploadPopup popbox_polls popbox");
|
||||
// $('#ajax-modal').css({"padding":"0","overflow":"hidden"});
|
||||
// $('#ajax-modal').parent().attr("id","popupWrap");
|
||||
|
||||
//拖拽
|
||||
function Drag(id) {
|
||||
this.div = document.getElementById(id);
|
||||
if (this.div) {
|
||||
this.div.style.cursor = "move";
|
||||
this.div.style.position = "fixed";
|
||||
}
|
||||
this.disX = 0;
|
||||
this.disY = 0;
|
||||
var _this = this;
|
||||
this.div.onmousedown = function (evt) {
|
||||
_this.getDistance(evt);
|
||||
document.onmousemove = function (evt) {
|
||||
_this.setPosition(evt);
|
||||
};
|
||||
_this.div.onmouseup = function () {
|
||||
_this.clearEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Drag.prototype.getDistance = function (evt) {
|
||||
var oEvent = evt || event;
|
||||
this.disX = oEvent.clientX - this.div.offsetLeft;
|
||||
this.disY = oEvent.clientY - this.div.offsetTop;
|
||||
};
|
||||
Drag.prototype.setPosition = function (evt) {
|
||||
var oEvent = evt || event;
|
||||
var l = oEvent.clientX - this.disX;
|
||||
var t = oEvent.clientY - this.disY;
|
||||
if (l <= 0) {
|
||||
l = 0;
|
||||
}
|
||||
else if (l >= document.documentElement.clientWidth - this.div.offsetWidth) {
|
||||
l = document.documentElement.clientWidth - this.div.offsetWidth;
|
||||
}
|
||||
if (t <= 0) {
|
||||
t = 0;
|
||||
}
|
||||
else if (t >= document.documentElement.clientHeight - this.div.offsetHeight) {
|
||||
t = document.documentElement.clientHeight - this.div.offsetHeight;
|
||||
}
|
||||
this.div.style.left = l + "px";
|
||||
this.div.style.top = t + "px";
|
||||
};
|
||||
Drag.prototype.clearEvent = function () {
|
||||
this.div.onmouseup = null;
|
||||
document.onmousemove = null;
|
||||
};
|
||||
|
||||
new Drag("popupWrap");
|
||||
|
||||
$("#popupWrap input, #popupWrap textarea, #popupWrap ul, #popupWrap a").mousedown(function(event){
|
||||
event.stopPropagation();
|
||||
new Drag("popupWrap");
|
||||
});
|
||||
}
|
||||
function sure_box_redirect_btn(url, str,btnstr){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();" target="_blank">'+btnstr+'</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 160);
|
||||
}
|
||||
function sure_box_redirect_btn2(url, str, btnstr){
|
||||
var htmlvalue = '<div class="task-popup" style="width:500px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix" style="width: 150px"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-orange fr" target="_blank" onclick="hideModal();">'+btnstr+'</a></div></div>';
|
||||
pop_box_new(htmlvalue, 578, 205);
|
||||
}
|
||||
|
||||
function op_confirm_box_loading(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:578px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16 pt15">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-orange fr" onclick="hideModal();$(\'.loading_all\').show();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 578, 205);
|
||||
}
|
||||
|
||||
//点击删除时的确认弹框: 走destroy方法,remote为true
|
||||
function delete_confirm_box_2(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-orange fr pop_close" data-method="delete" data-remote="true">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 160);
|
||||
}
|
||||
|
||||
|
||||
//提示框:只有一个确定按钮,点击关闭弹框
|
||||
//<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function notice_box(str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
|
||||
'<a href="javascript:void(0);" class="task-btn task-btn-orange" onclick="hideModal();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 160);
|
||||
}
|
||||
|
||||
|
||||
function hideModal(el) {
|
||||
if($("#popupAll").length > 0){
|
||||
$("#popupAll").remove();
|
||||
}
|
||||
else{
|
||||
var modal;
|
||||
if (el) {
|
||||
modal = $(el).parents('.ui-dialog-content');
|
||||
} else {
|
||||
modal = $('#ajax-modal');
|
||||
}
|
||||
modal.dialog("close");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------
|
||||
function is_cdn_link(contents){
|
||||
if(contents.indexOf("http") != -1
|
||||
|| contents.indexOf("com") != -1
|
||||
|| contents.indexOf("net") != -1
|
||||
|| contents.indexOf("org") != -1
|
||||
|| contents.indexOf("cdn") != -1){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 渲染用户的HTML的CODE。
|
||||
function tpi_html_show(){
|
||||
//$($(".blacktab_con")[0]).trigger("click");
|
||||
var contents = editor_CodeMirror.getValue();
|
||||
var $htmlForm = $("#html_form");
|
||||
var src = contents;
|
||||
var arrCSS =[];
|
||||
var arrSript = [];
|
||||
var patternLink = /<link(?:.*?)href=[\"\‘](.+?)[\"\‘](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/link>)*/im;
|
||||
var patternScript = /<script(?:.*?)src=[\"\‘](.+?)[\"\‘](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/script>)*/im;
|
||||
var arrayMatchesLink = patternLink.exec(src);
|
||||
var arrayMatchesScript = patternScript.exec(src);
|
||||
|
||||
// css部分
|
||||
while(arrayMatchesLink != null){
|
||||
if(is_cdn_link(arrayMatchesLink[1])){
|
||||
src = src.replace(arrayMatchesLink[0], arrayMatchesLink[0].replace(/link/, "edulink"));
|
||||
}else{
|
||||
src = src.replace(patternLink, "EDUCODERCSS");
|
||||
arrCSS.push(arrayMatchesLink[1]);
|
||||
}
|
||||
arrayMatchesLink = patternLink.exec(src);
|
||||
}
|
||||
// js部分
|
||||
while(arrayMatchesScript != null){
|
||||
if(is_cdn_link(arrayMatchesScript[1])){
|
||||
src = src.replace(arrayMatchesScript[0], arrayMatchesScript[0].replace(/script/g,"w3scrw3ipttag"));
|
||||
}else{
|
||||
src = src.replace(patternScript, "EDUCODERJS");
|
||||
arrSript.push(arrayMatchesScript[1]);
|
||||
}
|
||||
arrayMatchesScript = patternScript.exec(src);
|
||||
}
|
||||
// html部分 为了防止xss攻击,先将敏感字符转换
|
||||
src = src.replace(/=/gi,"w3equalsign").replace(/script/gi,"w3scrw3ipttag");
|
||||
|
||||
$("#data_param").val(src);
|
||||
$("#data_css_param").val(arrCSS);
|
||||
$("#data_js_param").val(arrSript);
|
||||
$htmlForm.attr("action", "/iframes/html_content?gpid="+ __myshixun.gpid );
|
||||
$htmlForm.submit();
|
||||
}
|
||||
// 渲染用户的HTML的CODE。--------------------------------------------END
|
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,35 @@
|
|||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2019-12-20 11:40:56
|
||||
* @LastEditTime : 2019-12-20 13:38:49
|
||||
* @LastEditors : Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /notebook/Users/yangshuming/Desktop/new__educode/educoder/public/react/public/js/jupyter.js
|
||||
*/
|
||||
window.onload=function(){
|
||||
require(["base/js/namespace"],function(Jupyter) {
|
||||
Jupyter.notebook.save_checkpoint();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// //子目标父窗口接收子窗口发送的消息
|
||||
// let message = {type: 'open', link:'需要发送的消息'};
|
||||
//子窗口向父窗口发送消息,消息中包含我们想跳转的链接
|
||||
window.parent.postMessage('jupytermessage','需要发送的消息');
|
||||
|
||||
|
||||
|
||||
// //目标父窗口接收子窗口发送的消息
|
||||
// window.addEventListener('message', (e)=>{
|
||||
// let origin = event.origin || event.originalEvent.origin;
|
||||
// if (origin !== '需要发送的消息') {
|
||||
// return;
|
||||
// }else {
|
||||
// //更换iframe的src,实现iframe页面跳转
|
||||
// 执行方法
|
||||
// }
|
||||
// },false);
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,140 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.14.6(6c8f02b41db9ae5c4d15df767d47755e5c73b9d5)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
(function(){var e=["exports","require","vs/editor/common/core/position","vs/base/common/winjs.base","vs/base/common/platform","vs/editor/common/core/uint","vs/base/common/errors","vs/editor/common/core/range","vs/base/common/lifecycle","vs/base/common/cancellation","vs/base/common/event","vs/base/common/uri","vs/base/common/diff/diff","vs/base/common/async","vs/base/common/strings","vs/base/common/keyCodes","vs/editor/common/model/mirrorTextModel","vs/base/common/diff/diffChange","vs/base/common/linkedList","vs/editor/common/core/selection","vs/editor/common/core/token","vs/base/common/functional","vs/editor/common/core/characterClassifier","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],t=function(t){
|
||||
for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n},n=this;!function(e){e.global=n;var t=function(){function t(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1}return Object.defineProperty(t.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!0,configurable:!0}),t.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=t._isWindows(),this._isNode="undefined"!=typeof module&&!!module.exports,
|
||||
this._isElectronRenderer="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type,this._isWebWorker="function"==typeof e.global.importScripts)},t._isWindows=function(){return!!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0)||"undefined"!=typeof process&&"win32"===process.platform},t}();e.Environment=t}(i||(i={}));!function(e){var t=function(){return function(e,t,n){this.type=e,this.detail=t,this.timestamp=n}}();e.LoaderEvent=t;var n=function(){function n(e){this._events=[new t(1,"",e)]}return n.prototype.record=function(n,r){this._events.push(new t(n,r,e.Utilities.getHighPerformanceTimestamp()))},n.prototype.getEvents=function(){return this._events},n}();e.LoaderEventRecorder=n;var r=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e.INSTANCE=new e,e}();e.NullLoaderEventRecorder=r}(i||(i={}));!function(e){var t=function(){function t(){}
|
||||
return t.fileUriToFilePath=function(e,t){if(t=decodeURI(t),e){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var n=void 0;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},t.isEmpty=function(e){var n=!0;return t.forEachProperty(e,function(){n=!1}),n},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var n=Array.isArray(e)?[]:{};return t.forEachProperty(e,function(e,r){n[e]=r&&"object"==typeof r?t.recursiveClone(r):r}),n},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID+++"==="},t.isAnonymousModule=function(e){
|
||||
return t.startsWith(e,"===anonymous")},t.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=e.global.performance&&"function"==typeof e.global.performance.now),this.HAS_PERFORMANCE_NOW?e.global.performance.now():Date.now()},t.NEXT_ANONYMOUS_ID=1,t.PERFORMANCE_NOW_PROBED=!1,t.HAS_PERFORMANCE_NOW=!1,t}();e.Utilities=t}(i||(i={}));!function(e){var t=function(){function t(){}return t.validateConfigurationOptions=function(t){function n(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0}
|
||||
return"string"!=typeof(t=t||{}).baseUrl&&(t.baseUrl=""),"boolean"!=typeof t.isBuild&&(t.isBuild=!1),"object"!=typeof t.paths&&(t.paths={}),"object"!=typeof t.config&&(t.config={}),void 0===t.catchError&&(t.catchError=!1),"string"!=typeof t.urlArgs&&(t.urlArgs=""),"function"!=typeof t.onError&&(t.onError=n),"object"==typeof t.ignoreDuplicateModules&&Array.isArray(t.ignoreDuplicateModules)||(t.ignoreDuplicateModules=[]),t.baseUrl.length>0&&(e.Utilities.endsWith(t.baseUrl,"/")||(t.baseUrl+="/")),Array.isArray(t.nodeModules)||(t.nodeModules=[]),("number"!=typeof t.nodeCachedDataWriteDelay||t.nodeCachedDataWriteDelay<0)&&(t.nodeCachedDataWriteDelay=7e3),"function"!=typeof t.onNodeCachedData&&(t.onNodeCachedData=function(e,t){e&&("cachedDataRejected"===e.errorCode?console.warn("Rejected cached data from file: "+e.path):"unlink"===e.errorCode||"writeFile"===e.errorCode?(console.error("Problems writing cached data file: "+e.path),console.error(e.detail)):console.error(e))}),t},
|
||||
t.mergeConfigurationOptions=function(n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=e.Utilities.recursiveClone(r||{});return e.Utilities.forEachProperty(n,function(t,n){"ignoreDuplicateModules"===t&&void 0!==i.ignoreDuplicateModules?i.ignoreDuplicateModules=i.ignoreDuplicateModules.concat(n):"paths"===t&&void 0!==i.paths?e.Utilities.forEachProperty(n,function(e,t){return i.paths[e]=t}):"config"===t&&void 0!==i.config?e.Utilities.forEachProperty(n,function(e,t){return i.config[e]=t}):i[t]=e.Utilities.recursiveClone(n)}),t.validateConfigurationOptions(i)},t}();e.ConfigurationOptionsUtil=t;var n=function(){function n(e,n){if(this._env=e,this.options=t.mergeConfigurationOptions(n),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),""===this.options.baseUrl){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){
|
||||
var r=this.options.nodeRequire.main.filename,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}if(this.options.nodeMain&&this._env.isNode){var r=this.options.nodeMain,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}}}return n.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e<this.options.ignoreDuplicateModules.length;e++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[e]]=!0},n.prototype._createNodeModulesMap=function(){this.nodeModulesMap=Object.create(null);for(var e=0,t=this.options.nodeModules;e<t.length;e++){var n=t[e];this.nodeModulesMap[n]=!0}},n.prototype._createSortedPathsRules=function(){var t=this;this.sortedPathsRules=[],e.Utilities.forEachProperty(this.options.paths,function(e,n){Array.isArray(n)?t.sortedPathsRules.push({from:e,to:n}):t.sortedPathsRules.push({from:e,to:[n]})}),this.sortedPathsRules.sort(function(e,t){
|
||||
return t.from.length-e.from.length})},n.prototype.cloneAndMerge=function(e){return new n(this._env,t.mergeConfigurationOptions(e,this.options))},n.prototype.getOptionsLiteral=function(){return this.options},n.prototype._applyPaths=function(t){for(var n,r=0,i=this.sortedPathsRules.length;r<i;r++)if(n=this.sortedPathsRules[r],e.Utilities.startsWith(t,n.from)){for(var o=[],s=0,u=n.to.length;s<u;s++)o.push(n.to[s]+t.substr(n.from.length));return o}return[t]},n.prototype._addUrlArgsToUrl=function(t){return e.Utilities.containsQueryString(t)?t+"&"+this.options.urlArgs:t+"?"+this.options.urlArgs},n.prototype._addUrlArgsIfNecessaryToUrl=function(e){return this.options.urlArgs?this._addUrlArgsToUrl(e):e},n.prototype._addUrlArgsIfNecessaryToUrls=function(e){if(this.options.urlArgs)for(var t=0,n=e.length;t<n;t++)e[t]=this._addUrlArgsToUrl(e[t]);return e},n.prototype.moduleIdToPaths=function(t){if(!0===this.nodeModulesMap[t])return this.isBuild()?["empty:"]:["node|"+t];var n,r=t
|
||||
;if(e.Utilities.endsWith(r,".js")||e.Utilities.isAbsolutePath(r))e.Utilities.endsWith(r,".js")||e.Utilities.containsQueryString(r)||(r+=".js"),n=[r];else for(var i=0,o=(n=this._applyPaths(r)).length;i<o;i++)this.isBuild()&&"empty:"===n[i]||(e.Utilities.isAbsolutePath(n[i])||(n[i]=this.options.baseUrl+n[i]),e.Utilities.endsWith(n[i],".js")||e.Utilities.containsQueryString(n[i])||(n[i]=n[i]+".js"));return this._addUrlArgsIfNecessaryToUrls(n)},n.prototype.requireToUrl=function(t){var n=t;return e.Utilities.isAbsolutePath(n)||(n=this._applyPaths(n)[0],e.Utilities.isAbsolutePath(n)||(n=this.options.baseUrl+n)),this._addUrlArgsIfNecessaryToUrl(n)},n.prototype.isBuild=function(){return this.options.isBuild},n.prototype.isDuplicateMessageIgnoredFor=function(e){return this.ignoreDuplicateModulesMap.hasOwnProperty(e)},n.prototype.getConfigForModule=function(e){if(this.options.config)return this.options.config[e]},n.prototype.shouldCatchError=function(){return this.options.catchError},
|
||||
n.prototype.shouldRecordStats=function(){return this.options.recordStats},n.prototype.onError=function(e){this.options.onError(e)},n}();e.Configuration=n}(i||(i={}));!function(e){var t=function(){function e(e){this._env=e,this._scriptLoader=null,this._callbackMap={}}return e.prototype.load=function(e,t,o,s){var u=this;this._scriptLoader||(this._scriptLoader=this._env.isWebWorker?new r:this._env.isNode?new i(this._env):new n);var a={callback:o,errorback:s};this._callbackMap.hasOwnProperty(t)?this._callbackMap[t].push(a):(this._callbackMap[t]=[a],this._scriptLoader.load(e,t,function(){return u.triggerCallback(t)},function(e){return u.triggerErrorback(t,e)}))},e.prototype.triggerCallback=function(e){var t=this._callbackMap[e];delete this._callbackMap[e];for(var n=0;n<t.length;n++)t[n].callback()},e.prototype.triggerErrorback=function(e,t){var n=this._callbackMap[e];delete this._callbackMap[e];for(var r=0;r<n.length;r++)n[r].errorback(t)},e}(),n=function(){function e(){}
|
||||
return e.prototype.attachListeners=function(e,t,n){var r=function(){e.removeEventListener("load",i),e.removeEventListener("error",o)},i=function(e){r(),t()},o=function(e){r(),n(e)};e.addEventListener("load",i),e.addEventListener("error",o)},e.prototype.load=function(e,t,n,r){var i=document.createElement("script");i.setAttribute("async","async"),i.setAttribute("type","text/javascript"),this.attachListeners(i,n,r),i.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(i)},e}(),r=function(){function e(){}return e.prototype.load=function(e,t,n,r){try{importScripts(t),n()}catch(e){r(e)}},e}(),i=function(){function t(e){this._env=e,this._didInitialize=!1,this._didPatchNodeRequire=!1}return t.prototype._init=function(e){if(!this._didInitialize){this._didInitialize=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"),this._crypto=e("crypto"),this._jsflags="";for(var t=0,n=process.argv;t<n.length;t++){var r=n[t];if(0===r.indexOf("--js-flags=")){this._jsflags=r;break}}}},
|
||||
t.prototype._initNodeRequire=function(t,n){var r=n.getConfig().getOptionsLiteral().nodeCachedDataDir;if(r&&!this._didPatchNodeRequire){this._didPatchNodeRequire=!0;var i=this,o=t("module");o.prototype._compile=function(t,s){t=t.replace(/^#!.*/,"");var u=o.wrap(t),a=i._getCachedDataPath(r,s),l={filename:s};try{l.cachedData=i._fs.readFileSync(a)}catch(e){l.produceCachedData=!0}var c=new i._vm.Script(u,l),d=c.runInThisContext(l),f=i._path.dirname(s),h=function(e){var t=e.constructor,n=function(t){try{return e.require(t)}finally{}};return n.resolve=function(n){return t._resolveFilename(n,e)},n.main=process.mainModule,n.extensions=t._extensions,n.cache=t._cache,n}(this),p=[this.exports,h,this,s,f,process,e.global,Buffer],m=d.apply(this.exports,p);return i._processCachedData(n,c,a),m}}},t.prototype.load=function(n,r,i,o){var s=this,u=n.getConfig().getOptionsLiteral(),a=u.nodeRequire||e.global.nodeRequire,l=u.nodeInstrumenter||function(e){return e};this._init(a),this._initNodeRequire(a,n);var c=n.getRecorder()
|
||||
;if(/^node\|/.test(r)){var d=r.split("|"),f=null;try{f=a(d[1])}catch(e){return void o(e)}n.enqueueDefineAnonymousModule([],function(){return f}),i()}else r=e.Utilities.fileUriToFilePath(this._env.isWindows,r),this._fs.readFile(r,{encoding:"utf8"},function(e,a){if(e)o(e);else{var d=s._path.normalize(r),f=d;if(s._env.isElectronRenderer){var h=f.match(/^([a-z])\:(.*)/i);f=h?"file:///"+(h[1].toUpperCase()+":"+h[2]).replace(/\\/g,"/"):"file://"+f}var p,m="(function (require, define, __filename, __dirname) { ";if(p=a.charCodeAt(0)===t._BOM?m+a.substring(1)+"\n});":m+a+"\n});",p=l(p,d),u.nodeCachedDataDir){var g=s._getCachedDataPath(u.nodeCachedDataDir,r);s._fs.readFile(g,function(e,t){var o={filename:f,produceCachedData:void 0===t,cachedData:t},u=s._loadAndEvalScript(n,r,f,p,o,c);i(),s._processCachedData(n,u,g)})}else s._loadAndEvalScript(n,r,f,p,{filename:f},c),i()}})},t.prototype._loadAndEvalScript=function(t,n,r,i,o,s){s.record(31,n);var u=new this._vm.Script(i,o)
|
||||
;return u.runInThisContext(o).call(e.global,t.getGlobalAMDRequireFunc(),t.getGlobalAMDDefineFunc(),r,this._path.dirname(n)),s.record(32,n),u},t.prototype._getCachedDataPath=function(e,t){var n=this._crypto.createHash("md5").update(t,"utf8").update(this._jsflags,"utf8").digest("hex"),r=this._path.basename(t).replace(/\.js$/,"");return this._path.join(e,r+"-"+n+".code")},t.prototype._processCachedData=function(e,n,r){var i=this;n.cachedDataRejected?(e.getConfig().getOptionsLiteral().onNodeCachedData({errorCode:"cachedDataRejected",path:r}),t._runSoon(function(){return i._fs.unlink(r,function(t){t&&e.getConfig().getOptionsLiteral().onNodeCachedData({errorCode:"unlink",path:r,detail:t})})},e.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay)):n.cachedDataProduced&&(e.getConfig().getOptionsLiteral().onNodeCachedData(void 0,{path:r,length:n.cachedData.length}),t._runSoon(function(){return i._fs.writeFile(r,n.cachedData,function(t){t&&e.getConfig().getOptionsLiteral().onNodeCachedData({errorCode:"writeFile",
|
||||
path:r,detail:t})})},e.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay))},t._runSoon=function(e,t){var n=t+Math.ceil(Math.random()*t);setTimeout(e,n)},t._BOM=65279,t}();e.createScriptLoader=function(e){return new t(e)}}(i||(i={}));!function(e){var t=function(){function t(e){var t=e.lastIndexOf("/");this.fromModulePath=-1!==t?e.substr(0,t+1):""}return t._normalizeModuleId=function(e){var t,n=e;for(t=/\/\.\//;t.test(n);)n=n.replace(t,"/");for(n=n.replace(/^\.\//g,""),t=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;t.test(n);)n=n.replace(t,"/");return n=n.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,"")},t.prototype.resolveModule=function(n){var r=n;return e.Utilities.isAbsolutePath(r)||(e.Utilities.startsWith(r,"./")||e.Utilities.startsWith(r,"../"))&&(r=t._normalizeModuleId(this.fromModulePath+r)),r},t.ROOT=new t(""),t}();e.ModuleIdResolver=t;var n=function(){function t(e,t,n,r,i,o){this.id=e,this.strId=t,this.dependencies=n,this._callback=r,
|
||||
this._errorback=i,this.moduleIdResolver=o,this.exports={},this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return t._safeInvokeFunction=function(t,n){try{return{returnedValue:t.apply(e.global,n),producedError:null}}catch(e){return{returnedValue:null,producedError:e}}},t._invokeFactory=function(t,n,r,i){return t.isBuild()&&!e.Utilities.isAnonymousModule(n)?{returnedValue:null,producedError:null}:t.shouldCatchError()?this._safeInvokeFunction(r,i):{returnedValue:r.apply(e.global,i),producedError:null}},t.prototype.complete=function(n,r,i){this._isComplete=!0;var o=null;if(this._callback)if("function"==typeof this._callback){n.record(21,this.strId);var s=t._invokeFactory(r,this.strId,this._callback,i);o=s.producedError,n.record(22,this.strId),o||void 0===s.returnedValue||this.exportsPassedIn&&!e.Utilities.isEmpty(this.exports)||(this.exports=s.returnedValue)}else this.exports=this._callback;o&&r.onError({errorCode:"factory",moduleId:this.strId,detail:o}),
|
||||
this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},t.prototype.onDependencyError=function(e){return!!this._errorback&&(this._errorback(e),!0)},t.prototype.isComplete=function(){return this._isComplete},t}();e.Module=n;var r=function(){function e(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return e.prototype.getMaxModuleId=function(){return this._nextId},e.prototype.getModuleId=function(e){var t=this._strModuleIdToIntModuleId.get(e);return void 0===t&&(t=this._nextId++,this._strModuleIdToIntModuleId.set(e,t),this._intModuleIdToStrModuleId[t]=e),t},e.prototype.getStrModuleId=function(e){return this._intModuleIdToStrModuleId[e]},e}(),i=function(){function e(e){this.id=e}return e.EXPORTS=new e(0),e.MODULE=new e(1),e.REQUIRE=new e(2),e}();e.RegularDependency=i;var o=function(){return function(e,t,n){this.id=e,this.pluginId=t,this.pluginParam=n}}()
|
||||
;e.PluginDependency=o;var s=function(){function s(t,n,i,o,s){void 0===s&&(s=0),this._env=t,this._scriptLoader=n,this._loaderAvailableTimestamp=s,this._defineFunc=i,this._requireFunc=o,this._moduleIdProvider=new r,this._config=new e.Configuration(this._env),this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return s.prototype.reset=function(){return new s(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},s.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},s.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},s._findRelevantLocationInStack=function(e,t){for(var n=function(e){return e.replace(/\\/g,"/")},r=n(e),i=t.split(/\n/),o=0;o<i.length;o++){var s=i[o].match(/(.*):(\d+):(\d+)\)?$/);if(s){
|
||||
var u=s[1],a=s[2],l=s[3],c=Math.max(u.lastIndexOf(" ")+1,u.lastIndexOf("(")+1);if(u=u.substr(c),(u=n(u))===r){var d={line:parseInt(a,10),col:parseInt(l,10)};return 1===d.line&&(d.col-="(function (require, define, __filename, __dirname) { ".length),d}}}throw new Error("Could not correlate define call site for needle "+e)},s.prototype.getBuildInfo=function(){if(!this._config.isBuild())return null;for(var e=[],t=0,n=0,r=this._modules2.length;n<r;n++){var i=this._modules2[n];if(i){var o=this._buildInfoPath[i.id]||null,u=this._buildInfoDefineStack[i.id]||null,a=this._buildInfoDependencies[i.id];e[t++]={id:i.strId,path:o,defineLocation:o&&u?s._findRelevantLocationInStack(o,u):null,dependencies:a,shim:null,exports:i.exports}}}return e},s.prototype.getRecorder=function(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new e.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=e.NullLoaderEventRecorder.INSTANCE),this._recorder},s.prototype.getLoaderEvents=function(){
|
||||
return this.getRecorder().getEvents()},s.prototype.enqueueDefineAnonymousModule=function(e,t){if(null!==this._currentAnnonymousDefineCall)throw new Error("Can only have one anonymous define call per script file");var n=null;this._config.isBuild()&&(n=new Error("StackLocation").stack),this._currentAnnonymousDefineCall={stack:n,dependencies:e,callback:t}},s.prototype.defineModule=function(e,r,i,o,s,u){var a=this;void 0===u&&(u=new t(e));var l=this._moduleIdProvider.getModuleId(e);if(this._modules2[l])this._config.isDuplicateMessageIgnoredFor(e)||console.warn("Duplicate definition of module '"+e+"'");else{var c=new n(l,e,this._normalizeDependencies(r,u),i,o,u);this._modules2[l]=c,this._config.isBuild()&&(this._buildInfoDefineStack[l]=s,this._buildInfoDependencies[l]=c.dependencies.map(function(e){return a._moduleIdProvider.getStrModuleId(e.id)})),this._resolve(c)}},s.prototype._normalizeDependency=function(e,t){if("exports"===e)return i.EXPORTS;if("module"===e)return i.MODULE;if("require"===e)return i.REQUIRE
|
||||
;var n=e.indexOf("!");if(n>=0){var r=t.resolveModule(e.substr(0,n)),s=t.resolveModule(e.substr(n+1)),u=this._moduleIdProvider.getModuleId(r+"!"+s),a=this._moduleIdProvider.getModuleId(r);return new o(u,a,s)}return new i(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},s.prototype._normalizeDependencies=function(e,t){for(var n=[],r=0,i=0,o=e.length;i<o;i++)n[r++]=this._normalizeDependency(e[i],t);return n},s.prototype._relativeRequire=function(t,n,r,i){if("string"==typeof n)return this.synchronousRequire(n,t);this.defineModule(e.Utilities.generateAnonymousModule(),n,r,i,null,t)},s.prototype.synchronousRequire=function(e,n){void 0===n&&(n=new t(e));var r=this._normalizeDependency(e,n),i=this._modules2[r.id];if(!i)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+e+"'. This is the first mention of this module!")
|
||||
;if(!i.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+e+"'. This module has not been resolved completely yet.");return i.exports},s.prototype.configure=function(t,n){var r=this._config.shouldRecordStats();this._config=n?new e.Configuration(this._env,t):this._config.cloneAndMerge(t),this._config.shouldRecordStats()&&!r&&(this._recorder=null)},s.prototype.getConfig=function(){return this._config},s.prototype._onLoad=function(e){if(null!==this._currentAnnonymousDefineCall){var t=this._currentAnnonymousDefineCall;this._currentAnnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(e),t.dependencies,t.callback,null,t.stack)}},s.prototype._createLoadError=function(e,t){var n=this;return{errorCode:"load",moduleId:this._moduleIdProvider.getStrModuleId(e),neededBy:(this._inverseDependencies2[e]||[]).map(function(e){return n._moduleIdProvider.getStrModuleId(e)}),detail:t}},s.prototype._onLoadError=function(e,t){
|
||||
for(var n=this._createLoadError(e,t),r=[],i=0,o=this._moduleIdProvider.getMaxModuleId();i<o;i++)r[i]=!1;var s=!1,u=[];for(u.push(e),r[e]=!0;u.length>0;){var a=u.shift(),l=this._modules2[a];l&&(s=l.onDependencyError(n)||s);var c=this._inverseDependencies2[a];if(c)for(var i=0,o=c.length;i<o;i++){var d=c[i];r[d]||(u.push(d),r[d]=!0)}}s||this._config.onError(n)},s.prototype._hasDependencyPath=function(e,t){var n=this._modules2[e];if(!n)return!1;for(var r=[],i=0,o=this._moduleIdProvider.getMaxModuleId();i<o;i++)r[i]=!1;var s=[];for(s.push(n),r[e]=!0;s.length>0;){var u=s.shift().dependencies;if(u)for(var i=0,o=u.length;i<o;i++){var a=u[i];if(a.id===t)return!0;var l=this._modules2[a.id];l&&!r[a.id]&&(r[a.id]=!0,s.push(l))}}return!1},s.prototype._findCyclePath=function(e,t,n){if(e===t||50===n)return[e];var r=this._modules2[e];if(!r)return null;for(var i=r.dependencies,o=0,s=i.length;o<s;o++){var u=this._findCyclePath(i[o].id,t,n+1);if(null!==u)return u.push(e),u}return null},s.prototype._createRequire=function(t){
|
||||
var n=this,r=function(e,r,i){return n._relativeRequire(t,e,r,i)};return r.toUrl=function(e){return n._config.requireToUrl(t.resolveModule(e))},r.getStats=function(){return n.getLoaderEvents()},r.__$__nodeRequire=e.global.nodeRequire,r},s.prototype._loadModule=function(e){var t=this;if(!this._modules2[e]&&!this._knownModules2[e]){this._knownModules2[e]=!0;var n=this._moduleIdProvider.getStrModuleId(e),r=this._config.moduleIdToPaths(n);this._env.isNode&&(-1===n.indexOf("/")||/^@[^\/]+\/[^\/]+$/.test(n))&&r.push("node|"+n);var i=-1,o=function(n){if(++i>=r.length)t._onLoadError(e,n);else{var s=r[i],u=t.getRecorder();if(t._config.isBuild()&&"empty:"===s)return t._buildInfoPath[e]=s,t.defineModule(t._moduleIdProvider.getStrModuleId(e),[],null,null,null),void t._onLoad(e);u.record(10,s),t._scriptLoader.load(t,s,function(){t._config.isBuild()&&(t._buildInfoPath[e]=s),u.record(11,s),t._onLoad(e)},function(e){u.record(12,s),o(e)})}};o(null)}},s.prototype._loadPluginDependency=function(e,n){var r=this
|
||||
;if(!this._modules2[n.id]&&!this._knownModules2[n.id]){this._knownModules2[n.id]=!0;var i=function(e){r.defineModule(r._moduleIdProvider.getStrModuleId(n.id),[],e,null,null)};i.error=function(e){r._config.onError(r._createLoadError(n.id,e))},e.load(n.pluginParam,this._createRequire(t.ROOT),i,this._config.getOptionsLiteral())}},s.prototype._resolve=function(e){for(var t=this,n=e.dependencies,r=0,s=n.length;r<s;r++){var u=n[r];if(u!==i.EXPORTS)if(u!==i.MODULE)if(u!==i.REQUIRE){var a=this._modules2[u.id];if(a&&a.isComplete())e.unresolvedDependenciesCount--;else if(this._hasDependencyPath(u.id,e.id)){console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(u.id)+"' and '"+this._moduleIdProvider.getStrModuleId(e.id)+"'. The cyclic path follows:");var l=this._findCyclePath(u.id,e.id,0);l.reverse(),l.push(u.id),console.warn(l.map(function(e){return t._moduleIdProvider.getStrModuleId(e)}).join(" => \n")),e.unresolvedDependenciesCount--
|
||||
}else if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(e.id),u instanceof o){var c=this._modules2[u.pluginId];if(c&&c.isComplete()){this._loadPluginDependency(c.exports,u);continue}var d=this._inversePluginDependencies2.get(u.pluginId);d||(d=[],this._inversePluginDependencies2.set(u.pluginId,d)),d.push(u),this._loadModule(u.pluginId)}else this._loadModule(u.id)}else e.unresolvedDependenciesCount--;else e.unresolvedDependenciesCount--;else e.exportsPassedIn=!0,e.unresolvedDependenciesCount--}0===e.unresolvedDependenciesCount&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,n=this.getRecorder();if(!e.isComplete()){for(var r=e.dependencies,o=[],s=0,u=r.length;s<u;s++){var a=r[s];if(a!==i.EXPORTS)if(a!==i.MODULE)if(a!==i.REQUIRE){var l=this._modules2[a.id];o[s]=l?l.exports:null}else o[s]=this._createRequire(e.moduleIdResolver);else o[s]={id:e.strId,config:function(){return t._config.getConfigForModule(e.strId)}
|
||||
};else o[s]=e.exports}e.complete(n,this._config,o);var c=this._inverseDependencies2[e.id];if(this._inverseDependencies2[e.id]=null,c)for(var s=0,u=c.length;s<u;s++){var d=c[s],f=this._modules2[d];f.unresolvedDependenciesCount--,0===f.unresolvedDependenciesCount&&this._onModuleComplete(f)}var h=this._inversePluginDependencies2.get(e.id);if(h){this._inversePluginDependencies2.delete(e.id);for(var s=0,u=h.length;s<u;s++)this._loadPluginDependency(e.exports,h[s])}}},s}();e.ModuleManager=s}(i||(i={}));var r,i;!function(e){function t(){if(void 0!==e.global.require||"undefined"!=typeof require){var t=e.global.require||require;if("function"==typeof t&&"function"==typeof t.resolve){var r=function(e){i.getRecorder().record(33,e);try{return t(e)}finally{i.getRecorder().record(34,e)}};e.global.nodeRequire=r,u.nodeRequire=r,u.__$__nodeRequire=r}}n.isNode&&!n.isElectronRenderer?(module.exports=u,require=u):(n.isElectronRenderer||(e.global.define=o),e.global.require=u)}var n=new e.Environment,i=null,o=function(e,t,n){
|
||||
"string"!=typeof e&&(n=t,t=e,e=null),"object"==typeof t&&Array.isArray(t)||(n=t,t=null),t||(t=["require","exports","module"]),e?i.defineModule(e,t,n,null,null):i.enqueueDefineAnonymousModule(t,n)};o.amd={jQuery:!0};var s=function(e,t){void 0===t&&(t=!1),i.configure(e,t)},u=function(){if(1===arguments.length){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0]))return void s(arguments[0]);if("string"==typeof arguments[0])return i.synchronousRequire(arguments[0])}if(2!==arguments.length&&3!==arguments.length||!Array.isArray(arguments[0]))throw new Error("Unrecognized require call");i.defineModule(e.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null)};u.config=s,u.getConfig=function(){return i.getConfig().getOptionsLiteral()},u.reset=function(){i=i.reset()},u.getBuildInfo=function(){return i.getBuildInfo()},u.getStats=function(){return i.getLoaderEvents()},u.define=function(){return o.apply(null,arguments)},e.init=t,
|
||||
"function"==typeof e.global.define&&e.global.define.amd||(i=new e.ModuleManager(n,e.createScriptLoader(n),o,u,e.Utilities.getHighPerformanceTimestamp()),void 0!==e.global.require&&"function"!=typeof e.global.require&&u.config(e.global.require),(r=function(){return o.apply(null,arguments)}).amd=o.amd,"undefined"==typeof doNotInitLoader&&t())}(i||(i={})),r(e[17],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),r(e[12],t([1,0,17]),function(e,t,n){"use strict";function r(e){return{getLength:function(){return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.stringDiff=function(e,t,n){
|
||||
return new u(r(e),r(t)).ComputeDiff(n)};var i=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=i;var o=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;o<i;o++)n[r+o]=e[t+o]},e}();t.MyArray=o;var s=function(){function e(){this.m_changes=[],this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){
|
||||
this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){
|
||||
return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,r,i){var o=this.ComputeDiffRecursive(e,t,n,r,[!1]);return i?this.ShiftChanges(o):o},e.prototype.ComputeDiffRecursive=function(e,t,r,o,s){for(s[0]=!1;e<=t&&r<=o&&this.ElementsAreEqual(e,r);)e++,r++;for(;t>=e&&o>=r&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||r>o){var u=void 0;return r<=o?(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new n.DiffChange(e,0,r,o-r+1)]):e<=t?(i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[new n.DiffChange(e,t-e+1,r,0)]):(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}var a=[0],l=[0],c=this.ComputeRecursionPoint(e,t,r,o,a,l,s),d=a[0],f=l[0]
|
||||
;if(null!==c)return c;if(!s[0]){var h=this.ComputeDiffRecursive(e,d,r,f,s),p=[];return p=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,f+1,o-(f+1)+1)]:this.ComputeDiffRecursive(d+1,t,f+1,o,s),this.ConcatenateChanges(h,p)}return[new n.DiffChange(e,t-e+1,r,o-r+1)]},e.prototype.WALKTRACE=function(e,t,r,i,o,u,a,l,c,d,f,h,p,m,g,_,v,y){var b,C=null,S=null,E=new s,L=t,N=r,P=p[0]-_[0]-i,A=Number.MIN_VALUE,M=this.m_forwardHistory.length-1;do{(b=P+e)===L||b<N&&c[b-1]<c[b+1]?(m=(f=c[b+1])-P-i,f<A&&E.MarkNextChange(),A=f,E.AddModifiedElement(f+1,m),P=b+1-e):(m=(f=c[b-1]+1)-P-i,f<A&&E.MarkNextChange(),A=f-1,E.AddOriginalElement(f,m+1),P=b-1-e),M>=0&&(e=(c=this.m_forwardHistory[M])[0],L=1,N=c.length-1)}while(--M>=-1);if(C=E.getReverseChanges(),y[0]){var w=p[0]+1,D=_[0]+1;if(null!==C&&C.length>0){var I=C[C.length-1];w=Math.max(w,I.getOriginalEnd()),D=Math.max(D,I.getModifiedEnd())}S=[new n.DiffChange(w,h-w+1,D,g-D+1)]}else{E=new s,L=u,N=a,P=p[0]-_[0]-l,A=Number.MAX_VALUE,
|
||||
M=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(b=P+o)===L||b<N&&d[b-1]>=d[b+1]?(m=(f=d[b+1]-1)-P-l,f>A&&E.MarkNextChange(),A=f+1,E.AddOriginalElement(f+1,m+1),P=b+1-o):(m=(f=d[b-1])-P-l,f>A&&E.MarkNextChange(),A=f,E.AddModifiedElement(f+1,m+1),P=b-1-o),M>=0&&(o=(d=this.m_reverseHistory[M])[0],L=1,N=d.length-1)}while(--M>=-1);S=E.getChanges()}return this.ConcatenateChanges(C,S)},e.prototype.ComputeRecursionPoint=function(e,t,r,i,s,u,a){var l,c,d,f=0,h=0,p=0,m=0;e--,r--,s[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(i-r),_=g+1,v=new Array(_),y=new Array(_),b=i-r,C=t-e,S=e-r,E=t-i,L=(C-b)%2==0;v[b]=e,y[C]=t,a[0]=!1;var N,P;for(d=1;d<=g/2+1;d++){var A=0,M=0;for(f=this.ClipDiagonalBound(b-d,d,b,_),h=this.ClipDiagonalBound(b+d,d,b,_),N=f;N<=h;N+=2){for(c=(l=N===f||N<h&&v[N-1]<v[N+1]?v[N+1]:v[N-1]+1)-(N-b)-S,P=l;l<t&&c<i&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(v[N]=l,l+c>A+M&&(A=l,M=c),!L&&Math.abs(N-C)<=d-1&&l>=y[N])return s[0]=l,u[0]=c,
|
||||
P<=y[N]&&d<=1448?this.WALKTRACE(b,f,h,S,C,p,m,E,v,y,l,t,s,c,i,u,L,a):null}var w=(A-e+(M-r)-d)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(A,this.OriginalSequence,w))return a[0]=!0,s[0]=A,u[0]=M,w>0&&d<=1448?this.WALKTRACE(b,f,h,S,C,p,m,E,v,y,l,t,s,c,i,u,L,a):(e++,r++,[new n.DiffChange(e,t-e+1,r,i-r+1)]);for(p=this.ClipDiagonalBound(C-d,d,C,_),m=this.ClipDiagonalBound(C+d,d,C,_),N=p;N<=m;N+=2){for(c=(l=N===p||N<m&&y[N-1]>=y[N+1]?y[N+1]-1:y[N-1])-(N-C)-E,P=l;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(y[N]=l,L&&Math.abs(N-b)<=d&&l<=v[N])return s[0]=l,u[0]=c,P>=v[N]&&d<=1448?this.WALKTRACE(b,f,h,S,C,p,m,E,v,y,l,t,s,c,i,u,L,a):null}if(d<=1447){var D=new Array(h-f+2);D[0]=b-f+1,o.Copy(v,f,D,1,h-f+1),this.m_forwardHistory.push(D),(D=new Array(m-p+2))[0]=C-p+1,o.Copy(y,p,D,1,m-p+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(b,f,h,S,C,p,m,E,v,y,l,t,s,c,i,u,L,a)},e.prototype.ShiftChanges=function(e){var t;do{t=!1
|
||||
;for(l=0;l<e.length;l++)for(var n=e[l],r=l<e.length-1?e[l+1].originalStart:this.OriginalSequence.getLength(),i=l<e.length-1?e[l+1].modifiedStart:this.ModifiedSequence.getLength(),o=n.originalLength>0,s=n.modifiedLength>0;n.originalStart+n.originalLength<r&&n.modifiedStart+n.modifiedLength<i&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));)n.originalStart++,n.modifiedStart++;for(var u=new Array,a=[null],l=0;l<e.length;l++)l<e.length-1&&this.ChangesOverlap(e[l],e[l+1],a)?(t=!0,u.push(a[0]),l++):u.push(e[l]);e=u}while(t);for(l=e.length-1;l>=0;l--){var n=e[l],r=0,i=0;if(l>0){var c=e[l-1];c.originalLength>0&&(r=c.originalStart+c.originalLength),c.modifiedLength>0&&(i=c.modifiedStart+c.modifiedLength)}for(var o=n.originalLength>0,s=n.modifiedLength>0,d=0,f=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),h=1;;h++){
|
||||
var p=n.originalStart-h,m=n.modifiedStart-h;if(p<r||m<i)break;if(o&&!this.OriginalElementsAreEqual(p,p+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(m,m+n.modifiedLength))break;var g=this._boundaryScore(p,n.originalLength,m,n.modifiedLength);g>f&&(f=g,d=h)}n.originalStart-=d,n.modifiedStart-=d}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){
|
||||
if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],r=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(r=new Array(e.length+t.length-1),o.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],o.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),o.Copy(e,0,r,0,e.length),o.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,r){if(i.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),i.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){
|
||||
var o=e.originalStart,s=e.originalLength,u=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),r[0]=new n.DiffChange(o,s,u,a),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e<r)return e;var i=r-n-1,o=t%2==0;if(e<0){return o===(n%2==0)?0:1}return o===(i%2==0)?r-1:r-2},e}();t.LcsDiff=u}),r(e[21],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}}),r(e[15],t([1,0]),function(e,t){"use strict";function n(e,t){var n=!!(2048&e),r=!!(256&e);return new u(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}
|
||||
return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),i=new r,o=new r,s=new r;!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),i.define(e,t),o.define(e,n),s.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),
|
||||
e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}();!function(e){
|
||||
e.toString=function(e){return i.keyCodeToStr(e)},e.fromString=function(e){return i.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return s.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||s.strToKeyCode(e)}}(t.KeyCodeUtils||(t.KeyCodeUtils={})),t.KeyChord=function(e,t){return(e|(65535&t)<<16>>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var r=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new a(n(r,t),n(i,t)):n(r,t)},t.createSimpleKeybinding=n;var u=function(){function e(e,t,n,r,i){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},
|
||||
e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=u;var a=function(){return function(e,t){this.type=2,this.firstPart=e,this.chordPart=t}}();t.ChordKeybinding=a;var l=function(){return function(e,t,n,r,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=i,this.keyAriaLabel=o}}();t.ResolvedKeybindingPart=l;var c=function(){return function(){}}();t.ResolvedKeybinding=c}),r(e[8],t([1,0]),function(e,t){"use strict";function n(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0!==t.length?(n(e),n(t),[]):e?(e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=n,t.combinedDisposable=function(e){return{dispose:function(){return n(e)}}},
|
||||
t.toDisposable=function(e){return{dispose:function(){e()}}};var r=function(){function e(){this._toDispose=[]}return Object.defineProperty(e.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._toDispose=n(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}();t.Disposable=r;var i=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=i}),r(e[18],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){this.element=e}}(),r=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var r=this,i=new n(e);if(this._first)if(t){var o=this._last;this._last=i,i.prev=o,o.next=i}else{
|
||||
var s=this._first;this._first=i,i.next=s,s.prev=i}else this._first=i,this._last=i;return function(){for(var e=r._first;e instanceof n;e=e.next)if(e===i){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(r._first=r._first.next,r._first.prev=void 0):(r._last=r._last.prev,r._last.next=void 0):(r._first=void 0,r._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}();t.LinkedList=r}),r(e[4],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,i=!1,o=!1,s=!1;if(t.LANGUAGE_DEFAULT="en","object"==typeof process&&"function"==typeof process.nextTick&&"string"==typeof process.platform){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform,t.LANGUAGE_DEFAULT,t.LANGUAGE_DEFAULT;var u=process.env.VSCODE_NLS_CONFIG;if(u)try{
|
||||
var a=JSON.parse(u),l=a.availableLanguages["*"];a.locale,l||t.LANGUAGE_DEFAULT,a._translationsConfigFile}catch(e){}o=!0}else if("object"==typeof navigator){var c=navigator.userAgent;n=c.indexOf("Windows")>=0,r=c.indexOf("Macintosh")>=0,i=c.indexOf("Linux")>=0,s=!0,navigator.language}var d;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(d=t.Platform||(t.Platform={}));t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isNative=o,t.isWeb=s;var f="object"==typeof self?self:"object"==typeof global?global:{};t.globals=f;var h=null;t.setImmediate=function(e){return null===h&&(h=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),h(e)},t.OS=r?2:n?1:3}),r(e[14],t([1,0]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function r(e,t){if(!e||!t)return e;var n=t.length
|
||||
;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function i(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(-1===(o=e.lastIndexOf(t,i-1))||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function o(e,t){return e<t?-1:e>t?1:0}function s(e){return e>=97&&e<=122}function u(e){return e>=65&&e<=90}function a(e){return s(e)||u(e)}function l(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r<n;r++){var i=e.charCodeAt(r),o=t.charCodeAt(r);if(i!==o)if(a(i)&&a(o)){var s=Math.abs(i-o);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function c(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){
|
||||
void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o<t;o++)i.push(n);return i.reverse().join("")};var d=/{(\d+)}/g;t.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(d,function(e,n){var r=parseInt(n,10);return isNaN(r)||r<0||r>=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),i(r(e,t),t)},t.ltrim=r,t.rtrim=i,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},t.endsWith=function(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,r){if(void 0===r&&(r={}),
|
||||
!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),r.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return r.global&&(i+="g"),r.matchCase||(i+="i"),r.multiline&&(i+="m"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t<n;t++){var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1},t.getLeadingWhitespace=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(32!==i&&9!==i)return e.substring(t,r)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=o,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.charCodeAt(r),a=t.charCodeAt(r);if(i!==a){
|
||||
u(i)&&(i+=32),u(a)&&(a+=32);var l=i-a;if(0!==l)return s(i)&&s(a)?l:o(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=s,t.isUpperAsciiLetter=u,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&l(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&l(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r},t.commonSuffixLength=function(e,t){var n,r=Math.min(e.length,t.length),i=e.length-1,o=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343}
|
||||
;var f=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return f.test(e)};var h=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return h.test(e)};var p=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return p.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;t<n;t++)if(c(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=c,t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),
|
||||
t.startsWithUTF8BOM=function(e){return e&&e.length>0&&65279===e.charCodeAt(0)},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}});var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();r(e[11],t([1,0,4]),function(e,t,n){"use strict";function r(e,t){for(var n=void 0,r=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=g[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),
|
||||
void 0!==n?n:e}function i(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){var n=t?function(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:r,i="",o=e.scheme,s=e.authority,u=e.path,a=e.query,l=e.fragment;if(o&&(i+=o,i+=":"),(s||"file"===o)&&(i+=f,i+=f),s){var c=s.indexOf("@");if(-1!==c){var d=s.substr(0,c);s=s.substr(c+1),-1===(c=d.indexOf(":"))?i+=n(d,!1):(i+=n(d.substr(0,c),!1),i+=":",i+=n(d.substr(c+1),!1)),i+="@"}-1===(c=(s=s.toLowerCase()).indexOf(":"))?i+=n(s,!1):(i+=n(s.substr(0,c),!1),i+=s.substr(c))}if(u){if(u.length>=3&&47===u.charCodeAt(0)&&58===u.charCodeAt(2)){
|
||||
(h=u.charCodeAt(1))>=65&&h<=90&&(u="/"+String.fromCharCode(h+32)+":"+u.substr(3))}else if(u.length>=2&&58===u.charCodeAt(1)){var h=u.charCodeAt(0);h>=65&&h<=90&&(u=String.fromCharCode(h+32)+":"+u.substr(2))}i+=n(u,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:r(l,!1)),i}Object.defineProperty(t,"__esModule",{value:!0});var u,a=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//,d="",f="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,r,i){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=e||d,this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==f&&(t=f+t):t=f}return t}(this.scheme,n||d),this.query=r||d,this.fragment=i||d,function(e){if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){
|
||||
if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return i(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===r?r=this.path:null===r&&(r=d),void 0===i?i=this.query:null===i&&(i=d),void 0===o?o=this.fragment:null===o&&(o=d),
|
||||
t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new m(t,n,r,i,o)},e.parse=function(e){var t=h.exec(e);return t?new m(t[2]||d,decodeURIComponent(t[4]||d),decodeURIComponent(t[5]||d),decodeURIComponent(t[7]||d),decodeURIComponent(t[9]||d)):new m(d,d,d,d,d)},e.file=function(e){var t=d;if(n.isWindows&&(e=e.replace(/\\/g,f)),e[0]===f&&e[1]===f){var r=e.indexOf(f,2);-1===r?(t=e.substring(2),e=f):(t=e.substring(2,r),e=e.substring(r)||f)}return new m("file",t,e,d,d)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),s(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new m(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.default=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return o(t,e),
|
||||
Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=i(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(p),g=(u={},u[58]="%3A",u[47]="%2F",u[63]="%3F",u[35]="%23",u[91]="%5B",u[93]="%5D",u[64]="%40",u[33]="%21",u[36]="%24",u[38]="%26",u[39]="%27",u[40]="%28",u[41]="%29",u[42]="%2A",u[43]="%2B",u[44]="%2C",u[59]="%3B",u[61]="%3D",u[32]="%20",u)});var s;!function(){var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,r){var i={},o=!1,s=n.map(function(t){return"exports"===t?(o=!0,i):e[t]
|
||||
}),u=r.apply({},s);e[t]=o?i:u};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):e.setTimeout.bind(e)),t(n)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,r){"use strict";function i(e,t,n){var r,i,o,s=Object.keys(t),u=Array.isArray(e);for(i=0,o=s.length;i<o;i++){var a=s[i],l=95!==a.charCodeAt(0),c=t[a]
|
||||
;!c||"object"!=typeof c||void 0===c.value&&"function"!=typeof c.get&&"function"!=typeof c.set?l?u?e.forEach(function(e){e[a]=c}):e[a]=c:(r=r||{})[a]={value:c,enumerable:l,configurable:!0,writable:!0}:(void 0===c.enumerable&&(c.enumerable=l),n&&c.setName&&"function"==typeof c.setName&&c.setName(n+"."+a),(r=r||{})[a]=c)}r&&(u?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){function n(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var s=0,u=o.length;s<u;s++){var a=o[s];i[a]||Object.defineProperty(i,a,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[a]}}return i}function o(e,t,r){var o=n(e,t);return r&&i(o,r,t||"<ANONYMOUS>"),o}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var u={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,
|
||||
enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=u.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case u.initialized:return n;case u.uninitialized:i=u.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=u.uninitialized}return e=null,i=u.initialized,n;case u.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case u.working:throw"Illegal: reentrancy on initialization";default:i=u.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,o){var s=[e],u=null;return r&&(u=n(t,r),s.push(u)),i(s,o,r||"<ANONYMOUS>"),u},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t),r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,s){if(e){r=r||function(){};var u=e.prototype
|
||||
;return r.prototype=Object.create(u),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),s&&i(r,s),r}return t(r,o,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),
|
||||
r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}var r=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.useCapture===n&&s.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){
|
||||
for(var i=new r(e,t,this),o=0,s=(n=n.slice(0,n.length)).length;o<s&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(s.listener===t&&s.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];e["on"+i]=n(i)}return e},eventMixin:i})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,
|
||||
_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,r,i,o){"use strict";function s(){}function u(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?I:T,e._value=t,e._setState(n)}function a(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function l(e,t,n,r){var i=n._isException,o=n._errorId;return a(i?t:null,i?null:t,e,o,n,r)}function c(e,t,n){var r=n._isException,i=n._errorId;return b(e,i,r),a(r?t:null,r?null:t,e,i,n)}function d(e,t){var n=++W;return b(e,n),a(null,t,e,n)}function f(e,t){var n=++W;return b(e,n,!0),a(t,null,e,n)}function h(e,t,n,r){y(e,{c:t,e:n,p:r,
|
||||
asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function p(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(U)}function m(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var s,u;for(s=0,u=Array.isArray(i)?i.length:1;s<u;s++){var a=1===u?i:i[s],l=a.c,c=a.promise;if(o._traceAsyncOperationCompleted(a.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),c){o._traceAsyncCallbackStarting(a.asyncOpID);try{c._setCompleteValue(l?l(r):r)}catch(e){c._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}c._state!==I&&c._listeners&&n.push(c)}else Y.prototype.done.call(t,l)}}}function g(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var s,u;for(s=0,u=Array.isArray(i)?i.length:1;s<u;s++){var a=1===u?i:i[s],c=a.e,d=a.promise,f=e.Debug&&(r&&r.name===P?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(o._traceAsyncOperationCompleted(a.asyncOpID,f),d){var h=!1;try{c?(o._traceAsyncCallbackStarting(a.asyncOpID),h=!0,c.handlesOnError||_(d,r,l,t,c),
|
||||
d._setCompleteValue(c(r))):d._setChainedErrorValue(r,t)}catch(e){d._setExceptionValue(e)}finally{h&&o._traceAsyncCallbackCompleted()}d._state!==I&&d._listeners&&n.push(d)}else B.prototype.done.call(t,null,c)}}}function _(e,t,n,r,i){if(L._listeners[N]){if(t instanceof Error&&t.message===P)return;L.dispatchEvent(N,n(e,t,r,i))}}function v(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;r<i;r++){var o=1===i?n:n[r],s=o.p;if(s)try{s(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function y(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function b(e,t,n){e._isException=n||!1,e._errorId=t}function C(e,t,n,r){e._value=t,_(e,t,n,r),e._setState(F)}function S(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?I:R,e._value=t,e._setState(n)}function E(e,t,n,r){var i=new j(e);return y(e,{promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0)
|
||||
;var L=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));L._listeners={};var N="error",P="Canceled",A=!1,M={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};M.all=M.promise|M.thenPromise|M.errorPromise|M.exceptionPromise|M.completePromise;var w,D,I,k,x,O,T,R,U,F,W=1;w={name:"created",enter:function(e){e._setState(D)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},D={name:"working",enter:s,cancel:function(e){e._setState(x)},done:h,then:E,_completed:u,_error:p,_notify:s,_progress:v,_setCompleteValue:S,_setErrorValue:C},I={name:"waiting",enter:function(e){var t=e._value;if(t instanceof j&&t._state!==F&&t._state!==R)y(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(_(e,r,l,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(k)},done:h,then:E,_completed:u,_error:p,_notify:s,_progress:v,
|
||||
_setCompleteValue:S,_setErrorValue:C},k={name:"waiting_canceled",enter:function(e){e._setState(O);var t=e._value;t.cancel&&t.cancel()},cancel:s,done:h,then:E,_completed:u,_error:p,_notify:s,_progress:v,_setCompleteValue:S,_setErrorValue:C},x={name:"canceled",enter:function(e){e._setState(O),e._cancelAction()},cancel:s,done:h,then:E,_completed:u,_error:p,_notify:s,_progress:v,_setCompleteValue:S,_setErrorValue:C},O={name:"canceling",enter:function(e){var t=new Error(P);t.name=t.message,e._value=t,e._setState(U)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},T={name:"complete_notify",enter:function(e){if(e.done=Y.prototype.done,e.then=Y.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(R)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s},R={name:"success",enter:function(e){e.done=Y.prototype.done,e.then=Y.prototype.then,e._cleanupAction()},
|
||||
cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s},U={name:"error_notify",enter:function(e){if(e.done=B.prototype.done,e.then=B.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(F)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},F={name:"error",enter:function(e){e.done=B.prototype.done,e.then=B.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s};var q,K=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function e(t,n,r){if(this.then===e)return this._state.then(this,t,n,r);this.then(t,n,r)},_chainedError:function(e,t){var n=this._state._error(this,e,c,t);return this._run(),n},_completed:function(e){
|
||||
var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,d);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,c,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,f);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),j=n.Class.derive(K,function(e){A&&(!0===A||A&M.thenPromise)&&(this._stack=H._getStack()),this._creator=e,this._setState(w),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),B=n.Class.define(function(e){
|
||||
A&&(!0===A||A&M.errorPromise)&&(this._stack=H._getStack()),this._value=e,_(this,e,d)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||_(null,n,l,this,t);var r=t(n);return void(r&&"object"==typeof r&&"function"==typeof r.done&&r.done())}catch(e){n=e}n instanceof Error&&n.message===P||H._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||_(null,r,l,this,t),n=new Y(t(r))}catch(e){n=e===r?this:new V(e)}return n}},{supportedForProcessing:!1}),V=n.Class.derive(B,function(e){A&&(!0===A||A&M.exceptionPromise)&&(this._stack=H._getStack()),this._value=e,_(this,e,f)},{},{supportedForProcessing:!1}),Y=n.Class.define(function(e){if(A&&(!0===A||A&M.completePromise)&&(this._stack=H._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new j(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){
|
||||
H._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new Y(t)}catch(e){return new V(e)}}},{supportedForProcessing:!1}),H=n.Class.derive(K,function(e,t){A&&(!0===A||A&M.promise)&&(this._stack=H._getStack()),this._oncancel=t,this._setState(w),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;L.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){L.addEventListener(e,t,n)},any:function(e){return new H(function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach(function(o){H.as(e[o]).then(function(){t({key:o,value:e[o]})},function(s){s instanceof Error&&s.name===P?++i===r.length&&t(H.cancel):n({key:o,value:e[o]})})})},function(){
|
||||
Object.keys(e).forEach(function(t){var n=H.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new Y(e)},cancel:{get:function(){return q=q||new B(new r(P))}},dispatchEvent:function(e,t){return L.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new H(function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},u=0,a=i.length,l=function(e){if(0==--a){var u=Object.keys(o).length;if(0===u)t(s);else{var l=0;i.forEach(function(e){var t=o[e];t instanceof Error&&t.name===P&&l++}),l===u?t(H.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach(function(t){var n=e[t];void 0===n?u++:H.then(n,function(e){s[t]=e,l(t)},function(e){o[t]=e,l(t)})}),0!==(a-=u)||t(s)},function(){Object.keys(e).forEach(function(t){var n=H.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){L.removeEventListener(e,t,n)},supportedForProcessing:!1,
|
||||
then:function(e,t,n,r){return H.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=H.as(e[o]).then(t,n,r)}),H.join(i)},timeout:function(n,r){var i=function(n){var r;return new H(function(i){n?r=e.setTimeout(i,n):t._setImmediate(i)},function(){r&&e.clearTimeout(r)})}(n);return r?function(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}(i,r):i},wrap:function(e){return new Y(e)},wrapError:function(e){return new B(e)},_veryExpensiveTagWithStack:{get:function(){return A},set:function(e){A=e}},_veryExpensiveTagWithStack_tag:M,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!H.is(e))return H.wrap(e);var n,r,i=new H(function(e,t){n=e,r=t},function(){n=null,r=null,t&&t()});return e.then(function(e){n&&n(e)},function(e){r&&r(e)}),i}});return Object.defineProperties(H,i.createEventProperties(N)),H._doneHandler=function(e){
|
||||
t._setImmediate(function(){throw e})},{PromiseStateMachine:K,Promise:H,state_created:w}}),t("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){"use strict";return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),(s=e["WinJS/Core/_WinJS"]).TPromise=s.Promise,s.PPromise=s.Promise,"undefined"==typeof exports&&"function"==typeof r&&r.amd?r("vs/base/common/winjs.base",[],s):module.exports=s}(),r(e[6],t([1,0,3]),function(e,t,n){"use strict";function r(e){i(e)||t.errorHandler.onUnexpectedError(e)}function i(e){return e instanceof Error&&e.name===u&&e.message===u}Object.defineProperty(t,"__esModule",{value:!0});var o={};n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout(function(){var e=o;o={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?r(n.exception):n.error&&r(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),
|
||||
n.exception&&console.log(n.exception.stack)})},0))});var s=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}();t.ErrorHandler=s,t.errorHandler=new s,t.onUnexpectedError=r,t.onUnexpectedExternalError=function(e){i(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error)return{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack};return e};var u="Canceled";t.isPromiseCanceledError=i,t.canceled=function(){var e=new Error(u);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")},
|
||||
t.illegalState=function(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}}),r(e[10],t([1,0,6,21,8,18]),function(e,t,n,r,i,o){"use strict";function s(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,i)}}function u(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,i)}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var a=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new o.LinkedList);var s=t._listeners.isEmpty();s&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var u=t._listeners.push(r?[n,r]:n);s&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),
|
||||
t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r);var a;return a={dispose:function(){a.dispose=e._noop,t._disposed||(u(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(i)&&i.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),r=t.next();!r.done;r=t.next())this._deliveryQueue.push([r.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),o=i[0],s=i[1];try{"function"==typeof o?o.call(void 0,s):o[0].call(o[1],s)}catch(r){n.onUnexpectedError(r)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();t.Emitter=a;var l=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new a({onFirstListenerAdd:function(){
|
||||
return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return i.toDisposable(r.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)}))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();t.EventMultiplexer=l,t.once=function(e){return function(t,n,r){
|
||||
void 0===n&&(n=null);var i=e(function(e){return i.dispose(),t.call(n,e)},null,r);return i}},t.anyEvent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),i.combinedDisposable(e.map(function(e){return e(function(e){return t.call(n,e)},null,r)}))}},t.debounceEvent=function(e,t,n,r){void 0===n&&(n=100),void 0===r&&(r=!1);var i,o=void 0,s=void 0,u=0,l=new a({onFirstListenerAdd:function(){i=e(function(e){u++,o=t(o,e),r&&!s&&l.fire(o),clearTimeout(s),s=setTimeout(function(){var e=o;o=void 0,s=void 0,(!r||u>1)&&l.fire(e),u=0},n)})},onLastListenerRemove:function(){i.dispose()}});return l.event};var c=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){
|
||||
return e()})},e}();t.EventBufferer=c,t.mapEvent=s,t.filterEvent=u;var d=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(s(this._event,t))},e.prototype.filter=function(t){return new e(u(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new d(e)};var f=function(){function e(){this.emitter=new a,this.event=this.emitter.event,this.disposable=i.Disposable.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}();t.Relay=f}),r(e[9],t([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{
|
||||
dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){
|
||||
return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof o&&this._token.dispose():this._token=r.None},e}();t.CancellationTokenSource=s}),r(e[13],t([1,0,6,3,9,8]),function(e,t,n,r,i,s){"use strict";function u(e){return e&&"function"==typeof e.then}function a(e){var t=new i.CancellationTokenSource,r=e(t.token),o=new Promise(function(e,i){t.token.onCancellationRequested(function(){i(n.canceled())}),Promise.resolve(r).then(function(n){t.dispose(),e(n)},function(e){t.dispose(),i(e)})});return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return o.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function l(e,t){return function(e){return r.TPromise.is(e)&&"function"==typeof e.done}(e)?new r.TPromise(function(r,i,o){
|
||||
e.done(function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}r(e)},function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}i(e)},function(e){o(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=u,t.toThenable=function(e){return u(e)?e:r.TPromise.as(e)},t.createCancelablePromise=a,t.asWinJsPromise=function(e){var t=new i.CancellationTokenSource;return new r.TPromise(function(n,i,o){var s=e(t.token);s instanceof r.TPromise?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),i(e)},o):u(s)?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),i(e)}):(t.dispose(),n(s))},function(){t.cancel()})},t.wireCancellationToken=function(e,t,i){var o=e.onCancellationRequested(function(){return t.cancel()});return i&&(t=t.then(void 0,function(e){if(!n.isPromiseCanceledError(e))return r.TPromise.wrapError(e)})),l(t,function(){return o.dispose()})};var c=function(){function e(){this.activePromise=null,
|
||||
this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new r.TPromise(function(e,r,i){t.activePromise.then(n,n,i).done(e)},function(){t.activePromise.cancel()})}return new r.TPromise(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new r.TPromise(function(e,n,r){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},r)},function(){t.activePromise.cancel()})},e}();t.Throttler=c;var d=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),
|
||||
this.completionPromise||(this.completionPromise=new r.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=d;var f=function(e){function t(t){var r,i,o,s=this;return s=e.call(this,function(e,t,n){r=e,i=t,o=n},function(){i(n.canceled())})||this,t.then(r,i,o),s}return o(t,e),t}(r.TPromise);t.ShallowCancelThenPromise=f,t.timeout=function(e){return a(function(t){return new Promise(function(r,i){var o=setTimeout(r,e);t.onCancellationRequested(function(e){clearTimeout(o),i(n.canceled())})})})},t.always=l,t.first2=function(e,t,n){void 0===t&&(t=function(e){return!!e}),
|
||||
void 0===n&&(n=null);var r=0,i=e.length,o=function(){return r>=i?Promise.resolve(n):(0,e[r++])().then(function(e){return t(e)?Promise.resolve(e):o()})};return o()},t.first=function(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var i=0,o=e.length,s=function(){return i>=o?r.TPromise.as(n):(0,e[i++])().then(function(e){return t(e)?r.TPromise.as(e):s()})};return s()},t.setDisposableTimeout=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=setTimeout.apply(void 0,[e,t].concat(n));return{dispose:function(){clearTimeout(i)}}};var h=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return o(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this
|
||||
;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e()},t))},t}(s.Disposable);t.TimeoutTimer=h;var p=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return o(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e()},t)},t}(s.Disposable);t.IntervalTimer=p;var m=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},
|
||||
e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}();t.RunOnceScheduler=m}),r(e[29],t([1,0,6,8,3,13,4]),function(e,t,n,r,i,s,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="$initialize",l=!1;t.logOnceWebWorkerWarning=function(e){u.isWeb&&(l||(l=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var c=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=String(++this._lastSentReq),r={c:null,e:null},o=new i.TPromise(function(e,t){r.c=e,r.e=t},function(){});return this._pendingReplies[n]=r,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),o},
|
||||
e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var r=e;if(!this._pendingReplies[r.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[r.seq];if(delete this._pendingReplies[r.seq],r.err){var o=r.err;return r.err.$isError&&((o=new Error).name=r.err.name,o.message=r.err.message,o.stack=r.err.stack),void i.e(o)}i.c(r.res)}else{var s=e,u=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:u,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=n.transformErrorForSerialization(e.detail)),t._send({vsWorker:t._workerId,seq:u,res:void 0,err:n.transformErrorForSerialization(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),d=function(e){function t(t,n){var r=e.call(this)||this,o=null,s=null
|
||||
;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",function(e){r._protocol.handleMessage(e)},function(e){s(e)})),r._protocol=new c({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return i.TPromise.as(null)}}),r._protocol.setWorkerId(r._worker.getId());var u=null;void 0!==self.require&&"function"==typeof self.require.getConfig?u=self.require.getConfig():void 0!==self.requirejs&&(u=self.requirejs.s.contexts._.config),r._lazyProxy=new i.TPromise(function(e,t){o=e,s=t},function(){}),r._onModuleLoaded=r._protocol.sendMessage(a,[r._worker.getId(),n,u]),r._onModuleLoaded.then(function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=d(e[n],l);o(t)},function(e){s(e),r._onError("Worker failed to load "+n,e)});var l=function(e,t){return r._request(e,t)},d=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return r}return o(t,e),t.prototype.getProxyObject=function(){return new s.ShallowCancelThenPromise(this._lazyProxy)},
|
||||
t.prototype._request=function(e,t){var n=this;return new i.TPromise(function(r,i){n._onModuleLoaded.then(function(){n._protocol.sendMessage(e,t).then(r,i)},i)},function(){})},t.prototype._onError=function(e,t){console.error(e),console.info(t)},t}(r.Disposable);t.SimpleWorkerClient=d;var f=function(){function e(e,t){var n=this;this._requestHandler=t,this._protocol=new c({sendMessage:function(t){e(t)},handleMessage:function(e,t){return n._handleMessage(e,t)}})}return e.prototype.onmessage=function(e){this._protocol.handleMessage(e)},e.prototype._handleMessage=function(e,t){if(e===a)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return i.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return i.TPromise.as(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return i.TPromise.wrapError(e)}},e.prototype.initialize=function(e,t,n){var r=this;if(this._protocol.setWorkerId(e),this._requestHandler){var o=[]
|
||||
;for(var s in this._requestHandler)"function"==typeof this._requestHandler[s]&&o.push(s);return i.TPromise.as(o)}n&&(void 0!==n.baseUrl&&delete n.baseUrl,void 0!==n.paths&&void 0!==n.paths.vs&&delete n.paths.vs,n.catchError=!0,self.require.config(n));var u,a,l=new i.TPromise(function(e,t){u=e,a=t});return self.require([t],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];r._requestHandler=n.create();var i=[];for(var o in r._requestHandler)"function"==typeof r._requestHandler[o]&&i.push(o);u(i)},a),l},e}();t.SimpleWorkerServer=f,t.create=function(e){return new f(e,null)}}),r(e[2],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){
|
||||
return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e.compare=function(e,t){var n=0|e.lineNumber,r=0|t.lineNumber;if(n===r){return(0|e.column)-(0|t.column)}return n-r},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e.lift=function(t){return new e(t.lineNumber,t.column)},e.isIPosition=function(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column},e}();t.Position=n}),r(e[7],t([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}
|
||||
return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumber<t.startLineNumber?(r=n.startLineNumber,
|
||||
i=n.startColumn):n.startLineNumber===t.startLineNumber?(r=n.startLineNumber,i=Math.min(n.startColumn,t.startColumn)):(r=t.startLineNumber,i=t.startColumn),n.endLineNumber>t.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(r,i,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,s=t.endColumn,u=n.startLineNumber,a=n.startColumn,l=n.endLineNumber,c=n.endColumn;return r<u?(r=u,i=a):r===u&&(i=Math.max(i,a)),o>l?(o=l,s=c):o===l&&(s=Math.min(s,c)),r>o?null:r===o&&i>s?null:new e(r,i,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){
|
||||
return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){
|
||||
return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)},e.areIntersecting=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)},e.compareRangesUsingStarts=function(e,t){var n=0|e.startLineNumber,r=0|t.startLineNumber;if(n===r){var i=0|e.startColumn,o=0|t.startColumn;if(i===o){var s=0|e.endLineNumber,u=0|t.endLineNumber;if(s===u){return(0|e.endColumn)-(0|t.endColumn)}return s-u}return i-o}return n-r},e.compareRangesUsingEnds=function(e,t){
|
||||
return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber},e.spansMultipleLines=function(e){return e.endLineNumber>e.startLineNumber},e}();t.Range=r}),r(e[19],t([1,0,7,2]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(i=t.SelectionDirection||(t.SelectionDirection={}));var s=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=r,o.positionColumn=i,o}return o(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},
|
||||
t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new r.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===i.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},
|
||||
t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0},t.isISelection=function(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn},t.createWithDirection=function(e,n,r,o,s){return s===i.LTR?new t(e,n,r,o):new t(r,o,e,n)},t}(n.Range);t.Selection=s}),r(e[20],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}();t.Token=n;var r=function(){return function(e,t){this.tokens=e,this.endState=t}}();t.TokenizationResult=r;var i=function(){
|
||||
return function(e,t){this.tokens=e,this.endState=t}}();t.TokenizationResult2=i}),r(e[5],t([1,0]),function(e,t){"use strict";function n(e){return e<0?0:e>4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){for(var r=new Uint8Array(e*t),i=0,o=e*t;i<o;i++)r[i]=n;this._data=r,this.rows=e,this.cols=t}return e.prototype.get=function(e,t){return this._data[e*this.cols+t]},e.prototype.set=function(e,t,n){this._data[e*this.cols+t]=n},e}();t.Uint8Matrix=r,t.toUint8=function(e){return e<0?0:e>255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,r=new Uint32Array(t),i=0;i<t;i++)r[i]=n(e[i]);return r}}),r(e[22],t([1,0,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t){var r=n.toUint8(t);this._defaultValue=r,this._asciiMap=e._createAsciiMap(r),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},
|
||||
e.prototype.set=function(e,t){var r=n.toUint8(t);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=r;var i=function(){function e(){this._actual=new r(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=i}),r(e[23],t([1,0,12,14]),function(e,t,n,r){"use strict";function i(e,t,r,i){return new n.LcsDiff(e,t,r).ComputeDiff(i)}Object.defineProperty(t,"__esModule",{value:!0});var o=5e3,s=3,u=function(){function e(t){for(var n=[],r=[],i=0,o=t.length;i<o;i++)n[i]=e._getFirstNonBlankColumn(t[i],1),r[i]=e._getLastNonBlankColumn(t[i],1);this._lines=t,this._startColumns=n,this._endColumns=r}return e.prototype.getLength=function(){return this._lines.length},e.prototype.getElementAtIndex=function(e){return this._lines[e].substring(this._startColumns[e]-1,this._endColumns[e]-1)},
|
||||
e.prototype.getStartLineNumber=function(e){return e+1},e.prototype.getEndLineNumber=function(e){return e+1},e._getFirstNonBlankColumn=function(e,t){var n=r.firstNonWhitespaceIndex(e);return-1===n?t:n+1},e._getLastNonBlankColumn=function(e,t){var n=r.lastNonWhitespaceIndex(e);return-1===n?t:n+2},e.prototype.getCharSequence=function(e,t,n){for(var r=[],i=[],o=[],s=0,u=t;u<=n;u++)for(var l=this._lines[u],c=e?this._startColumns[u]:1,d=e?this._endColumns[u]:l.length+1,f=c;f<d;f++)r[s]=l.charCodeAt(f-1),i[s]=u+1,o[s]=f,s++;return new a(r,i,o)},e}(),a=function(){function e(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}return e.prototype.getLength=function(){return this._charCodes.length},e.prototype.getElementAtIndex=function(e){return this._charCodes[e]},e.prototype.getStartLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getStartColumn=function(e){return this._columns[e]},e.prototype.getEndLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getEndColumn=function(e){
|
||||
return this._columns[e]+1},e}(),l=function(){function e(e,t,n,r,i,o,s,u){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=o,this.modifiedEndLineNumber=s,this.modifiedEndColumn=u}return e.createFromDiffChange=function(t,n,r){var i,o,s,u,a,l,c,d;return 0===t.originalLength?(i=0,o=0,s=0,u=0):(i=n.getStartLineNumber(t.originalStart),o=n.getStartColumn(t.originalStart),s=n.getEndLineNumber(t.originalStart+t.originalLength-1),u=n.getEndColumn(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(a=0,l=0,c=0,d=0):(a=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),d=r.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new e(i,o,s,u,a,l,c,d)},e}(),c=function(){function e(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,
|
||||
this.charChanges=i}return e.createFromDiffResult=function(t,n,r,o,u,a,c){var d,f,h,p,m;if(0===n.originalLength?(d=r.getStartLineNumber(n.originalStart)-1,f=0):(d=r.getStartLineNumber(n.originalStart),f=r.getEndLineNumber(n.originalStart+n.originalLength-1)),0===n.modifiedLength?(h=o.getStartLineNumber(n.modifiedStart)-1,p=0):(h=o.getStartLineNumber(n.modifiedStart),p=o.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),a&&0!==n.originalLength&&0!==n.modifiedLength&&u()){var g=r.getCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),_=o.getCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),v=i(g,_,u,!0);c&&(v=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r<i;r++){var o=e[r],u=o.originalStart-(n.originalStart+n.originalLength),a=o.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(u,a)<s?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(t.push(o),n=o)}
|
||||
return t}(v)),m=[];for(var y=0,b=v.length;y<b;y++)m.push(l.createFromDiffChange(v[y],g,_))}return new e(d,f,h,p,m)},e}(),d=function(){function e(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.maximumRunTimeMs=o,this.originalLines=e,this.modifiedLines=t,this.original=new u(e),this.modified=new u(t)}return e.prototype.computeDiff=function(){if(1===this.original.getLength()&&0===this.original.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.getLength(),charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]
|
||||
;if(1===this.modified.getLength()&&0===this.modified.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:this.original.getLength(),modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}];this.computationStartTime=(new Date).getTime();var e=i(this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldMakePrettyDiff);if(this.shouldIgnoreTrimWhitespace){for(var t=[],n=0,r=e.length;n<r;n++)t.push(c.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return t}for(var o=[],s=0,a=0,n=-1,l=e.length;n<l;n++){
|
||||
for(var d=n+1<l?e[n+1]:null,f=d?d.originalStart:this.originalLines.length,h=d?d.modifiedStart:this.modifiedLines.length;s<f&&a<h;){var p=this.originalLines[s],m=this.modifiedLines[a];if(p!==m){for(var g=u._getFirstNonBlankColumn(p,1),_=u._getFirstNonBlankColumn(m,1);g>1&&_>1;){if((S=p.charCodeAt(g-2))!==(E=m.charCodeAt(_-2)))break;g--,_--}(g>1||_>1)&&this._pushTrimWhitespaceCharChange(o,s+1,1,g,a+1,1,_);for(var v=u._getLastNonBlankColumn(p,1),y=u._getLastNonBlankColumn(m,1),b=p.length+1,C=m.length+1;v<b&&y<C;){var S=p.charCodeAt(v-1),E=p.charCodeAt(y-1);if(S!==E)break;v++,y++}(v<b||y<C)&&this._pushTrimWhitespaceCharChange(o,s+1,v,b,a+1,y,C)}s++,a++}d&&(o.push(c.createFromDiffResult(this.shouldIgnoreTrimWhitespace,d,this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=d.originalLength,a+=d.modifiedLength)}return o},e.prototype._pushTrimWhitespaceCharChange=function(e,t,n,r,i,o,s){
|
||||
if(!this._mergeTrimWhitespaceCharChange(e,t,n,r,i,o,s)){var u;this.shouldComputeCharChanges&&(u=[new l(t,n,t,r,i,o,i,s)]),e.push(new c(t,t,i,i,u))}},e.prototype._mergeTrimWhitespaceCharChange=function(e,t,n,r,i,o,s){var u=e.length;if(0===u)return!1;var a=e[u-1];return 0!==a.originalEndLineNumber&&0!==a.modifiedEndLineNumber&&(a.originalEndLineNumber+1===t&&a.modifiedEndLineNumber+1===i&&(a.originalEndLineNumber=t,a.modifiedEndLineNumber=i,this.shouldComputeCharChanges&&a.charChanges.push(new l(t,n,t,r,i,o,i,s)),!0))},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;return(new Date).getTime()-this.computationStartTime<this.maximumRunTimeMs},e}();t.DiffComputer=d}),r(e[24],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="")
|
||||
;for(var n="(-?\\d*\\.\\d\\w*)|([^",r=0;r<t.USUAL_WORD_SEPARATORS.length;r++)e.indexOf(t.USUAL_WORD_SEPARATORS[r])>=0||(n+="\\"+t.USUAL_WORD_SEPARATORS[r]);return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),n=new RegExp(e.source,r)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,n,r){t.lastIndex=0;var i=t.exec(n);if(!i)return null;var o=i[0].indexOf(" ")>=0?function(e,t,n,r){var i=e-1-r;t.lastIndex=0;for(var o;o=t.exec(n);){if(o.index>i)return null;if(t.lastIndex>=i)return{word:o[0],startColumn:r+1+o.index,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r):function(e,t,n,r){var i=e-1-r,o=n.lastIndexOf(" ",i-1)+1,s=n.indexOf(" ",i);-1===s&&(s=n.length),t.lastIndex=o;for(var u;u=t.exec(n);)if(u.index<=i&&t.lastIndex>=i)return{word:u[0],startColumn:r+1+u.index,endColumn:r+1+t.lastIndex};return null}(e,t,n,r);return t.lastIndex=0,o}}),
|
||||
r(e[25],t([1,0,22,5]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){for(var t=0,n=0,i=0,o=e.length;i<o;i++){var s=e[i],u=s[0],a=s[1],l=s[2];a>t&&(t=a),u>n&&(n=u),l>n&&(n=l)}t++,n++;for(var c=new r.Uint8Matrix(n,t,0),i=0,o=e.length;i<o;i++){var d=e[i],u=d[0],a=d[1],l=d[2];c.set(u,a,l)}this._states=c,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}(),o=null,s=null,u=function(){function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>r);if(r>0){var u=t.charCodeAt(r-1),a=t.charCodeAt(o);(40===u&&41===a||91===u&&93===a||123===u&&125===a)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t){
|
||||
for(var r=(null===o&&(o=new i([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),o),u=function(){if(null===s){for(s=new n.CharacterClassifier(0),e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),a=[],l=1,c=t.getLineCount();l<=c;l++){for(var d=t.getLineContent(l),f=d.length,h=0,p=0,m=0,g=1,_=!1,v=!1,y=!1;h<f;){var b=!1,C=d.charCodeAt(h);if(13===g){S=void 0;switch(C){case 40:_=!0,S=0;break;case 41:S=_?0:1;break;case 91:v=!0,S=0;break;case 93:S=v?0:1;break;case 123:y=!0,S=0;break;case 125:S=y?0:1;break;case 39:S=34===m||96===m?0:1;break;case 34:S=39===m||96===m?0:1;break;case 96:S=39===m||34===m?0:1;break;default:S=u.get(C)}1===S&&(a.push(e._createLink(u,d,l,p,h)),b=!0)
|
||||
}else if(12===g){var S;1===(S=u.get(C))?b=!0:g=13}else 0===(g=r.nextState(g,C))&&(b=!0);b&&(g=1,_=!1,v=!1,y=!1,p=h+1,m=C),h++}13===g&&a.push(e._createLink(u,d,l,p,f))}return a},e}();t.computeLinks=function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?u.computeLinks(e):[]}}),r(e[26],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,r,i){if(e&&t){if(o=this.doNavigateValueSet(t,i))return{range:e,value:o}}if(n&&r){var o=this.doNavigateValueSet(r,i);if(o)return{range:n,value:o}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){
|
||||
var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),r=Number(e),i=parseFloat(e);return isNaN(r)||isNaN(i)||r!==i?null:0!==r||t?(r=Math.floor(r*n),r+=t?n:-n,String(r/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var r=null,i=0,o=e.length;null===r&&i<o;i++)r=this.valueSetReplace(e[i],t,n);return r},e.prototype.valueSetReplace=function(e,t,n){var r=e.indexOf(t);return r>=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),r(e[27],t([1,0,10,15,2,7,19,3,9,20,11]),function(e,t,n,r,i,o,s,u,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d;!function(e){e[e.Unnecessary=1]="Unnecessary"}(d=t.MarkerTag||(t.MarkerTag={}));var f;!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(f=t.MarkerSeverity||(t.MarkerSeverity={}));var h=function(){function e(){}return e.chord=function(e,t){
|
||||
return r.KeyChord(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();t.KeyMod=h;var p;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",
|
||||
e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",
|
||||
e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(p=t.KeyCode||(t.KeyCode={})),t.createMonacoBaseAPI=function(){return{editor:void 0,languages:void 0,
|
||||
CancellationTokenSource:a.CancellationTokenSource,Emitter:n.Emitter,KeyCode:p,KeyMod:h,Position:i.Position,Range:o.Range,Selection:s.Selection,SelectionDirection:s.SelectionDirection,MarkerSeverity:f,MarkerTag:d,Promise:u.TPromise,Uri:c.default,Token:l.Token}}}),r(e[28],t([1,0,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=r;var i=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var r=this.values,i=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(r.length+o),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),
|
||||
this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)},e.prototype.removeValues=function(e,t){e=n.toUint32(e),t=n.toUint32(t);var r=this.values,i=this.prefixSum;if(e>=r.length)return!1;var o=r.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(r.length-t),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){
|
||||
return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,i,o=0,s=this.values.length-1;o<=s;)if(t=o+(s-o)/2|0,n=this.prefixSum[t],i=n-this.values[t],e<i)s=t-1;else{if(!(e>=n))break;o=t+1}return new r(t,e-i)},e}();t.PrefixSumComputer=i;var o=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new i(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){
|
||||
this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t<this._cache.length)return this._cache[t]}return this._actual.getIndexOf(e)},e.prototype.warmUpCache=function(e,t){for(var n=[],r=e;r<=t;r++)n[r-e]=this.getIndexOf(r);this._cache=n,this._cacheAccumulatedValueStart=e},e}();t.PrefixSumComputerWithCache=o}),r(e[16],t([1,0,28,2]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r}return e.prototype.dispose=function(){this._lines.length=0
|
||||
},e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);for(var t=e.changes,n=0,i=t.length;n<i;n++){var o=t[n];this._acceptDeleteRange(o.range),this._acceptInsertText(new r.Position(o.range.startLineNumber,o.range.startColumn),o.text)}this._versionId=e.versionId},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,r=new Uint32Array(t),i=0;i<t;i++)r[i]=this._lines[i].length+e;this._lineStarts=new n.PrefixSumComputer(r)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),
|
||||
this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1!==n.length){n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var r=new Uint32Array(n.length-1),i=1;i<n.length;i++)this._lines.splice(e.lineNumber+i-1,0,n[i]),r[i-1]=n[i].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}else this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1))}},e}();t.MirrorTextModel=i}),
|
||||
r(e[30],t([1,0,11,3,7,23,12,2,16,25,26,24,27,4]),function(e,t,n,r,i,s,u,a,l,c,d,f,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=f.getWordAtText(e.column,f.ensureValidWordDefinition(t),this._lines[e.lineNumber-1],0)
|
||||
;return n?new i.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.createWordIterator=function(e){var t,n=this,r={done:!1,value:""},i=0,o=0,s=[],u=function(){if(o<s.length)r.done=!1,r.value=t.substring(s[o].start,s[o].end),o+=1;else{if(!(i>=n._lines.length))return t=n._lines[i],s=n._wordenize(t,e),o=0,i+=1,u();r.done=!0,r.value=void 0}return r};return{next:u}},t.prototype._wordenize=function(e,t){var n,r=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)r.push({start:n.index,end:n.index+n[0].length});return r},t.prototype.getValueInRange=function(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1)
|
||||
;var t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(var o=n+1;o<r;o++)i.push(this._lines[o]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column
|
||||
}:e},t.prototype._validatePosition=function(e){if(!a.Position.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,r=!1;if(t<1)t=1,n=1,r=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e},t}(l.MirrorTextModel),g=function(){function t(e){this._foreignModuleFactory=e,this._foreignModule=null}return t.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var u=i.getLinesContent(),a=o.getLinesContent(),l=new s.DiffComputer(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return r.TPromise.as(l.computeDiff())},t.prototype.computeMoreMinimalEdits=function(e,n){var o=this._getModel(e);if(!o)return r.TPromise.as(n);for(var s,a=[],l=0,c=n;l<c.length;l++){var d=c[l],f=d.range,h=d.text,p=d.eol;if("number"==typeof p&&(s=p),f){
|
||||
var m=o.getValueInRange(f);if(h=h.replace(/\r\n|\n|\r/g,o.eol),m!==h)if(Math.max(h.length,m.length)>t._diffLimit)a.push({range:f,text:h});else for(var g=u.stringDiff(m,h,!1),_=o.offsetAt(i.Range.lift(f).getStartPosition()),v=0,y=g;v<y.length;v++){var b=y[v],C=o.positionAt(_+b.originalStart),S=o.positionAt(_+b.originalStart+b.originalLength),E={text:h.substr(b.modifiedStart,b.modifiedLength),range:{startLineNumber:C.lineNumber,startColumn:C.column,endLineNumber:S.lineNumber,endColumn:S.column}};o.getValueInRange(E.range)!==E.text&&a.push(E)}}}return"number"==typeof s&&a.push({eol:s,text:void 0,range:void 0}),r.TPromise.as(a)},t.prototype.computeLinks=function(e){var t=this._getModel(e);return t?r.TPromise.as(c.computeLinks(t)):null},t.prototype.textualSuggest=function(e,n,i,o){var s=this._getModel(e);if(s){var u=[],a=new RegExp(i,o),l=s.getWordUntilPosition(n,a).word,c=Object.create(null);c[l]=!0;for(var d=s.createWordIterator(a),f=d.next();!f.done&&u.length<=t._suggestionsLimit;f=d.next()){var h=f.value
|
||||
;c[h]||(c[h]=!0,isNaN(Number(h))&&u.push({type:"text",label:h,insertText:h,noAutoAccept:!0,overwriteBefore:l.length}))}return r.TPromise.as({suggestions:u})}},t.prototype.navigateValueSet=function(e,t,n,i,o){var s=this._getModel(e);if(!s)return null;var u=new RegExp(i,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});var a=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},u),c=null;null!==l&&(c=s.getValueInRange(l));var f=d.BasicInplaceReplace.INSTANCE.navigateValueSet(t,a,l,c,n);return r.TPromise.as(f)},t.prototype.loadForeignModule=function(t,n){var i=this,o={getMirrorModels:function(){return i._getModels()}};if(this._foreignModuleFactory){this._foreignModule=this._foreignModuleFactory(o,n);var s=[];for(var u in this._foreignModule)"function"==typeof this._foreignModule[u]&&s.push(u);return r.TPromise.as(s)}return new r.TPromise(function(r,s){e([t],function(e){
|
||||
i._foreignModule=e.create(o,n);var t=[];for(var s in i._foreignModule)"function"==typeof i._foreignModule[s]&&t.push(s);r(t)},s)})},t.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return r.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return r.TPromise.as(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return r.TPromise.wrapError(e)}},t._diffLimit=1e4,t._suggestionsLimit=1e4,t}();t.BaseEditorSimpleWorker=g;var _=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n}return o(t,e),t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach(function(n){return t.push(e._models[n])}),t},t.prototype.acceptNewModel=function(e){this._models[e.url]=new m(n.default.parse(e.url),e.lines,e.EOL,e.versionId)},
|
||||
t.prototype.acceptModelChanged=function(e,t){if(this._models[e]){this._models[e].onEvents(t)}},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t}(g);t.EditorSimpleWorkerImpl=_,t.create=function(){return new _(null)},"function"==typeof importScripts&&(p.globals.monaco=h.createMonacoBaseAPI())}),function(){"use strict";var e=self.MonacoEnvironment,t=e&&e.baseUrl?e.baseUrl:"../../../";"function"==typeof self.define&&self.define.amd||importScripts(t+"vs/loader.js"),require.config({baseUrl:t,catchError:!0});var n=!0,r=[];self.onmessage=function(e){n?(n=!1,function(e){require([e],function(e){setTimeout(function(){var t=e.create(function(e){self.postMessage(e)},null);for(self.onmessage=function(e){return t.onmessage(e.data)};r.length>0;)self.onmessage(r.shift())},0)})}(e.data)):r.push(e)}}()}).call(this);
|
||||
//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/apex/apex",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}};var s=[];["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"].forEach(function(e){var t;s.push(e),s.push(e.toUpperCase()),s.push((t=e).charAt(0).toUpperCase()+t.substr(1))}),t.language={defaultToken:"",tokenPostfix:".apex",keywords:s,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/azcli/azcli",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#"}},t.language={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/bat/bat",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=><!~?&|+\-*\/\^;\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)(rem(?:\s.*|))$/,["","comment"]],[/(\@?)(@keywords)(?!\w)/,[{token:"keyword"},{token:"keyword.$2"}]],[/[ \t\r\n]+/,""],[/setlocal(?!\w)/,"keyword.tag-setlocal"],[/endlocal(?!\w)/,"keyword.tag-setlocal"],[/[a-zA-Z_]\w*/,""],[/:\w*/,"metatag"],[/%[^%]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],string:[[/[^\\"'%]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/%[\w ]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/$/,"string","@popall"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/clojure/clojure",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:";;"},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},n.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["ns","ns-unmap","create-ns","in-ns","fn","def","defn","defmacro","defmulti","defonce","require","import","new","refer","pos","pos?","filter","map","reduce","repeat","key","rest","concat","into","reverse","iterate","range","drop","drop-while","take","take-while","neg","neg?","bound-fn","if","if-not","if-let","case,","contains","conj","disj","sort","get","assoc","merge","keys","vals","nth","first","last","count","contains?","cond","condp","cond->","cond->>","when","while","when-not","when-let","when-first","do","future","comment","doto","locking","proxy","println","type","meta","var","as->","reify","deftype","defrecord","defprotocol","extend","extend-protocol","extend-type","specify","specify!","try","catch","finally","let","letfn","binding","loop","for","seq","doseq","dotimes","when-let","if-let","when-some","if-some","this-as","defmethod","testing","deftest","are","use-fixtures","use","remove","run","run*","fresh","alt!","alt!!","go","go-loop","thread","boolean","str"],constants:["true","false","nil"],operators:["=","not=","<","<=",">",">=","and","or","not","inc","dec","max","min","rem","bit-and","bit-or","bit-xor","bit-not"],tokenizer:{root:[[/0[xX][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(ns|def|defn|defn-|defmacro|defmulti|defonce|ns|ns-unmap|fn))(?![\w-]))(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}],[/\/#"(?:\.|(?:\")|[^""\n])*"\/g/,"regexp"],{include:"@whitespace"},{include:"@strings"}],whitespace:[[/[ \t\r\n]+/,"white"],[/;;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/\\./,"string.escape"],[/"/,"string","@popall"],[/.(?=.*")/,"string"],[/.*\\$/,"string"],[/.*$/,"string","@popall"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/coffee/coffee",["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},r.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=><!~?&%|+\-*\/\^\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@[a-zA-Z_]\w*/,"variable.predefined"],[/[a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/###/,"comment","@comment"],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\()(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\=)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\[)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\!)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\&)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\|)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\?)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\{)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\;)(\s*)(@regEx)/,["","","regexp"]],[/}/,{cases:{"$S2==interpolatedstring":{token:"string",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/###/,"comment","@pop"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}}});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/csharp/csharp",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t.language={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@?[a-zA-Z_]\w*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@keywords":{token:"keyword.$0",next:"@qualified"},"@default":{token:"identifier",next:"@qualified"}}}],{include:"@whitespace"},[/}/,{cases:{"$S2==interpolatedstring":{token:"string.quote",next:"@pop"},"$S2==litinterpstring":{token:"string.quote",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/csp/csp",["require","exports"],function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={brackets:[],autoClosingPairs:[],surroundingPairs:[]},e.language={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/child-src/,"string.quote"],[/connect-src/,"string.quote"],[/default-src/,"string.quote"],[/font-src/,"string.quote"],[/frame-src/,"string.quote"],[/img-src/,"string.quote"],[/manifest-src/,"string.quote"],[/media-src/,"string.quote"],[/object-src/,"string.quote"],[/script-src/,"string.quote"],[/style-src/,"string.quote"],[/worker-src/,"string.quote"],[/base-uri/,"string.quote"],[/plugin-types/,"string.quote"],[/sandbox/,"string.quote"],[/disown-opener/,"string.quote"],[/form-action/,"string.quote"],[/frame-ancestors/,"string.quote"],[/report-uri/,"string.quote"],[/report-to/,"string.quote"],[/upgrade-insecure-requests/,"string.quote"],[/block-all-mixed-content/,"string.quote"],[/require-sri-for/,"string.quote"],[/reflected-xss/,"string.quote"],[/referrer/,"string.quote"],[/policy-uri/,"string.quote"],[/'self'/,"string.quote"],[/'unsafe-inline'/,"string.quote"],[/'unsafe-eval'/,"string.quote"],[/'strict-dynamic'/,"string.quote"],[/'unsafe-hashed-attributes'/,"string.quote"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/css/css",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/dockerfile/dockerfile",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s.language={defaultToken:"",tokenPostfix:".dockerfile",instructions:/FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT/,instructionAfter:/ONBUILD/,variableAfter:/ENV/,variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(@instructionAfter)(\s+)/,["keyword",{token:"",next:"@instructions"}]],["","keyword","@instructions"]],instructions:[[/(@variableAfter)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(@instructions)/,"keyword","@arguments"]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/fsharp/fsharp",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},n.language={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=><!~?:&|+\-*\^%;\.,\/]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/[uU]?[yslnLI]?/,floatsuffix:/[fFmM]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[<.*>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}});
|
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/go/go",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,7 @@
|
|||
/*!-----------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e)
|
||||
* Released under the MIT license
|
||||
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
|
||||
*-----------------------------------------------------------------------------*/
|
||||
define("vs/basic-languages/html/html",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue