Compare commits
No commits in common. "master" and "dev_xjy" have entirely different histories.
|
|
@ -1,88 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
yarn.lock
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Ignore master key for decrypting credentials and more.
|
||||
/config/master.key
|
||||
/config/database.yml
|
||||
/.idea/*
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
#DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
.DS_Store
|
||||
.idea/*
|
||||
|
|
@ -0,0 +1,741 @@
|
|||
{
|
||||
"./static/js/0.dce72368.chunk.js": "/build/./static/js/0.dce72368.chunk.js",
|
||||
"./static/js/1.68329535.chunk.js": "/build/./static/js/1.68329535.chunk.js",
|
||||
"./static/js/2.475aca69.chunk.js": "/build/./static/js/2.475aca69.chunk.js",
|
||||
"./static/js/3.220e54f2.chunk.js": "/build/./static/js/3.220e54f2.chunk.js",
|
||||
"./static/js/4.c076b2a6.chunk.js": "/build/./static/js/4.c076b2a6.chunk.js",
|
||||
"./static/js/5.ec5d07cf.chunk.js": "/build/./static/js/5.ec5d07cf.chunk.js",
|
||||
"static/css/6.3418a695.chunk.css": "/build/static/css/6.3418a695.chunk.css",
|
||||
"./static/js/6.0762de56.chunk.js": "/build/./static/js/6.0762de56.chunk.js",
|
||||
"./static/js/7.e6bc0c52.chunk.js": "/build/./static/js/7.e6bc0c52.chunk.js",
|
||||
"./static/js/8.cf834fcf.chunk.js": "/build/./static/js/8.cf834fcf.chunk.js",
|
||||
"./static/js/9.e6c57cc0.chunk.js": "/build/./static/js/9.e6c57cc0.chunk.js",
|
||||
"./static/js/10.da281274.chunk.js": "/build/./static/js/10.da281274.chunk.js",
|
||||
"./static/js/11.5da2fa8b.chunk.js": "/build/./static/js/11.5da2fa8b.chunk.js",
|
||||
"static/css/12.71f11407.chunk.css": "/build/static/css/12.71f11407.chunk.css",
|
||||
"./static/js/12.eb6b5e6b.chunk.js": "/build/./static/js/12.eb6b5e6b.chunk.js",
|
||||
"static/css/13.5e804faf.chunk.css": "/build/static/css/13.5e804faf.chunk.css",
|
||||
"./static/js/13.a7e41a56.chunk.js": "/build/./static/js/13.a7e41a56.chunk.js",
|
||||
"static/css/14.bc098de5.chunk.css": "/build/static/css/14.bc098de5.chunk.css",
|
||||
"./static/js/14.7faa94d9.chunk.js": "/build/./static/js/14.7faa94d9.chunk.js",
|
||||
"./static/js/15.a8818364.chunk.js": "/build/./static/js/15.a8818364.chunk.js",
|
||||
"./static/js/16.c907de70.chunk.js": "/build/./static/js/16.c907de70.chunk.js",
|
||||
"./static/js/17.ca596772.chunk.js": "/build/./static/js/17.ca596772.chunk.js",
|
||||
"./static/js/18.b129584c.chunk.js": "/build/./static/js/18.b129584c.chunk.js",
|
||||
"./static/js/19.167712de.chunk.js": "/build/./static/js/19.167712de.chunk.js",
|
||||
"./static/js/20.816f9574.chunk.js": "/build/./static/js/20.816f9574.chunk.js",
|
||||
"./static/js/21.ad6c982a.chunk.js": "/build/./static/js/21.ad6c982a.chunk.js",
|
||||
"./static/js/22.df29b0cf.chunk.js": "/build/./static/js/22.df29b0cf.chunk.js",
|
||||
"./static/js/23.f7b9669f.chunk.js": "/build/./static/js/23.f7b9669f.chunk.js",
|
||||
"./static/js/24.e21cb614.chunk.js": "/build/./static/js/24.e21cb614.chunk.js",
|
||||
"./static/js/25.bb43f024.chunk.js": "/build/./static/js/25.bb43f024.chunk.js",
|
||||
"./static/js/26.696b04ff.chunk.js": "/build/./static/js/26.696b04ff.chunk.js",
|
||||
"static/css/27.e7bedf85.chunk.css": "/build/static/css/27.e7bedf85.chunk.css",
|
||||
"./static/js/27.e20f4af6.chunk.js": "/build/./static/js/27.e20f4af6.chunk.js",
|
||||
"./static/js/28.b42c12c7.chunk.js": "/build/./static/js/28.b42c12c7.chunk.js",
|
||||
"static/css/29.d2ddda53.chunk.css": "/build/static/css/29.d2ddda53.chunk.css",
|
||||
"./static/js/29.bda7779e.chunk.js": "/build/./static/js/29.bda7779e.chunk.js",
|
||||
"./static/js/30.ba75a927.chunk.js": "/build/./static/js/30.ba75a927.chunk.js",
|
||||
"static/css/31.3cda0592.chunk.css": "/build/static/css/31.3cda0592.chunk.css",
|
||||
"./static/js/31.932df76c.chunk.js": "/build/./static/js/31.932df76c.chunk.js",
|
||||
"static/css/32.9be13309.chunk.css": "/build/static/css/32.9be13309.chunk.css",
|
||||
"./static/js/32.4294d2b2.chunk.js": "/build/./static/js/32.4294d2b2.chunk.js",
|
||||
"./static/js/33.0716e539.chunk.js": "/build/./static/js/33.0716e539.chunk.js",
|
||||
"./static/js/34.7d34789f.chunk.js": "/build/./static/js/34.7d34789f.chunk.js",
|
||||
"./static/js/35.51e910f5.chunk.js": "/build/./static/js/35.51e910f5.chunk.js",
|
||||
"./static/js/36.7874da1a.chunk.js": "/build/./static/js/36.7874da1a.chunk.js",
|
||||
"./static/js/37.3c36a3d9.chunk.js": "/build/./static/js/37.3c36a3d9.chunk.js",
|
||||
"./static/js/38.cc6d39be.chunk.js": "/build/./static/js/38.cc6d39be.chunk.js",
|
||||
"static/css/39.88ad88be.chunk.css": "/build/static/css/39.88ad88be.chunk.css",
|
||||
"./static/js/39.78b34de5.chunk.js": "/build/./static/js/39.78b34de5.chunk.js",
|
||||
"static/css/40.35a0345a.chunk.css": "/build/static/css/40.35a0345a.chunk.css",
|
||||
"./static/js/40.34717c79.chunk.js": "/build/./static/js/40.34717c79.chunk.js",
|
||||
"static/css/41.bcab97d7.chunk.css": "/build/static/css/41.bcab97d7.chunk.css",
|
||||
"./static/js/41.ee7293fe.chunk.js": "/build/./static/js/41.ee7293fe.chunk.js",
|
||||
"./static/js/42.226bdee1.chunk.js": "/build/./static/js/42.226bdee1.chunk.js",
|
||||
"static/css/43.f8e6e05b.chunk.css": "/build/static/css/43.f8e6e05b.chunk.css",
|
||||
"./static/js/43.ad923409.chunk.js": "/build/./static/js/43.ad923409.chunk.js",
|
||||
"static/css/44.5fe62440.chunk.css": "/build/static/css/44.5fe62440.chunk.css",
|
||||
"./static/js/44.aa529076.chunk.js": "/build/./static/js/44.aa529076.chunk.js",
|
||||
"./static/js/45.411ac4e5.chunk.js": "/build/./static/js/45.411ac4e5.chunk.js",
|
||||
"./static/js/46.1b4b826c.chunk.js": "/build/./static/js/46.1b4b826c.chunk.js",
|
||||
"./static/js/47.ef935d4a.chunk.js": "/build/./static/js/47.ef935d4a.chunk.js",
|
||||
"./static/js/48.dbcc78c7.chunk.js": "/build/./static/js/48.dbcc78c7.chunk.js",
|
||||
"static/css/49.b5e4a770.chunk.css": "/build/static/css/49.b5e4a770.chunk.css",
|
||||
"./static/js/49.44fb8d23.chunk.js": "/build/./static/js/49.44fb8d23.chunk.js",
|
||||
"static/css/50.2ce06666.chunk.css": "/build/static/css/50.2ce06666.chunk.css",
|
||||
"./static/js/50.58a4f9d3.chunk.js": "/build/./static/js/50.58a4f9d3.chunk.js",
|
||||
"./static/js/51.6cc5fe82.chunk.js": "/build/./static/js/51.6cc5fe82.chunk.js",
|
||||
"static/css/52.c3a96e50.chunk.css": "/build/static/css/52.c3a96e50.chunk.css",
|
||||
"./static/js/52.64272a51.chunk.js": "/build/./static/js/52.64272a51.chunk.js",
|
||||
"./static/js/53.7e40929c.chunk.js": "/build/./static/js/53.7e40929c.chunk.js",
|
||||
"static/css/54.acffe7d4.chunk.css": "/build/static/css/54.acffe7d4.chunk.css",
|
||||
"./static/js/54.88adf71a.chunk.js": "/build/./static/js/54.88adf71a.chunk.js",
|
||||
"./static/js/55.8b551aea.chunk.js": "/build/./static/js/55.8b551aea.chunk.js",
|
||||
"./static/js/56.34b921b7.chunk.js": "/build/./static/js/56.34b921b7.chunk.js",
|
||||
"static/css/57.8ee941ba.chunk.css": "/build/static/css/57.8ee941ba.chunk.css",
|
||||
"./static/js/57.3c164af7.chunk.js": "/build/./static/js/57.3c164af7.chunk.js",
|
||||
"static/css/58.6417fb3d.chunk.css": "/build/static/css/58.6417fb3d.chunk.css",
|
||||
"./static/js/58.5ce2d6e0.chunk.js": "/build/./static/js/58.5ce2d6e0.chunk.js",
|
||||
"static/css/59.2a5f31d0.chunk.css": "/build/static/css/59.2a5f31d0.chunk.css",
|
||||
"./static/js/59.b6668a05.chunk.js": "/build/./static/js/59.b6668a05.chunk.js",
|
||||
"./static/js/60.dc534864.chunk.js": "/build/./static/js/60.dc534864.chunk.js",
|
||||
"static/css/61.3418a695.chunk.css": "/build/static/css/61.3418a695.chunk.css",
|
||||
"./static/js/61.5f0351c0.chunk.js": "/build/./static/js/61.5f0351c0.chunk.js",
|
||||
"static/css/62.a8369a12.chunk.css": "/build/static/css/62.a8369a12.chunk.css",
|
||||
"./static/js/62.7ddba215.chunk.js": "/build/./static/js/62.7ddba215.chunk.js",
|
||||
"static/css/63.01fa08a8.chunk.css": "/build/static/css/63.01fa08a8.chunk.css",
|
||||
"./static/js/63.51989fd2.chunk.js": "/build/./static/js/63.51989fd2.chunk.js",
|
||||
"static/css/64.551ef1e2.chunk.css": "/build/static/css/64.551ef1e2.chunk.css",
|
||||
"./static/js/64.0f492fd8.chunk.js": "/build/./static/js/64.0f492fd8.chunk.js",
|
||||
"static/css/65.3970c40d.chunk.css": "/build/static/css/65.3970c40d.chunk.css",
|
||||
"./static/js/65.f11586c8.chunk.js": "/build/./static/js/65.f11586c8.chunk.js",
|
||||
"static/css/66.d6056abe.chunk.css": "/build/static/css/66.d6056abe.chunk.css",
|
||||
"./static/js/66.89a03457.chunk.js": "/build/./static/js/66.89a03457.chunk.js",
|
||||
"static/css/67.8c7b4731.chunk.css": "/build/static/css/67.8c7b4731.chunk.css",
|
||||
"./static/js/67.615658bc.chunk.js": "/build/./static/js/67.615658bc.chunk.js",
|
||||
"./static/js/68.e30e6954.chunk.js": "/build/./static/js/68.e30e6954.chunk.js",
|
||||
"static/css/69.150421ad.chunk.css": "/build/static/css/69.150421ad.chunk.css",
|
||||
"./static/js/69.3047b5dd.chunk.js": "/build/./static/js/69.3047b5dd.chunk.js",
|
||||
"static/css/70.a8369a12.chunk.css": "/build/static/css/70.a8369a12.chunk.css",
|
||||
"./static/js/70.13173643.chunk.js": "/build/./static/js/70.13173643.chunk.js",
|
||||
"static/css/71.a72e5186.chunk.css": "/build/static/css/71.a72e5186.chunk.css",
|
||||
"./static/js/71.64e28dd8.chunk.js": "/build/./static/js/71.64e28dd8.chunk.js",
|
||||
"./static/js/72.2d90bc25.chunk.js": "/build/./static/js/72.2d90bc25.chunk.js",
|
||||
"static/css/73.de5ed58f.chunk.css": "/build/static/css/73.de5ed58f.chunk.css",
|
||||
"./static/js/73.bd2d1661.chunk.js": "/build/./static/js/73.bd2d1661.chunk.js",
|
||||
"static/css/74.e1816405.chunk.css": "/build/static/css/74.e1816405.chunk.css",
|
||||
"./static/js/74.18cda279.chunk.js": "/build/./static/js/74.18cda279.chunk.js",
|
||||
"static/css/75.a8d6fed1.chunk.css": "/build/static/css/75.a8d6fed1.chunk.css",
|
||||
"./static/js/75.5bd01375.chunk.js": "/build/./static/js/75.5bd01375.chunk.js",
|
||||
"static/css/76.e7bedf85.chunk.css": "/build/static/css/76.e7bedf85.chunk.css",
|
||||
"./static/js/76.c935fdb6.chunk.js": "/build/./static/js/76.c935fdb6.chunk.js",
|
||||
"static/css/77.306147eb.chunk.css": "/build/static/css/77.306147eb.chunk.css",
|
||||
"./static/js/77.99fc51c0.chunk.js": "/build/./static/js/77.99fc51c0.chunk.js",
|
||||
"static/css/78.4cedb0b7.chunk.css": "/build/static/css/78.4cedb0b7.chunk.css",
|
||||
"./static/js/78.08398ebe.chunk.js": "/build/./static/js/78.08398ebe.chunk.js",
|
||||
"static/css/79.a5ab5161.chunk.css": "/build/static/css/79.a5ab5161.chunk.css",
|
||||
"./static/js/79.67383d75.chunk.js": "/build/./static/js/79.67383d75.chunk.js",
|
||||
"static/css/80.32c07858.chunk.css": "/build/static/css/80.32c07858.chunk.css",
|
||||
"./static/js/80.b2768837.chunk.js": "/build/./static/js/80.b2768837.chunk.js",
|
||||
"./static/js/81.286c3092.chunk.js": "/build/./static/js/81.286c3092.chunk.js",
|
||||
"static/css/82.5dab72ac.chunk.css": "/build/static/css/82.5dab72ac.chunk.css",
|
||||
"./static/js/82.65e4f5b3.chunk.js": "/build/./static/js/82.65e4f5b3.chunk.js",
|
||||
"static/css/83.54859982.chunk.css": "/build/static/css/83.54859982.chunk.css",
|
||||
"./static/js/83.cd4e9623.chunk.js": "/build/./static/js/83.cd4e9623.chunk.js",
|
||||
"./static/js/84.73d1fd90.chunk.js": "/build/./static/js/84.73d1fd90.chunk.js",
|
||||
"./static/js/85.f4fcc113.chunk.js": "/build/./static/js/85.f4fcc113.chunk.js",
|
||||
"static/css/86.89efd2d4.chunk.css": "/build/static/css/86.89efd2d4.chunk.css",
|
||||
"./static/js/86.9196ab71.chunk.js": "/build/./static/js/86.9196ab71.chunk.js",
|
||||
"static/css/87.1d1f535f.chunk.css": "/build/static/css/87.1d1f535f.chunk.css",
|
||||
"./static/js/87.abf3ef9f.chunk.js": "/build/./static/js/87.abf3ef9f.chunk.js",
|
||||
"static/css/88.4192b0c8.chunk.css": "/build/static/css/88.4192b0c8.chunk.css",
|
||||
"./static/js/88.9a5a822d.chunk.js": "/build/./static/js/88.9a5a822d.chunk.js",
|
||||
"./static/js/89.c6610d5f.chunk.js": "/build/./static/js/89.c6610d5f.chunk.js",
|
||||
"./static/js/90.d7068afb.chunk.js": "/build/./static/js/90.d7068afb.chunk.js",
|
||||
"static/css/91.29f48755.chunk.css": "/build/static/css/91.29f48755.chunk.css",
|
||||
"./static/js/91.87e5c722.chunk.js": "/build/./static/js/91.87e5c722.chunk.js",
|
||||
"static/css/92.0465b6b2.chunk.css": "/build/static/css/92.0465b6b2.chunk.css",
|
||||
"./static/js/92.7adeed46.chunk.js": "/build/./static/js/92.7adeed46.chunk.js",
|
||||
"./static/js/93.45b15935.chunk.js": "/build/./static/js/93.45b15935.chunk.js",
|
||||
"static/css/94.a9e60da0.chunk.css": "/build/static/css/94.a9e60da0.chunk.css",
|
||||
"./static/js/94.4d76854c.chunk.js": "/build/./static/js/94.4d76854c.chunk.js",
|
||||
"static/css/95.e471ecbb.chunk.css": "/build/static/css/95.e471ecbb.chunk.css",
|
||||
"./static/js/95.1c357e1e.chunk.js": "/build/./static/js/95.1c357e1e.chunk.js",
|
||||
"static/css/96.7c6f3c26.chunk.css": "/build/static/css/96.7c6f3c26.chunk.css",
|
||||
"./static/js/96.7b26ef75.chunk.js": "/build/./static/js/96.7b26ef75.chunk.js",
|
||||
"static/css/97.b45e877f.chunk.css": "/build/static/css/97.b45e877f.chunk.css",
|
||||
"./static/js/97.3bc67e14.chunk.js": "/build/./static/js/97.3bc67e14.chunk.js",
|
||||
"./static/js/98.d101d69c.chunk.js": "/build/./static/js/98.d101d69c.chunk.js",
|
||||
"static/css/99.79974563.chunk.css": "/build/static/css/99.79974563.chunk.css",
|
||||
"./static/js/99.caf7c860.chunk.js": "/build/./static/js/99.caf7c860.chunk.js",
|
||||
"static/css/100.746d3b5f.chunk.css": "/build/static/css/100.746d3b5f.chunk.css",
|
||||
"./static/js/100.6a3fbd27.chunk.js": "/build/./static/js/100.6a3fbd27.chunk.js",
|
||||
"static/css/101.91a9702f.chunk.css": "/build/static/css/101.91a9702f.chunk.css",
|
||||
"./static/js/101.6a1244af.chunk.js": "/build/./static/js/101.6a1244af.chunk.js",
|
||||
"./static/js/102.31011644.chunk.js": "/build/./static/js/102.31011644.chunk.js",
|
||||
"static/css/103.a8369a12.chunk.css": "/build/static/css/103.a8369a12.chunk.css",
|
||||
"./static/js/103.f63fd4e4.chunk.js": "/build/./static/js/103.f63fd4e4.chunk.js",
|
||||
"static/css/104.a8369a12.chunk.css": "/build/static/css/104.a8369a12.chunk.css",
|
||||
"./static/js/104.4611223c.chunk.js": "/build/./static/js/104.4611223c.chunk.js",
|
||||
"./static/js/105.bfc2c15e.chunk.js": "/build/./static/js/105.bfc2c15e.chunk.js",
|
||||
"static/css/106.65d4762d.chunk.css": "/build/static/css/106.65d4762d.chunk.css",
|
||||
"./static/js/106.09cc0782.chunk.js": "/build/./static/js/106.09cc0782.chunk.js",
|
||||
"./static/js/107.0f66ef09.chunk.js": "/build/./static/js/107.0f66ef09.chunk.js",
|
||||
"./static/js/108.1800e56b.chunk.js": "/build/./static/js/108.1800e56b.chunk.js",
|
||||
"static/css/109.b061f2f2.chunk.css": "/build/static/css/109.b061f2f2.chunk.css",
|
||||
"./static/js/109.9f5bc081.chunk.js": "/build/./static/js/109.9f5bc081.chunk.js",
|
||||
"static/css/110.8d772632.chunk.css": "/build/static/css/110.8d772632.chunk.css",
|
||||
"./static/js/110.12dbd242.chunk.js": "/build/./static/js/110.12dbd242.chunk.js",
|
||||
"static/css/111.6e730116.chunk.css": "/build/static/css/111.6e730116.chunk.css",
|
||||
"./static/js/111.accb32ed.chunk.js": "/build/./static/js/111.accb32ed.chunk.js",
|
||||
"static/css/112.7c5b2471.chunk.css": "/build/static/css/112.7c5b2471.chunk.css",
|
||||
"./static/js/112.caecf159.chunk.js": "/build/./static/js/112.caecf159.chunk.js",
|
||||
"static/css/113.7c5b2471.chunk.css": "/build/static/css/113.7c5b2471.chunk.css",
|
||||
"./static/js/113.d0530257.chunk.js": "/build/./static/js/113.d0530257.chunk.js",
|
||||
"static/css/114.285c512b.chunk.css": "/build/static/css/114.285c512b.chunk.css",
|
||||
"./static/js/114.ee38fde2.chunk.js": "/build/./static/js/114.ee38fde2.chunk.js",
|
||||
"static/css/115.a8369a12.chunk.css": "/build/static/css/115.a8369a12.chunk.css",
|
||||
"./static/js/115.46d068fe.chunk.js": "/build/./static/js/115.46d068fe.chunk.js",
|
||||
"static/css/116.bcb1f451.chunk.css": "/build/static/css/116.bcb1f451.chunk.css",
|
||||
"./static/js/116.11ca748b.chunk.js": "/build/./static/js/116.11ca748b.chunk.js",
|
||||
"static/css/117.17d1bb70.chunk.css": "/build/static/css/117.17d1bb70.chunk.css",
|
||||
"./static/js/117.3fe7527b.chunk.js": "/build/./static/js/117.3fe7527b.chunk.js",
|
||||
"static/css/118.f372aa77.chunk.css": "/build/static/css/118.f372aa77.chunk.css",
|
||||
"./static/js/118.127e973c.chunk.js": "/build/./static/js/118.127e973c.chunk.js",
|
||||
"static/css/119.4ce784a3.chunk.css": "/build/static/css/119.4ce784a3.chunk.css",
|
||||
"./static/js/119.ca155c1e.chunk.js": "/build/./static/js/119.ca155c1e.chunk.js",
|
||||
"static/css/120.0a9590f5.chunk.css": "/build/static/css/120.0a9590f5.chunk.css",
|
||||
"./static/js/120.5ca8905f.chunk.js": "/build/./static/js/120.5ca8905f.chunk.js",
|
||||
"static/css/121.efd66480.chunk.css": "/build/static/css/121.efd66480.chunk.css",
|
||||
"./static/js/121.7d61ae57.chunk.js": "/build/./static/js/121.7d61ae57.chunk.js",
|
||||
"static/css/122.fb033ab4.chunk.css": "/build/static/css/122.fb033ab4.chunk.css",
|
||||
"./static/js/122.e4635049.chunk.js": "/build/./static/js/122.e4635049.chunk.js",
|
||||
"./static/js/123.9c1875ba.chunk.js": "/build/./static/js/123.9c1875ba.chunk.js",
|
||||
"./static/js/124.5ba056a9.chunk.js": "/build/./static/js/124.5ba056a9.chunk.js",
|
||||
"static/css/125.f9492a75.chunk.css": "/build/static/css/125.f9492a75.chunk.css",
|
||||
"./static/js/125.8d74af79.chunk.js": "/build/./static/js/125.8d74af79.chunk.js",
|
||||
"static/css/126.3970c40d.chunk.css": "/build/static/css/126.3970c40d.chunk.css",
|
||||
"./static/js/126.4b514df7.chunk.js": "/build/./static/js/126.4b514df7.chunk.js",
|
||||
"static/css/127.b374ea9c.chunk.css": "/build/static/css/127.b374ea9c.chunk.css",
|
||||
"./static/js/127.d3cce7e0.chunk.js": "/build/./static/js/127.d3cce7e0.chunk.js",
|
||||
"./static/js/128.4054aedf.chunk.js": "/build/./static/js/128.4054aedf.chunk.js",
|
||||
"static/css/129.02c763e8.chunk.css": "/build/static/css/129.02c763e8.chunk.css",
|
||||
"./static/js/129.ca62636d.chunk.js": "/build/./static/js/129.ca62636d.chunk.js",
|
||||
"./static/js/130.a795be20.chunk.js": "/build/./static/js/130.a795be20.chunk.js",
|
||||
"static/css/131.82d6847d.chunk.css": "/build/static/css/131.82d6847d.chunk.css",
|
||||
"./static/js/131.c0de1395.chunk.js": "/build/./static/js/131.c0de1395.chunk.js",
|
||||
"./static/js/132.58c338f7.chunk.js": "/build/./static/js/132.58c338f7.chunk.js",
|
||||
"static/css/133.95c8fd70.chunk.css": "/build/static/css/133.95c8fd70.chunk.css",
|
||||
"./static/js/133.6b70d458.chunk.js": "/build/./static/js/133.6b70d458.chunk.js",
|
||||
"./static/js/134.15ebc6e2.chunk.js": "/build/./static/js/134.15ebc6e2.chunk.js",
|
||||
"static/css/135.b075271d.chunk.css": "/build/static/css/135.b075271d.chunk.css",
|
||||
"./static/js/135.4f3daa05.chunk.js": "/build/./static/js/135.4f3daa05.chunk.js",
|
||||
"static/css/136.4c8c6a11.chunk.css": "/build/static/css/136.4c8c6a11.chunk.css",
|
||||
"./static/js/136.e8619ed5.chunk.js": "/build/./static/js/136.e8619ed5.chunk.js",
|
||||
"static/css/137.d4e40697.chunk.css": "/build/static/css/137.d4e40697.chunk.css",
|
||||
"./static/js/137.70487a2f.chunk.js": "/build/./static/js/137.70487a2f.chunk.js",
|
||||
"static/css/138.89bc1500.chunk.css": "/build/static/css/138.89bc1500.chunk.css",
|
||||
"./static/js/138.505c8d03.chunk.js": "/build/./static/js/138.505c8d03.chunk.js",
|
||||
"static/css/139.f392094f.chunk.css": "/build/static/css/139.f392094f.chunk.css",
|
||||
"./static/js/139.e0526902.chunk.js": "/build/./static/js/139.e0526902.chunk.js",
|
||||
"static/css/140.7cc79b14.chunk.css": "/build/static/css/140.7cc79b14.chunk.css",
|
||||
"./static/js/140.cf26fac6.chunk.js": "/build/./static/js/140.cf26fac6.chunk.js",
|
||||
"static/css/141.4054f41b.chunk.css": "/build/static/css/141.4054f41b.chunk.css",
|
||||
"./static/js/141.bc17a232.chunk.js": "/build/./static/js/141.bc17a232.chunk.js",
|
||||
"static/css/142.6cf7864c.chunk.css": "/build/static/css/142.6cf7864c.chunk.css",
|
||||
"./static/js/142.ff941bfe.chunk.js": "/build/./static/js/142.ff941bfe.chunk.js",
|
||||
"static/css/143.b45e877f.chunk.css": "/build/static/css/143.b45e877f.chunk.css",
|
||||
"./static/js/143.a83d25b9.chunk.js": "/build/./static/js/143.a83d25b9.chunk.js",
|
||||
"./static/js/144.eaa30803.chunk.js": "/build/./static/js/144.eaa30803.chunk.js",
|
||||
"static/css/145.4e686135.chunk.css": "/build/static/css/145.4e686135.chunk.css",
|
||||
"./static/js/145.105c5b63.chunk.js": "/build/./static/js/145.105c5b63.chunk.js",
|
||||
"static/css/146.41b8aabd.chunk.css": "/build/static/css/146.41b8aabd.chunk.css",
|
||||
"./static/js/146.a9127d7a.chunk.js": "/build/./static/js/146.a9127d7a.chunk.js",
|
||||
"static/css/147.b7b78777.chunk.css": "/build/static/css/147.b7b78777.chunk.css",
|
||||
"./static/js/147.cc486019.chunk.js": "/build/./static/js/147.cc486019.chunk.js",
|
||||
"static/css/148.f71a647a.chunk.css": "/build/static/css/148.f71a647a.chunk.css",
|
||||
"./static/js/148.d95206fc.chunk.js": "/build/./static/js/148.d95206fc.chunk.js",
|
||||
"static/css/149.04a2ff4e.chunk.css": "/build/static/css/149.04a2ff4e.chunk.css",
|
||||
"./static/js/149.12464634.chunk.js": "/build/./static/js/149.12464634.chunk.js",
|
||||
"static/css/150.f3a81f4a.chunk.css": "/build/static/css/150.f3a81f4a.chunk.css",
|
||||
"./static/js/150.de916d46.chunk.js": "/build/./static/js/150.de916d46.chunk.js",
|
||||
"./static/js/151.19c68724.chunk.js": "/build/./static/js/151.19c68724.chunk.js",
|
||||
"static/css/152.198317fe.chunk.css": "/build/static/css/152.198317fe.chunk.css",
|
||||
"./static/js/152.d55c5823.chunk.js": "/build/./static/js/152.d55c5823.chunk.js",
|
||||
"./static/js/153.c39b3d67.chunk.js": "/build/./static/js/153.c39b3d67.chunk.js",
|
||||
"static/css/154.5fc996d6.chunk.css": "/build/static/css/154.5fc996d6.chunk.css",
|
||||
"./static/js/154.128708f6.chunk.js": "/build/./static/js/154.128708f6.chunk.js",
|
||||
"static/css/155.abf6bb9b.chunk.css": "/build/static/css/155.abf6bb9b.chunk.css",
|
||||
"./static/js/155.37267214.chunk.js": "/build/./static/js/155.37267214.chunk.js",
|
||||
"./static/js/156.e810c049.chunk.js": "/build/./static/js/156.e810c049.chunk.js",
|
||||
"./static/js/157.f24a0dd1.chunk.js": "/build/./static/js/157.f24a0dd1.chunk.js",
|
||||
"static/css/158.54bd5dfb.chunk.css": "/build/static/css/158.54bd5dfb.chunk.css",
|
||||
"./static/js/158.f5a43972.chunk.js": "/build/./static/js/158.f5a43972.chunk.js",
|
||||
"static/css/159.f71a647a.chunk.css": "/build/static/css/159.f71a647a.chunk.css",
|
||||
"./static/js/159.81a89ce2.chunk.js": "/build/./static/js/159.81a89ce2.chunk.js",
|
||||
"static/css/160.41b8aabd.chunk.css": "/build/static/css/160.41b8aabd.chunk.css",
|
||||
"./static/js/160.ab7f4079.chunk.js": "/build/./static/js/160.ab7f4079.chunk.js",
|
||||
"static/css/161.5dab72ac.chunk.css": "/build/static/css/161.5dab72ac.chunk.css",
|
||||
"./static/js/161.6c5c0b83.chunk.js": "/build/./static/js/161.6c5c0b83.chunk.js",
|
||||
"static/css/162.1d1f535f.chunk.css": "/build/static/css/162.1d1f535f.chunk.css",
|
||||
"./static/js/162.08de9687.chunk.js": "/build/./static/js/162.08de9687.chunk.js",
|
||||
"static/css/163.e59d7372.chunk.css": "/build/static/css/163.e59d7372.chunk.css",
|
||||
"./static/js/163.c7bb7ad6.chunk.js": "/build/./static/js/163.c7bb7ad6.chunk.js",
|
||||
"static/css/164.41b8aabd.chunk.css": "/build/static/css/164.41b8aabd.chunk.css",
|
||||
"./static/js/164.3f37398e.chunk.js": "/build/./static/js/164.3f37398e.chunk.js",
|
||||
"static/css/165.41b8aabd.chunk.css": "/build/static/css/165.41b8aabd.chunk.css",
|
||||
"./static/js/165.512e8b14.chunk.js": "/build/./static/js/165.512e8b14.chunk.js",
|
||||
"static/css/166.4aaa7f46.chunk.css": "/build/static/css/166.4aaa7f46.chunk.css",
|
||||
"./static/js/166.21ce5c7d.chunk.js": "/build/./static/js/166.21ce5c7d.chunk.js",
|
||||
"static/css/167.56776e6e.chunk.css": "/build/static/css/167.56776e6e.chunk.css",
|
||||
"./static/js/167.6e43ff51.chunk.js": "/build/./static/js/167.6e43ff51.chunk.js",
|
||||
"./static/js/168.d7e3d231.chunk.js": "/build/./static/js/168.d7e3d231.chunk.js",
|
||||
"./static/js/169.b9c1d396.chunk.js": "/build/./static/js/169.b9c1d396.chunk.js",
|
||||
"./static/js/170.b4af6cc8.chunk.js": "/build/./static/js/170.b4af6cc8.chunk.js",
|
||||
"./static/js/171.10efce5c.chunk.js": "/build/./static/js/171.10efce5c.chunk.js",
|
||||
"./static/js/172.48bcea83.chunk.js": "/build/./static/js/172.48bcea83.chunk.js",
|
||||
"static/css/173.a00e8dbd.chunk.css": "/build/static/css/173.a00e8dbd.chunk.css",
|
||||
"./static/js/173.d96f971d.chunk.js": "/build/./static/js/173.d96f971d.chunk.js",
|
||||
"./static/js/174.c015b1a6.chunk.js": "/build/./static/js/174.c015b1a6.chunk.js",
|
||||
"./static/js/175.7eb3abfd.chunk.js": "/build/./static/js/175.7eb3abfd.chunk.js",
|
||||
"static/css/176.c713331c.chunk.css": "/build/static/css/176.c713331c.chunk.css",
|
||||
"./static/js/176.1c9136d0.chunk.js": "/build/./static/js/176.1c9136d0.chunk.js",
|
||||
"static/css/177.83a06073.chunk.css": "/build/static/css/177.83a06073.chunk.css",
|
||||
"./static/js/177.f728dc06.chunk.js": "/build/./static/js/177.f728dc06.chunk.js",
|
||||
"./static/js/178.b6801c5f.chunk.js": "/build/./static/js/178.b6801c5f.chunk.js",
|
||||
"static/css/179.72319a07.chunk.css": "/build/static/css/179.72319a07.chunk.css",
|
||||
"./static/js/179.40cda1f1.chunk.js": "/build/./static/js/179.40cda1f1.chunk.js",
|
||||
"static/css/180.b92181f7.chunk.css": "/build/static/css/180.b92181f7.chunk.css",
|
||||
"./static/js/180.96d2b886.chunk.js": "/build/./static/js/180.96d2b886.chunk.js",
|
||||
"static/css/181.0f356fff.chunk.css": "/build/static/css/181.0f356fff.chunk.css",
|
||||
"./static/js/181.b255a60b.chunk.js": "/build/./static/js/181.b255a60b.chunk.js",
|
||||
"static/css/182.1b154d7a.chunk.css": "/build/static/css/182.1b154d7a.chunk.css",
|
||||
"./static/js/182.58f9e3e5.chunk.js": "/build/./static/js/182.58f9e3e5.chunk.js",
|
||||
"static/css/183.9b9005d9.chunk.css": "/build/static/css/183.9b9005d9.chunk.css",
|
||||
"./static/js/183.ec0a036a.chunk.js": "/build/./static/js/183.ec0a036a.chunk.js",
|
||||
"static/css/184.9b9005d9.chunk.css": "/build/static/css/184.9b9005d9.chunk.css",
|
||||
"./static/js/184.7ee4ffa4.chunk.js": "/build/./static/js/184.7ee4ffa4.chunk.js",
|
||||
"static/css/185.65678519.chunk.css": "/build/static/css/185.65678519.chunk.css",
|
||||
"./static/js/185.63e06522.chunk.js": "/build/./static/js/185.63e06522.chunk.js",
|
||||
"static/css/186.83a06073.chunk.css": "/build/static/css/186.83a06073.chunk.css",
|
||||
"./static/js/186.57b90394.chunk.js": "/build/./static/js/186.57b90394.chunk.js",
|
||||
"./static/js/187.d9174e9f.chunk.js": "/build/./static/js/187.d9174e9f.chunk.js",
|
||||
"static/css/188.ffaca542.chunk.css": "/build/static/css/188.ffaca542.chunk.css",
|
||||
"./static/js/188.04c0bdd6.chunk.js": "/build/./static/js/188.04c0bdd6.chunk.js",
|
||||
"./static/js/189.7abeb798.chunk.js": "/build/./static/js/189.7abeb798.chunk.js",
|
||||
"./static/js/190.1b668b75.chunk.js": "/build/./static/js/190.1b668b75.chunk.js",
|
||||
"static/css/191.f41f68fb.chunk.css": "/build/static/css/191.f41f68fb.chunk.css",
|
||||
"./static/js/191.3ca2c537.chunk.js": "/build/./static/js/191.3ca2c537.chunk.js",
|
||||
"static/css/192.1b154d7a.chunk.css": "/build/static/css/192.1b154d7a.chunk.css",
|
||||
"./static/js/192.879f0d10.chunk.js": "/build/./static/js/192.879f0d10.chunk.js",
|
||||
"static/css/193.01fa08a8.chunk.css": "/build/static/css/193.01fa08a8.chunk.css",
|
||||
"./static/js/193.faa851a0.chunk.js": "/build/./static/js/193.faa851a0.chunk.js",
|
||||
"static/css/194.1b154d7a.chunk.css": "/build/static/css/194.1b154d7a.chunk.css",
|
||||
"./static/js/194.44d4b97a.chunk.js": "/build/./static/js/194.44d4b97a.chunk.js",
|
||||
"static/css/195.5dab72ac.chunk.css": "/build/static/css/195.5dab72ac.chunk.css",
|
||||
"./static/js/195.9a934480.chunk.js": "/build/./static/js/195.9a934480.chunk.js",
|
||||
"static/css/196.6d12ef9c.chunk.css": "/build/static/css/196.6d12ef9c.chunk.css",
|
||||
"./static/js/196.6b996813.chunk.js": "/build/./static/js/196.6b996813.chunk.js",
|
||||
"./static/js/197.51ccec99.chunk.js": "/build/./static/js/197.51ccec99.chunk.js",
|
||||
"./static/js/198.d4b8488d.chunk.js": "/build/./static/js/198.d4b8488d.chunk.js",
|
||||
"static/css/199.7a81f5ff.chunk.css": "/build/static/css/199.7a81f5ff.chunk.css",
|
||||
"./static/js/199.a713328b.chunk.js": "/build/./static/js/199.a713328b.chunk.js",
|
||||
"./static/js/200.c9f274eb.chunk.js": "/build/./static/js/200.c9f274eb.chunk.js",
|
||||
"./static/js/201.304f926f.chunk.js": "/build/./static/js/201.304f926f.chunk.js",
|
||||
"static/css/202.ffaca542.chunk.css": "/build/static/css/202.ffaca542.chunk.css",
|
||||
"./static/js/202.00a652dd.chunk.js": "/build/./static/js/202.00a652dd.chunk.js",
|
||||
"static/css/203.ed4c6516.chunk.css": "/build/static/css/203.ed4c6516.chunk.css",
|
||||
"./static/js/203.c3cf71c6.chunk.js": "/build/./static/js/203.c3cf71c6.chunk.js",
|
||||
"static/css/204.8ddbb070.chunk.css": "/build/static/css/204.8ddbb070.chunk.css",
|
||||
"./static/js/204.a2cec0ce.chunk.js": "/build/./static/js/204.a2cec0ce.chunk.js",
|
||||
"static/css/205.60d3b086.chunk.css": "/build/static/css/205.60d3b086.chunk.css",
|
||||
"./static/js/205.78639f17.chunk.js": "/build/./static/js/205.78639f17.chunk.js",
|
||||
"static/css/206.a8369a12.chunk.css": "/build/static/css/206.a8369a12.chunk.css",
|
||||
"./static/js/206.1fac7eec.chunk.js": "/build/./static/js/206.1fac7eec.chunk.js",
|
||||
"static/css/207.53604072.chunk.css": "/build/static/css/207.53604072.chunk.css",
|
||||
"./static/js/207.7990f0f8.chunk.js": "/build/./static/js/207.7990f0f8.chunk.js",
|
||||
"static/css/208.a00e8dbd.chunk.css": "/build/static/css/208.a00e8dbd.chunk.css",
|
||||
"./static/js/208.1294d4e7.chunk.js": "/build/./static/js/208.1294d4e7.chunk.js",
|
||||
"static/css/209.a00e8dbd.chunk.css": "/build/static/css/209.a00e8dbd.chunk.css",
|
||||
"./static/js/209.a5457b78.chunk.js": "/build/./static/js/209.a5457b78.chunk.js",
|
||||
"static/css/210.238afeea.chunk.css": "/build/static/css/210.238afeea.chunk.css",
|
||||
"./static/js/210.d691c853.chunk.js": "/build/./static/js/210.d691c853.chunk.js",
|
||||
"static/css/211.0235d756.chunk.css": "/build/static/css/211.0235d756.chunk.css",
|
||||
"./static/js/211.6d76853d.chunk.js": "/build/./static/js/211.6d76853d.chunk.js",
|
||||
"static/css/212.46fb7389.chunk.css": "/build/static/css/212.46fb7389.chunk.css",
|
||||
"./static/js/212.fac23464.chunk.js": "/build/./static/js/212.fac23464.chunk.js",
|
||||
"static/css/213.c4ed6e32.chunk.css": "/build/static/css/213.c4ed6e32.chunk.css",
|
||||
"./static/js/213.1863cd8f.chunk.js": "/build/./static/js/213.1863cd8f.chunk.js",
|
||||
"./static/js/214.dc18a058.chunk.js": "/build/./static/js/214.dc18a058.chunk.js",
|
||||
"static/css/215.d4ed71fa.chunk.css": "/build/static/css/215.d4ed71fa.chunk.css",
|
||||
"./static/js/215.a7ea3336.chunk.js": "/build/./static/js/215.a7ea3336.chunk.js",
|
||||
"static/css/216.4ad9941b.chunk.css": "/build/static/css/216.4ad9941b.chunk.css",
|
||||
"./static/js/216.e87e07c3.chunk.js": "/build/./static/js/216.e87e07c3.chunk.js",
|
||||
"./static/js/217.84e28db3.chunk.js": "/build/./static/js/217.84e28db3.chunk.js",
|
||||
"static/css/218.7c83954e.chunk.css": "/build/static/css/218.7c83954e.chunk.css",
|
||||
"./static/js/218.7863f120.chunk.js": "/build/./static/js/218.7863f120.chunk.js",
|
||||
"static/css/219.41b8aabd.chunk.css": "/build/static/css/219.41b8aabd.chunk.css",
|
||||
"./static/js/219.fea5ea75.chunk.js": "/build/./static/js/219.fea5ea75.chunk.js",
|
||||
"./static/js/220.2c8b21c5.chunk.js": "/build/./static/js/220.2c8b21c5.chunk.js",
|
||||
"./static/js/221.b3182a1f.chunk.js": "/build/./static/js/221.b3182a1f.chunk.js",
|
||||
"static/css/222.3fda21ec.chunk.css": "/build/static/css/222.3fda21ec.chunk.css",
|
||||
"./static/js/222.575343bf.chunk.js": "/build/./static/js/222.575343bf.chunk.js",
|
||||
"./static/js/223.b1909b56.chunk.js": "/build/./static/js/223.b1909b56.chunk.js",
|
||||
"static/css/224.87b2f83c.chunk.css": "/build/static/css/224.87b2f83c.chunk.css",
|
||||
"./static/js/224.2e05a5ee.chunk.js": "/build/./static/js/224.2e05a5ee.chunk.js",
|
||||
"./static/js/225.b5a30b2c.chunk.js": "/build/./static/js/225.b5a30b2c.chunk.js",
|
||||
"./static/js/226.99320ae9.chunk.js": "/build/./static/js/226.99320ae9.chunk.js",
|
||||
"./static/js/227.cd39a681.chunk.js": "/build/./static/js/227.cd39a681.chunk.js",
|
||||
"./static/js/228.092a0156.chunk.js": "/build/./static/js/228.092a0156.chunk.js",
|
||||
"./static/js/229.68ed6b8c.chunk.js": "/build/./static/js/229.68ed6b8c.chunk.js",
|
||||
"./static/js/230.63de9e40.chunk.js": "/build/./static/js/230.63de9e40.chunk.js",
|
||||
"./static/js/231.bba7ccb3.chunk.js": "/build/./static/js/231.bba7ccb3.chunk.js",
|
||||
"./static/js/232.fb4c70d9.chunk.js": "/build/./static/js/232.fb4c70d9.chunk.js",
|
||||
"./static/js/233.7195ab89.chunk.js": "/build/./static/js/233.7195ab89.chunk.js",
|
||||
"./static/js/234.0deac417.chunk.js": "/build/./static/js/234.0deac417.chunk.js",
|
||||
"./static/js/235.b48121c2.chunk.js": "/build/./static/js/235.b48121c2.chunk.js",
|
||||
"./static/js/236.077131fc.chunk.js": "/build/./static/js/236.077131fc.chunk.js",
|
||||
"./static/js/237.9a1d115b.chunk.js": "/build/./static/js/237.9a1d115b.chunk.js",
|
||||
"./static/js/238.fce9ed44.chunk.js": "/build/./static/js/238.fce9ed44.chunk.js",
|
||||
"./static/js/239.ad7efc63.chunk.js": "/build/./static/js/239.ad7efc63.chunk.js",
|
||||
"./static/js/240.fb3f1c11.chunk.js": "/build/./static/js/240.fb3f1c11.chunk.js",
|
||||
"./static/js/241.c347a69d.chunk.js": "/build/./static/js/241.c347a69d.chunk.js",
|
||||
"./static/js/242.ca947850.chunk.js": "/build/./static/js/242.ca947850.chunk.js",
|
||||
"./static/js/243.b6612e2b.chunk.js": "/build/./static/js/243.b6612e2b.chunk.js",
|
||||
"./static/js/244.926ed5e2.chunk.js": "/build/./static/js/244.926ed5e2.chunk.js",
|
||||
"./static/js/245.9086d079.chunk.js": "/build/./static/js/245.9086d079.chunk.js",
|
||||
"./static/js/246.f122f5d6.chunk.js": "/build/./static/js/246.f122f5d6.chunk.js",
|
||||
"./static/js/247.8320e025.chunk.js": "/build/./static/js/247.8320e025.chunk.js",
|
||||
"./static/js/248.514a8025.chunk.js": "/build/./static/js/248.514a8025.chunk.js",
|
||||
"./static/js/249.b0488404.chunk.js": "/build/./static/js/249.b0488404.chunk.js",
|
||||
"./static/js/250.69f0474a.chunk.js": "/build/./static/js/250.69f0474a.chunk.js",
|
||||
"./static/js/251.5547bff6.chunk.js": "/build/./static/js/251.5547bff6.chunk.js",
|
||||
"./static/js/252.453e2a13.chunk.js": "/build/./static/js/252.453e2a13.chunk.js",
|
||||
"./static/js/253.051ed72c.chunk.js": "/build/./static/js/253.051ed72c.chunk.js",
|
||||
"./static/js/254.d23dea73.chunk.js": "/build/./static/js/254.d23dea73.chunk.js",
|
||||
"./static/js/255.9c803107.chunk.js": "/build/./static/js/255.9c803107.chunk.js",
|
||||
"./static/js/256.54846219.chunk.js": "/build/./static/js/256.54846219.chunk.js",
|
||||
"./static/js/257.87f24258.chunk.js": "/build/./static/js/257.87f24258.chunk.js",
|
||||
"./static/js/258.ab6b1ba3.chunk.js": "/build/./static/js/258.ab6b1ba3.chunk.js",
|
||||
"./static/js/259.04e6eb05.chunk.js": "/build/./static/js/259.04e6eb05.chunk.js",
|
||||
"./static/js/260.89692621.chunk.js": "/build/./static/js/260.89692621.chunk.js",
|
||||
"./static/js/261.f2324409.chunk.js": "/build/./static/js/261.f2324409.chunk.js",
|
||||
"./static/js/262.53f3b914.chunk.js": "/build/./static/js/262.53f3b914.chunk.js",
|
||||
"./static/js/263.cea1ea67.chunk.js": "/build/./static/js/263.cea1ea67.chunk.js",
|
||||
"./static/js/264.c184c824.chunk.js": "/build/./static/js/264.c184c824.chunk.js",
|
||||
"./static/js/265.b164fced.chunk.js": "/build/./static/js/265.b164fced.chunk.js",
|
||||
"./static/js/266.7e9c28b8.chunk.js": "/build/./static/js/266.7e9c28b8.chunk.js",
|
||||
"./static/js/267.2422930d.chunk.js": "/build/./static/js/267.2422930d.chunk.js",
|
||||
"./static/js/268.6357aa84.chunk.js": "/build/./static/js/268.6357aa84.chunk.js",
|
||||
"./static/js/269.7a4e2ac6.chunk.js": "/build/./static/js/269.7a4e2ac6.chunk.js",
|
||||
"./static/js/270.398f7b24.chunk.js": "/build/./static/js/270.398f7b24.chunk.js",
|
||||
"./static/js/271.cf890689.chunk.js": "/build/./static/js/271.cf890689.chunk.js",
|
||||
"./static/js/272.ec22d1e6.chunk.js": "/build/./static/js/272.ec22d1e6.chunk.js",
|
||||
"./static/js/273.dd664936.chunk.js": "/build/./static/js/273.dd664936.chunk.js",
|
||||
"./static/js/274.440745f1.chunk.js": "/build/./static/js/274.440745f1.chunk.js",
|
||||
"./static/js/275.a0e79a10.chunk.js": "/build/./static/js/275.a0e79a10.chunk.js",
|
||||
"./static/js/276.c0209f89.chunk.js": "/build/./static/js/276.c0209f89.chunk.js",
|
||||
"./static/js/277.ff582d15.chunk.js": "/build/./static/js/277.ff582d15.chunk.js",
|
||||
"./static/js/278.5bc98e9b.chunk.js": "/build/./static/js/278.5bc98e9b.chunk.js",
|
||||
"./static/js/279.31c756cf.chunk.js": "/build/./static/js/279.31c756cf.chunk.js",
|
||||
"./static/js/280.722a4532.chunk.js": "/build/./static/js/280.722a4532.chunk.js",
|
||||
"./static/js/281.8b48400a.chunk.js": "/build/./static/js/281.8b48400a.chunk.js",
|
||||
"./static/js/282.a62e7095.chunk.js": "/build/./static/js/282.a62e7095.chunk.js",
|
||||
"./static/js/283.480b4054.chunk.js": "/build/./static/js/283.480b4054.chunk.js",
|
||||
"./static/js/284.c1db2701.chunk.js": "/build/./static/js/284.c1db2701.chunk.js",
|
||||
"./static/js/285.7f016fc7.chunk.js": "/build/./static/js/285.7f016fc7.chunk.js",
|
||||
"./static/js/286.81b02df5.chunk.js": "/build/./static/js/286.81b02df5.chunk.js",
|
||||
"./static/js/287.6487447c.chunk.js": "/build/./static/js/287.6487447c.chunk.js",
|
||||
"./static/js/288.0b88decc.chunk.js": "/build/./static/js/288.0b88decc.chunk.js",
|
||||
"./static/js/289.6a9fb256.chunk.js": "/build/./static/js/289.6a9fb256.chunk.js",
|
||||
"./static/js/290.6723af90.chunk.js": "/build/./static/js/290.6723af90.chunk.js",
|
||||
"./static/js/291.3dbe4b07.chunk.js": "/build/./static/js/291.3dbe4b07.chunk.js",
|
||||
"./static/js/292.441452c8.chunk.js": "/build/./static/js/292.441452c8.chunk.js",
|
||||
"./static/js/293.64a9c70d.chunk.js": "/build/./static/js/293.64a9c70d.chunk.js",
|
||||
"./static/js/294.ce49fb71.chunk.js": "/build/./static/js/294.ce49fb71.chunk.js",
|
||||
"./static/js/295.a4e6278f.chunk.js": "/build/./static/js/295.a4e6278f.chunk.js",
|
||||
"./static/js/296.51467c48.chunk.js": "/build/./static/js/296.51467c48.chunk.js",
|
||||
"./static/js/297.b1890585.chunk.js": "/build/./static/js/297.b1890585.chunk.js",
|
||||
"./static/js/298.87e13617.chunk.js": "/build/./static/js/298.87e13617.chunk.js",
|
||||
"./static/js/299.b144c47c.chunk.js": "/build/./static/js/299.b144c47c.chunk.js",
|
||||
"./static/js/300.739d7d0a.chunk.js": "/build/./static/js/300.739d7d0a.chunk.js",
|
||||
"./static/js/301.183a65a4.chunk.js": "/build/./static/js/301.183a65a4.chunk.js",
|
||||
"./static/js/302.12521054.chunk.js": "/build/./static/js/302.12521054.chunk.js",
|
||||
"./static/js/303.939904bf.chunk.js": "/build/./static/js/303.939904bf.chunk.js",
|
||||
"./static/js/304.3d78c0ea.chunk.js": "/build/./static/js/304.3d78c0ea.chunk.js",
|
||||
"./static/js/305.59393fe8.chunk.js": "/build/./static/js/305.59393fe8.chunk.js",
|
||||
"./static/js/306.7b50abfb.chunk.js": "/build/./static/js/306.7b50abfb.chunk.js",
|
||||
"./static/js/307.769cf898.chunk.js": "/build/./static/js/307.769cf898.chunk.js",
|
||||
"./static/js/308.bf23cab1.chunk.js": "/build/./static/js/308.bf23cab1.chunk.js",
|
||||
"./static/js/309.24291f59.chunk.js": "/build/./static/js/309.24291f59.chunk.js",
|
||||
"./static/js/310.567e8f81.chunk.js": "/build/./static/js/310.567e8f81.chunk.js",
|
||||
"main.css": "/build/static/css/main.7f9d9f47.chunk.css",
|
||||
"main.js": "/build/./static/js/main.219e5735.chunk.js",
|
||||
"runtime~main.js": "/build/./static/js/runtime~main.b9181bd0.js",
|
||||
"./static/js/124.5ba056a9.chunk.js.LICENSE.txt": "/build/./static/js/124.5ba056a9.chunk.js.LICENSE.txt",
|
||||
"./static/js/13.a7e41a56.chunk.js.LICENSE.txt": "/build/./static/js/13.a7e41a56.chunk.js.LICENSE.txt",
|
||||
"./static/js/305.59393fe8.chunk.js.LICENSE.txt": "/build/./static/js/305.59393fe8.chunk.js.LICENSE.txt",
|
||||
"./static/js/42.226bdee1.chunk.js.LICENSE.txt": "/build/./static/js/42.226bdee1.chunk.js.LICENSE.txt",
|
||||
"./static/js/50.58a4f9d3.chunk.js.LICENSE.txt": "/build/./static/js/50.58a4f9d3.chunk.js.LICENSE.txt",
|
||||
"./static/js/main.219e5735.chunk.js.LICENSE.txt": "/build/./static/js/main.219e5735.chunk.js.LICENSE.txt",
|
||||
"css.worker.js": "/build/css.worker.js",
|
||||
"editor.worker.js": "/build/editor.worker.js",
|
||||
"html.worker.js": "/build/html.worker.js",
|
||||
"index.html": "/build/index.html",
|
||||
"json.worker.js": "/build/json.worker.js",
|
||||
"static/media/1-1.326756d2.png": "/build/static/media/1-1.326756d2.png",
|
||||
"static/media/1-2-1.c69d0019.png": "/build/static/media/1-2-1.c69d0019.png",
|
||||
"static/media/1-2-2.72d0e8d9.png": "/build/static/media/1-2-2.72d0e8d9.png",
|
||||
"static/media/1-3-1.0675a401.png": "/build/static/media/1-3-1.0675a401.png",
|
||||
"static/media/1-3-2.18b1b3aa.png": "/build/static/media/1-3-2.18b1b3aa.png",
|
||||
"static/media/1-3-3.278bc559.png": "/build/static/media/1-3-3.278bc559.png",
|
||||
"static/media/1-4-1.1d473dfb.png": "/build/static/media/1-4-1.1d473dfb.png",
|
||||
"static/media/1-4-2.580c446b.png": "/build/static/media/1-4-2.580c446b.png",
|
||||
"static/media/1-4-3.7e14a7a8.png": "/build/static/media/1-4-3.7e14a7a8.png",
|
||||
"static/media/1-5-1.93e04040.png": "/build/static/media/1-5-1.93e04040.png",
|
||||
"static/media/1-5-2.b79cd8f9.png": "/build/static/media/1-5-2.b79cd8f9.png",
|
||||
"static/media/1-5-3.3033f1c5.png": "/build/static/media/1-5-3.3033f1c5.png",
|
||||
"static/media/1-5-4.45f088f0.png": "/build/static/media/1-5-4.45f088f0.png",
|
||||
"static/media/1-6-1.5a0bf3fc.png": "/build/static/media/1-6-1.5a0bf3fc.png",
|
||||
"static/media/1-6-2.19a2d376.png": "/build/static/media/1-6-2.19a2d376.png",
|
||||
"static/media/1-6-3.d38dcd00.png": "/build/static/media/1-6-3.d38dcd00.png",
|
||||
"static/media/1.png": "/build/static/media/1.a0e7fa02.png",
|
||||
"static/media/1.6e05986c.png": "/build/static/media/1.6e05986c.png",
|
||||
"static/media/2-1.ffe21636.png": "/build/static/media/2-1.ffe21636.png",
|
||||
"static/media/Index.scss": "/build/static/media/typebg.b2b0ea32.png",
|
||||
"static/media/2-2-1.afd0f2f5.png": "/build/static/media/2-2-1.afd0f2f5.png",
|
||||
"static/media/2-2-2.26bc3301.png": "/build/static/media/2-2-2.26bc3301.png",
|
||||
"static/media/2-2-3.6d6ce99c.png": "/build/static/media/2-2-3.6d6ce99c.png",
|
||||
"static/media/2-2-head.5e69dbb2.png": "/build/static/media/2-2-head.5e69dbb2.png",
|
||||
"static/media/2-3-1.bcb33d47.png": "/build/static/media/2-3-1.bcb33d47.png",
|
||||
"static/media/2-3-2.57ef08ae.png": "/build/static/media/2-3-2.57ef08ae.png",
|
||||
"static/media/2-3-3.52733627.png": "/build/static/media/2-3-3.52733627.png",
|
||||
"static/media/2-3-4.339b2f1c.png": "/build/static/media/2-3-4.339b2f1c.png",
|
||||
"static/media/2-6-1.302b729e.png": "/build/static/media/2-6-1.302b729e.png",
|
||||
"static/media/2-6-2.b262b91e.png": "/build/static/media/2-6-2.b262b91e.png",
|
||||
"static/media/2.52a917b7.png": "/build/static/media/2.52a917b7.png",
|
||||
"static/media/index.scss": "/build/static/media/visionBackActive.14814f28.png",
|
||||
"static/media/2.png": "/build/static/media/2.77704a00.png",
|
||||
"static/media/3-1.43d900c7.png": "/build/static/media/3-1.43d900c7.png",
|
||||
"static/media/3-1.9fdda521.png": "/build/static/media/3-1.9fdda521.png",
|
||||
"static/media/3-2.47050941.png": "/build/static/media/3-2.47050941.png",
|
||||
"static/media/3-3.c767aae7.png": "/build/static/media/3-3.c767aae7.png",
|
||||
"static/media/3-4.92820cbc.png": "/build/static/media/3-4.92820cbc.png",
|
||||
"static/media/3.9c2613d9.png": "/build/static/media/3.9c2613d9.png",
|
||||
"static/media/34@2x.ed8e5910.png": "/build/static/media/34@2x.ed8e5910.png",
|
||||
"static/media/35@2x.33462edc.png": "/build/static/media/35@2x.33462edc.png",
|
||||
"static/media/36@2x.8f54f5ba.png": "/build/static/media/36@2x.8f54f5ba.png",
|
||||
"static/media/37@2x.97a40a2a.png": "/build/static/media/37@2x.97a40a2a.png",
|
||||
"static/media/38@2x.f072fe68.png": "/build/static/media/38@2x.f072fe68.png",
|
||||
"static/media/39@2x.ee1af05a.png": "/build/static/media/39@2x.ee1af05a.png",
|
||||
"static/media/4-1.1c268b1d.png": "/build/static/media/4-1.1c268b1d.png",
|
||||
"static/media/4-1.79fa159d.png": "/build/static/media/4-1.79fa159d.png",
|
||||
"static/media/4-2.9c066e75.png": "/build/static/media/4-2.9c066e75.png",
|
||||
"static/media/4-3.a1487a5b.png": "/build/static/media/4-3.a1487a5b.png",
|
||||
"static/media/4-4.5eb40734.png": "/build/static/media/4-4.5eb40734.png",
|
||||
"static/media/4.00560455.png": "/build/static/media/4.00560455.png",
|
||||
"static/media/4.png": "/build/static/media/4.38b9f947.png",
|
||||
"static/media/40@2x.f10a55e2.png": "/build/static/media/40@2x.f10a55e2.png",
|
||||
"static/media/42@2x.25d6b5fd.png": "/build/static/media/42@2x.25d6b5fd.png",
|
||||
"static/media/44@2x.1374baf9.png": "/build/static/media/44@2x.1374baf9.png",
|
||||
"static/media/46@2x.e272d43e.png": "/build/static/media/46@2x.e272d43e.png",
|
||||
"static/media/48@2x.3bde4de9.png": "/build/static/media/48@2x.3bde4de9.png",
|
||||
"static/media/49.b03e6efe.png": "/build/static/media/49.b03e6efe.png",
|
||||
"static/media/50@2x.69b76634.png": "/build/static/media/50@2x.69b76634.png",
|
||||
"static/media/52@2x.41805cbb.png": "/build/static/media/52@2x.41805cbb.png",
|
||||
"static/media/55@2x.83486b73.png": "/build/static/media/55@2x.83486b73.png",
|
||||
"static/media/57@2x.8dc6b0b8.png": "/build/static/media/57@2x.8dc6b0b8.png",
|
||||
"static/media/59@2x.b0884ef0.png": "/build/static/media/59@2x.b0884ef0.png",
|
||||
"static/media/61@2x.99d3cc3e.png": "/build/static/media/61@2x.99d3cc3e.png",
|
||||
"static/media/63@2x.49f389b9.png": "/build/static/media/63@2x.49f389b9.png",
|
||||
"static/media/65@2x.ef33e2f9.png": "/build/static/media/65@2x.ef33e2f9.png",
|
||||
"static/media/67@2x.4a4f4b6c.png": "/build/static/media/67@2x.4a4f4b6c.png",
|
||||
"static/media/69@2x.379c6a82.png": "/build/static/media/69@2x.379c6a82.png",
|
||||
"static/media/6_f_b.png": "/build/static/media/6_f_b.799839a6.png",
|
||||
"static/media/6_f_m.dc64e502.png": "/build/static/media/6_f_m.dc64e502.png",
|
||||
"static/media/70.df160b27.png": "/build/static/media/70.df160b27.png",
|
||||
"static/media/7_b.png": "/build/static/media/7_b.1a74a65c.png",
|
||||
"static/media/7_l_b.png": "/build/static/media/7_l_b.159c13ef.png",
|
||||
"static/media/BJHKHT.f065403a.png": "/build/static/media/BJHKHT.f065403a.png",
|
||||
"static/media/CCF.91cd9ebc.png": "/build/static/media/CCF.91cd9ebc.png",
|
||||
"static/media/CEC.3b748059.png": "/build/static/media/CEC.3b748059.png",
|
||||
"static/media/GFKJ.eb30c414.png": "/build/static/media/GFKJ.eb30c414.png",
|
||||
"static/media/HSKY.2e76ba44.png": "/build/static/media/HSKY.2e76ba44.png",
|
||||
"static/media/ISCAS.851fcfda.png": "/build/static/media/ISCAS.851fcfda.png",
|
||||
"static/media/KYRJLM.2d659e5c.png": "/build/static/media/KYRJLM.2d659e5c.png",
|
||||
"static/media/katex.css": "/build/static/media/KaTeX_Typewriter-Regular.d3c8e68f.woff",
|
||||
"static/media/LC.f247fdb8.png": "/build/static/media/LC.f247fdb8.png",
|
||||
"static/media/LSLM.99387946.png": "/build/static/media/LSLM.99387946.png",
|
||||
"static/media/ML.08d278e2.png": "/build/static/media/ML.08d278e2.png",
|
||||
"static/media/NJDX.bb34b326.png": "/build/static/media/NJDX.bb34b326.png",
|
||||
"static/media/OpenI.5fdd3a44.svg": "/build/static/media/OpenI.5fdd3a44.svg",
|
||||
"static/media/QH.b57a0131.png": "/build/static/media/QH.b57a0131.png",
|
||||
"static/media/SHJT.426bf0c7.png": "/build/static/media/SHJT.426bf0c7.png",
|
||||
"static/media/TX.b703476c.png": "/build/static/media/TX.b703476c.png",
|
||||
"static/media/WXYJY.21e40191.png": "/build/static/media/WXYJY.21e40191.png",
|
||||
"static/media/XH.a0a88f17.png": "/build/static/media/XH.a0a88f17.png",
|
||||
"static/media/XJY.b4c57bf1.png": "/build/static/media/XJY.b4c57bf1.png",
|
||||
"static/media/YKD.4f7e2766.png": "/build/static/media/YKD.4f7e2766.png",
|
||||
"static/media/ZC.ad056aa5.png": "/build/static/media/ZC.ad056aa5.png",
|
||||
"static/media/achievements.f20b7e39.png": "/build/static/media/achievements.f20b7e39.png",
|
||||
"static/media/add.0a24714a.png": "/build/static/media/add.0a24714a.png",
|
||||
"static/media/indexUser.scss": "/build/static/media/userMBg2.2f156240.png",
|
||||
"static/media/back1.png": "/build/static/media/back1.1f20bd0a.png",
|
||||
"static/media/back2.png": "/build/static/media/back2.0041bb9e.png",
|
||||
"static/media/back3.png": "/build/static/media/back3.16134f64.png",
|
||||
"static/media/ball.24214b6e.png": "/build/static/media/ball.24214b6e.png",
|
||||
"static/media/banner-interim.c50ff667.png": "/build/static/media/banner-interim.c50ff667.png",
|
||||
"static/media/banner-interim1.bc583d0a.png": "/build/static/media/banner-interim1.bc583d0a.png",
|
||||
"static/media/AboutUs.scss": "/build/static/media/teambanner.fad350dd.png",
|
||||
"static/media/banner.png": "/build/static/media/banner.84187e6e.png",
|
||||
"static/media/banner.d91fab7d.svg": "/build/static/media/banner.d91fab7d.svg",
|
||||
"static/media/banner.f7da2db1.png": "/build/static/media/banner.f7da2db1.png",
|
||||
"static/media/banner2024.65b24d59.jpg": "/build/static/media/banner2024.65b24d59.jpg",
|
||||
"static/media/banner2025.a9c9011c.jpg": "/build/static/media/banner2025.a9c9011c.jpg",
|
||||
"static/media/banner2026.aec8b5b8.png": "/build/static/media/banner2026.aec8b5b8.png",
|
||||
"static/media/banner_list.e02c5e16.jpg": "/build/static/media/banner_list.e02c5e16.jpg",
|
||||
"static/media/bc.png": "/build/static/media/bc.68cf5cc0.png",
|
||||
"static/media/beijing.bfcd5b0e.png": "/build/static/media/beijing.bfcd5b0e.png",
|
||||
"static/media/LoginRegisterPage.scss": "/build/static/media/rightBg.55f14f0c.png",
|
||||
"static/media/bgPng.png": "/build/static/media/bgPng.ed010245.png",
|
||||
"static/media/bkImg3.png": "/build/static/media/bkImg3.d0c6885f.png",
|
||||
"static/media/bkImg4.png": "/build/static/media/bkImg4.bee6a245.png",
|
||||
"static/media/cardHeadbc.png": "/build/static/media/cardHeadbc.e45367d9.png",
|
||||
"static/media/cate_page_img1.a896abc9.png": "/build/static/media/cate_page_img1.a896abc9.png",
|
||||
"static/media/ccf_bk10.a1c3e054.png": "/build/static/media/ccf_bk10.a1c3e054.png",
|
||||
"static/media/ccf_bk11.3d763660.png": "/build/static/media/ccf_bk11.3d763660.png",
|
||||
"static/media/ccf_bk7.83ab8d2e.png": "/build/static/media/ccf_bk7.83ab8d2e.png",
|
||||
"static/media/ccf_bk8.62f501ed.png": "/build/static/media/ccf_bk8.62f501ed.png",
|
||||
"static/media/ccf_bk9.cb9059fe.png": "/build/static/media/ccf_bk9.cb9059fe.png",
|
||||
"static/media/ccf_img1.3a3f694c.png": "/build/static/media/ccf_img1.3a3f694c.png",
|
||||
"static/media/ccf_img3.d0c6885f.png": "/build/static/media/ccf_img3.d0c6885f.png",
|
||||
"static/media/ccf_img4.c899595e.png": "/build/static/media/ccf_img4.c899595e.png",
|
||||
"static/media/ccf_logo.a54fdc70.png": "/build/static/media/ccf_logo.a54fdc70.png",
|
||||
"static/media/ccf_logo1.be10ead7.png": "/build/static/media/ccf_logo1.be10ead7.png",
|
||||
"static/media/center_title_bg.0404e256.png": "/build/static/media/center_title_bg.0404e256.png",
|
||||
"static/media/codeafter.c3088c74.png": "/build/static/media/codeafter.c3088c74.png",
|
||||
"static/media/color1.png": "/build/static/media/color1.5ec57881.png",
|
||||
"static/media/color2.png": "/build/static/media/color2.a71ab734.png",
|
||||
"static/media/color3.png": "/build/static/media/color3.76d404ab.png",
|
||||
"static/media/color4.png": "/build/static/media/color4.e0954f96.png",
|
||||
"static/media/indexZone1.scss": "/build/static/media/vipTitleBg.64d456e6.png",
|
||||
"static/media/computer.4fe86b12.png": "/build/static/media/computer.4fe86b12.png",
|
||||
"static/media/concat.e4aa4d07.jpg": "/build/static/media/concat.e4aa4d07.jpg",
|
||||
"static/media/devops.png": "/build/static/media/devops.39983f5b.png",
|
||||
"static/media/earth.050b1435.png": "/build/static/media/earth.050b1435.png",
|
||||
"static/media/educoder.c918f385.png": "/build/static/media/educoder.c918f385.png",
|
||||
"static/media/emp.png": "/build/static/media/emp.35f6c709.png",
|
||||
"static/media/freeBanner.292dbf56.png": "/build/static/media/freeBanner.292dbf56.png",
|
||||
"static/media/fun1.c99ffa49.png": "/build/static/media/fun1.c99ffa49.png",
|
||||
"static/media/fun2.12f22bca.png": "/build/static/media/fun2.12f22bca.png",
|
||||
"static/media/fun3.75c280e6.png": "/build/static/media/fun3.75c280e6.png",
|
||||
"static/media/fun4.f499794e.png": "/build/static/media/fun4.f499794e.png",
|
||||
"static/media/fun5.96b44942.png": "/build/static/media/fun5.96b44942.png",
|
||||
"static/media/gitlink-gz.d351910b.png": "/build/static/media/gitlink-gz.d351910b.png",
|
||||
"static/media/gitlink-qq.90d5ac1b.png": "/build/static/media/gitlink-qq.90d5ac1b.png",
|
||||
"static/media/gitlink1.4bf0ed96.png": "/build/static/media/gitlink1.4bf0ed96.png",
|
||||
"static/media/gitlink2.0ec0ec22.png": "/build/static/media/gitlink2.0ec0ec22.png",
|
||||
"static/media/green_nodata.be7b538b.png": "/build/static/media/green_nodata.be7b538b.png",
|
||||
"static/media/head.52aa3fc8.png": "/build/static/media/head.52aa3fc8.png",
|
||||
"static/media/help.0bfb2587.png": "/build/static/media/help.0bfb2587.png",
|
||||
"static/media/help_bg.d2bb4c18.png": "/build/static/media/help_bg.d2bb4c18.png",
|
||||
"static/media/huake.63b6a34d.png": "/build/static/media/huake.63b6a34d.png",
|
||||
"static/media/huawei.73ec7c22.png": "/build/static/media/huawei.73ec7c22.png",
|
||||
"static/media/icon.1322725f.svg": "/build/static/media/icon.1322725f.svg",
|
||||
"static/media/ideLogo.svg": "/build/static/media/ideLogo.0dca8d76.svg",
|
||||
"static/media/image1.cd619434.png": "/build/static/media/image1.cd619434.png",
|
||||
"static/media/image2.c008e6f7.png": "/build/static/media/image2.c008e6f7.png",
|
||||
"static/media/Teaching.scss": "/build/static/media/image22.6ff2b063.svg",
|
||||
"static/media/image3.d256faa3.png": "/build/static/media/image3.d256faa3.png",
|
||||
"static/media/image4.c445d23b.png": "/build/static/media/image4.c445d23b.png",
|
||||
"static/media/image5.71d796d4.png": "/build/static/media/image5.71d796d4.png",
|
||||
"static/media/image6.547ab677.png": "/build/static/media/image6.547ab677.png",
|
||||
"static/media/img1.png": "/build/static/media/img1.676de78a.png",
|
||||
"static/media/img1.8560258f.png": "/build/static/media/img1.8560258f.png",
|
||||
"static/media/img1.e0beda57.png": "/build/static/media/img1.e0beda57.png",
|
||||
"static/media/img1.fc155528.png": "/build/static/media/img1.fc155528.png",
|
||||
"static/media/img10.64149a3d.png": "/build/static/media/img10.64149a3d.png",
|
||||
"static/media/img15.87a3556c.png": "/build/static/media/img15.87a3556c.png",
|
||||
"static/media/img16.32badab9.png": "/build/static/media/img16.32badab9.png",
|
||||
"static/media/img17.c25d5edc.png": "/build/static/media/img17.c25d5edc.png",
|
||||
"static/media/img18.4963efc1.png": "/build/static/media/img18.4963efc1.png",
|
||||
"static/media/img2.789fbbfe.png": "/build/static/media/img2.789fbbfe.png",
|
||||
"static/media/img2.ae303051.png": "/build/static/media/img2.ae303051.png",
|
||||
"static/media/img3.cee3ac5b.png": "/build/static/media/img3.cee3ac5b.png",
|
||||
"static/media/img4.53c937cb.png": "/build/static/media/img4.53c937cb.png",
|
||||
"static/media/img5.ca3a2287.png": "/build/static/media/img5.ca3a2287.png",
|
||||
"static/media/img6.8f81bf78.png": "/build/static/media/img6.8f81bf78.png",
|
||||
"static/media/img7.e4a68e6e.png": "/build/static/media/img7.e4a68e6e.png",
|
||||
"static/media/img8.10500e00.png": "/build/static/media/img8.10500e00.png",
|
||||
"static/media/img9.d25372ba.png": "/build/static/media/img9.d25372ba.png",
|
||||
"static/media/importNone.5bada960.png": "/build/static/media/importNone.5bada960.png",
|
||||
"static/media/introduce.30b50cda.png": "/build/static/media/introduce.30b50cda.png",
|
||||
"static/media/item10.png": "/build/static/media/item10.4680cb0e.png",
|
||||
"static/media/jijinhui.041fb524.png": "/build/static/media/jijinhui.041fb524.png",
|
||||
"static/media/large.a34ed58b.png": "/build/static/media/large.a34ed58b.png",
|
||||
"static/media/license.25734ac7.png": "/build/static/media/license.25734ac7.png",
|
||||
"static/media/lightspot1.9214f0ae.png": "/build/static/media/lightspot1.9214f0ae.png",
|
||||
"static/media/lightspot2.b7053786.png": "/build/static/media/lightspot2.b7053786.png",
|
||||
"static/media/lightspot3.2f8af8da.png": "/build/static/media/lightspot3.2f8af8da.png",
|
||||
"static/media/lightspot4.93769763.png": "/build/static/media/lightspot4.93769763.png",
|
||||
"static/media/line.e5ece354.png": "/build/static/media/line.e5ece354.png",
|
||||
"static/media/logo.png": "/build/static/media/logo.62af9fee.png",
|
||||
"static/media/logo.f0d4927b.svg": "/build/static/media/logo.f0d4927b.svg",
|
||||
"static/media/logo1.77949f0b.png": "/build/static/media/logo1.77949f0b.png",
|
||||
"static/media/logo1.ec3c2e67.png": "/build/static/media/logo1.ec3c2e67.png",
|
||||
"static/media/logo2.b04c07f2.png": "/build/static/media/logo2.b04c07f2.png",
|
||||
"static/media/mainbanner.659efd27.png": "/build/static/media/mainbanner.659efd27.png",
|
||||
"static/media/middle.cf4a9916.png": "/build/static/media/middle.cf4a9916.png",
|
||||
"static/media/mulan.690d2289.png": "/build/static/media/mulan.690d2289.png",
|
||||
"static/media/new.png": "/build/static/media/new.6d0928ca.png",
|
||||
"static/media/newBk1.png": "/build/static/media/newBk1.8cce0411.png",
|
||||
"static/media/newBk3.png": "/build/static/media/newBk3.2ebea384.png",
|
||||
"static/media/newBk4.png": "/build/static/media/newBk4.23206a3c.png",
|
||||
"static/media/new_3_bk.png": "/build/static/media/new_3_bk.7b6b1a59.png",
|
||||
"static/media/new_4_bk.png": "/build/static/media/new_4_bk.9e9537b0.png",
|
||||
"static/media/new_5_bk.png": "/build/static/media/new_5_bk.8cf6141e.png",
|
||||
"static/media/new_6_bk.png": "/build/static/media/new_6_bk.b8be94df.png",
|
||||
"static/media/newsBg.66918645.png": "/build/static/media/newsBg.66918645.png",
|
||||
"static/media/news_line.eb05bff1.png": "/build/static/media/news_line.eb05bff1.png",
|
||||
"static/media/next.1c184f48.png": "/build/static/media/next.1c184f48.png",
|
||||
"static/media/nodata.png": "/build/static/media/nodata.e34b5912.png",
|
||||
"static/media/TPMIndex.css": "/build/static/media/nps2.d5d0b666.png",
|
||||
"static/media/person.7544cfa0.png": "/build/static/media/person.7544cfa0.png",
|
||||
"static/media/teamSetting.scss": "/build/static/media/personalInfo2.f01447c8.png",
|
||||
"static/media/phone.14961064.svg": "/build/static/media/phone.14961064.svg",
|
||||
"static/media/qqChat.9e56cc22.png": "/build/static/media/qqChat.9e56cc22.png",
|
||||
"static/media/resultBanner2.c3095c5d.png": "/build/static/media/resultBanner2.c3095c5d.png",
|
||||
"static/media/resultBanner3.e11193de.png": "/build/static/media/resultBanner3.e11193de.png",
|
||||
"static/media/resultBanner4.6eda6ee5.png": "/build/static/media/resultBanner4.6eda6ee5.png",
|
||||
"static/media/s_bc.png": "/build/static/media/s_bc.3381a489.png",
|
||||
"static/media/slick-theme.css": "/build/static/media/slick.c94f7671.ttf",
|
||||
"static/media/small.bbabd52e.png": "/build/static/media/small.bbabd52e.png",
|
||||
"static/media/source2.png": "/build/static/media/source2.3c5249bc.png",
|
||||
"static/media/sponsor11.5e9da48d.png": "/build/static/media/sponsor11.5e9da48d.png",
|
||||
"static/media/sponsor21.8a655acc.png": "/build/static/media/sponsor21.8a655acc.png",
|
||||
"static/media/sponsor22.96e2b643.png": "/build/static/media/sponsor22.96e2b643.png",
|
||||
"static/media/sponsor31.0fd95bcb.png": "/build/static/media/sponsor31.0fd95bcb.png",
|
||||
"static/media/sponsor33.27be3b2d.png": "/build/static/media/sponsor33.27be3b2d.png",
|
||||
"static/media/sponsor42.cac8770a.png": "/build/static/media/sponsor42.cac8770a.png",
|
||||
"static/media/sponsor43.9e4a3afb.png": "/build/static/media/sponsor43.9e4a3afb.png",
|
||||
"static/media/studentProject.f5bd2481.png": "/build/static/media/studentProject.f5bd2481.png",
|
||||
"static/media/studentProject2.78fd5476.png": "/build/static/media/studentProject2.78fd5476.png",
|
||||
"static/media/subtitle.5019e086.png": "/build/static/media/subtitle.5019e086.png",
|
||||
"static/media/sys.00b52dac.png": "/build/static/media/sys.00b52dac.png",
|
||||
"static/media/teacher1.ee492a9b.png": "/build/static/media/teacher1.ee492a9b.png",
|
||||
"static/media/teacher10.9298db29.png": "/build/static/media/teacher10.9298db29.png",
|
||||
"static/media/teacher11.8a0d8669.png": "/build/static/media/teacher11.8a0d8669.png",
|
||||
"static/media/teacher12.47e02224.png": "/build/static/media/teacher12.47e02224.png",
|
||||
"static/media/teacher13.f7886e36.png": "/build/static/media/teacher13.f7886e36.png",
|
||||
"static/media/teacher14.83b48396.png": "/build/static/media/teacher14.83b48396.png",
|
||||
"static/media/teacher15.5d777604.png": "/build/static/media/teacher15.5d777604.png",
|
||||
"static/media/teacher2.b2b9919d.png": "/build/static/media/teacher2.b2b9919d.png",
|
||||
"static/media/teacher3.20cb800b.png": "/build/static/media/teacher3.20cb800b.png",
|
||||
"static/media/teacher4.c15a0bda.png": "/build/static/media/teacher4.c15a0bda.png",
|
||||
"static/media/teacher5.9397d078.png": "/build/static/media/teacher5.9397d078.png",
|
||||
"static/media/teacher6.06b6f465.png": "/build/static/media/teacher6.06b6f465.png",
|
||||
"static/media/teacher7.4102dcc1.png": "/build/static/media/teacher7.4102dcc1.png",
|
||||
"static/media/teacher8.5d3f117e.png": "/build/static/media/teacher8.5d3f117e.png",
|
||||
"static/media/teacher9.69b0adae.png": "/build/static/media/teacher9.69b0adae.png",
|
||||
"static/media/team.698c787a.png": "/build/static/media/team.698c787a.png",
|
||||
"static/media/template.a2c140f8.png": "/build/static/media/template.a2c140f8.png",
|
||||
"static/media/title.132e93bf.png": "/build/static/media/title.132e93bf.png",
|
||||
"static/media/titleBk1.png": "/build/static/media/titleBk1.621db18f.png",
|
||||
"static/media/titleBk2.png": "/build/static/media/titleBk2.6c90b5af.png",
|
||||
"static/media/vipTitleBc.png": "/build/static/media/vipTitleBc.d8d8b0be.png",
|
||||
"static/media/vision-fw.png": "/build/static/media/vision-fw.feb9fd4c.png",
|
||||
"static/media/vision-jz.a991d471.png": "/build/static/media/vision-jz.a991d471.png",
|
||||
"static/media/vision-yj.8ca7b113.png": "/build/static/media/vision-yj.8ca7b113.png",
|
||||
"static/media/vision-zy.e4ac356e.png": "/build/static/media/vision-zy.e4ac356e.png",
|
||||
"static/media/vision0.c7dbea1d.png": "/build/static/media/vision0.c7dbea1d.png",
|
||||
"static/media/vision1.072e7be4.png": "/build/static/media/vision1.072e7be4.png",
|
||||
"static/media/vision2.024daa92.png": "/build/static/media/vision2.024daa92.png",
|
||||
"static/media/vision3.fee43e80.png": "/build/static/media/vision3.fee43e80.png",
|
||||
"static/media/xigongye.d51231d3.png": "/build/static/media/xigongye.d51231d3.png",
|
||||
"static/media/xiuos.67682257.png": "/build/static/media/xiuos.67682257.png",
|
||||
"static/media/xjy.6e62f4d6.png": "/build/static/media/xjy.6e62f4d6.png",
|
||||
"static/media/浙江大学.3c545e69.png": "/build/static/media/浙江大学.3c545e69.png",
|
||||
"ts.worker.js": "/build/ts.worker.js",
|
||||
"ts.worker.js.LICENSE.txt": "/build/ts.worker.js.LICENSE.txt"
|
||||
}
|
||||
|
|
@ -0,0 +1,239 @@
|
|||
/*******************************************************************************
|
||||
* KindEditor - WYSIWYG HTML Editor for Internet
|
||||
* Copyright (C) 2006-2011 kindsoft.net
|
||||
*
|
||||
* @author Roddy <luolonghao@gmail.com>
|
||||
* @site http://www.kindsoft.net/
|
||||
* @licence http://www.kindsoft.net/license.php
|
||||
*******************************************************************************/
|
||||
|
||||
KindEditor.lang({
|
||||
imagedirectupload:'本地图片',
|
||||
more: '切换到更多功能',
|
||||
less: '切换到简单功能',
|
||||
source : 'HTML代码',
|
||||
preview : '预览',
|
||||
undo : '后退(Ctrl+Z)',
|
||||
redo : '前进(Ctrl+Y)',
|
||||
cut : '剪切(Ctrl+X)',
|
||||
copy : '复制(Ctrl+C)',
|
||||
paste : '粘贴(Ctrl+V)',
|
||||
plainpaste : '粘贴为无格式文本',
|
||||
wordpaste : '从Word粘贴',
|
||||
selectall : '全选(Ctrl+A)',
|
||||
justifyleft : '左对齐',
|
||||
justifycenter : '居中',
|
||||
justifyright : '右对齐',
|
||||
justifyfull : '两端对齐',
|
||||
insertorderedlist : '编号',
|
||||
insertunorderedlist : '项目符号',
|
||||
indent : '增加缩进',
|
||||
outdent : '减少缩进',
|
||||
subscript : '下标',
|
||||
superscript : '上标',
|
||||
formatblock : '段落',
|
||||
fontname : '字体',
|
||||
fontsize : '文字大小',
|
||||
forecolor : '文字颜色',
|
||||
hilitecolor : '文字背景',
|
||||
bold : '粗体(Ctrl+B)',
|
||||
italic : '斜体(Ctrl+I)',
|
||||
underline : '下划线(Ctrl+U)',
|
||||
strikethrough : '删除线',
|
||||
removeformat : '删除格式',
|
||||
image : '图片',
|
||||
multiimage : '批量图片上传',
|
||||
flash : 'Flash',
|
||||
media : '视音频',
|
||||
table : '表格',
|
||||
tablecell : '单元格',
|
||||
hr : '插入横线',
|
||||
emoticons : '插入表情',
|
||||
link : '超级链接',
|
||||
unlink : '取消超级链接',
|
||||
fullscreen : '全屏显示',
|
||||
about : '关于',
|
||||
print : '打印(Ctrl+P)',
|
||||
filemanager : '文件空间',
|
||||
code : '插入程序代码',
|
||||
map : 'Google地图',
|
||||
baidumap : '百度地图',
|
||||
lineheight : '行距',
|
||||
clearhtml : '清理HTML代码',
|
||||
pagebreak : '插入分页符',
|
||||
quickformat : '一键排版',
|
||||
insertfile : '插入文件',
|
||||
template : '插入模板',
|
||||
anchor : '锚点',
|
||||
yes : '确定',
|
||||
no : '取消',
|
||||
close : '关闭',
|
||||
editImage : '图片属性',
|
||||
deleteImage : '删除图片',
|
||||
editFlash : 'Flash属性',
|
||||
deleteFlash : '删除Flash',
|
||||
editMedia : '视音频属性',
|
||||
deleteMedia : '删除视音频',
|
||||
editLink : '超级链接属性',
|
||||
deleteLink : '取消超级链接',
|
||||
editAnchor : '锚点属性',
|
||||
deleteAnchor : '删除锚点',
|
||||
tableprop : '表格属性',
|
||||
tablecellprop : '单元格属性',
|
||||
tableinsert : '插入表格',
|
||||
tabledelete : '删除表格',
|
||||
tablecolinsertleft : '左侧插入列',
|
||||
tablecolinsertright : '右侧插入列',
|
||||
tablerowinsertabove : '上方插入行',
|
||||
tablerowinsertbelow : '下方插入行',
|
||||
tablerowmerge : '向下合并单元格',
|
||||
tablecolmerge : '向右合并单元格',
|
||||
tablerowsplit : '拆分行',
|
||||
tablecolsplit : '拆分列',
|
||||
tablecoldelete : '删除列',
|
||||
tablerowdelete : '删除行',
|
||||
noColor : '无颜色',
|
||||
pleaseSelectFile : '请选择文件。',
|
||||
invalidImg : "请输入有效的URL地址。\n只允许jpg,gif,bmp,png格式。",
|
||||
invalidMedia : "请输入有效的URL地址。\n只允许swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。",
|
||||
invalidWidth : "宽度必须为数字。",
|
||||
invalidHeight : "高度必须为数字。",
|
||||
invalidBorder : "边框必须为数字。",
|
||||
invalidUrl : "请输入有效的URL地址。",
|
||||
invalidRows : '行数为必选项,只允许输入大于0的数字。',
|
||||
invalidCols : '列数为必选项,只允许输入大于0的数字。',
|
||||
invalidPadding : '边距必须为数字。',
|
||||
invalidSpacing : '间距必须为数字。',
|
||||
invalidJson : '服务器发生故障。',
|
||||
uploadSuccess : '上传成功。',
|
||||
cutError : '您的浏览器安全设置不允许使用剪切操作,请使用快捷键(Ctrl+X)来完成。',
|
||||
copyError : '您的浏览器安全设置不允许使用复制操作,请使用快捷键(Ctrl+C)来完成。',
|
||||
pasteError : '您的浏览器安全设置不允许使用粘贴操作,请使用快捷键(Ctrl+V)来完成。',
|
||||
ajaxLoading : '加载中,请稍候 ...',
|
||||
uploadLoading : '上传中,请稍候 ...',
|
||||
uploadError : '上传错误',
|
||||
'plainpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
|
||||
'wordpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。',
|
||||
'code.pleaseInput' : '请输入程序代码。',
|
||||
'link.url' : 'URL',
|
||||
'link.linkType' : '打开类型',
|
||||
'link.newWindow' : '新窗口',
|
||||
'link.selfWindow' : '当前窗口',
|
||||
'flash.url' : 'URL',
|
||||
'flash.width' : '宽度',
|
||||
'flash.height' : '高度',
|
||||
'flash.upload' : '上传',
|
||||
'flash.viewServer' : '文件空间',
|
||||
'media.url' : 'URL',
|
||||
'media.width' : '宽度',
|
||||
'media.height' : '高度',
|
||||
'media.autostart' : '自动播放',
|
||||
'media.upload' : '上传',
|
||||
'media.viewServer' : '文件空间',
|
||||
'image.remoteImage' : '网络图片',
|
||||
'image.localImage' : '本地上传',
|
||||
'image.remoteUrl' : '图片地址',
|
||||
'image.localUrl' : '上传文件',
|
||||
'image.size' : '图片大小',
|
||||
'image.width' : '宽',
|
||||
'image.height' : '高',
|
||||
'image.resetSize' : '重置大小',
|
||||
'image.align' : '对齐方式',
|
||||
'image.defaultAlign' : '默认方式',
|
||||
'image.leftAlign' : '左对齐',
|
||||
'image.rightAlign' : '右对齐',
|
||||
'image.imgTitle' : '图片说明',
|
||||
'image.upload' : '浏览...',
|
||||
'image.viewServer' : '图片空间',
|
||||
'multiimage.uploadDesc' : '允许用户同时上传<%=uploadLimit%>张图片,单张图片容量不超过<%=sizeLimit%>',
|
||||
'multiimage.startUpload' : '开始上传',
|
||||
'multiimage.clearAll' : '全部清空',
|
||||
'multiimage.insertAll' : '全部插入',
|
||||
'multiimage.queueLimitExceeded' : '文件数量超过限制。',
|
||||
'multiimage.fileExceedsSizeLimit' : '文件大小超过限制。',
|
||||
'multiimage.zeroByteFile' : '无法上传空文件。',
|
||||
'multiimage.invalidFiletype' : '文件类型不正确。',
|
||||
'multiimage.unknownError' : '发生异常,无法上传。',
|
||||
'multiimage.pending' : '等待上传',
|
||||
'multiimage.uploadError' : '上传失败',
|
||||
'filemanager.emptyFolder' : '空文件夹',
|
||||
'filemanager.moveup' : '移到上一级文件夹',
|
||||
'filemanager.viewType' : '显示方式:',
|
||||
'filemanager.viewImage' : '缩略图',
|
||||
'filemanager.listImage' : '详细信息',
|
||||
'filemanager.orderType' : '排序方式:',
|
||||
'filemanager.fileName' : '名称',
|
||||
'filemanager.fileSize' : '大小',
|
||||
'filemanager.fileType' : '类型',
|
||||
'insertfile.url' : 'URL',
|
||||
'insertfile.title' : '文件说明',
|
||||
'insertfile.upload' : '上传',
|
||||
'insertfile.viewServer' : '文件空间',
|
||||
'table.cells' : '单元格数',
|
||||
'table.rows' : '行数',
|
||||
'table.cols' : '列数',
|
||||
'table.size' : '大小',
|
||||
'table.width' : '宽度',
|
||||
'table.height' : '高度',
|
||||
'table.percent' : '%',
|
||||
'table.px' : 'px',
|
||||
'table.space' : '边距间距',
|
||||
'table.padding' : '边距',
|
||||
'table.spacing' : '间距',
|
||||
'table.align' : '对齐方式',
|
||||
'table.textAlign' : '水平对齐',
|
||||
'table.verticalAlign' : '垂直对齐',
|
||||
'table.alignDefault' : '默认',
|
||||
'table.alignLeft' : '左对齐',
|
||||
'table.alignCenter' : '居中',
|
||||
'table.alignRight' : '右对齐',
|
||||
'table.alignTop' : '顶部',
|
||||
'table.alignMiddle' : '中部',
|
||||
'table.alignBottom' : '底部',
|
||||
'table.alignBaseline' : '基线',
|
||||
'table.border' : '边框',
|
||||
'table.borderWidth' : '边框',
|
||||
'table.borderColor' : '颜色',
|
||||
'table.backgroundColor' : '背景颜色',
|
||||
'map.address' : '地址: ',
|
||||
'map.search' : '搜索',
|
||||
'baidumap.address' : '地址: ',
|
||||
'baidumap.search' : '搜索',
|
||||
'baidumap.insertDynamicMap' : '插入动态地图',
|
||||
'anchor.name' : '锚点名称',
|
||||
'formatblock.formatBlock' : {
|
||||
h1 : '标题 1',
|
||||
h2 : '标题 2',
|
||||
h3 : '标题 3',
|
||||
h4 : '标题 4',
|
||||
p : '正 文'
|
||||
},
|
||||
'fontname.fontName' : {
|
||||
'SimSun' : '宋体',
|
||||
'NSimSun' : '新宋体',
|
||||
'FangSong_GB2312' : '仿宋_GB2312',
|
||||
'KaiTi_GB2312' : '楷体_GB2312',
|
||||
'SimHei' : '黑体',
|
||||
'Microsoft YaHei' : '微软雅黑',
|
||||
'Arial' : 'Arial',
|
||||
'Arial Black' : 'Arial Black',
|
||||
'Times New Roman' : 'Times New Roman',
|
||||
'Courier New' : 'Courier New',
|
||||
'Tahoma' : 'Tahoma',
|
||||
'Verdana' : 'Verdana'
|
||||
},
|
||||
'lineheight.lineHeight' : [
|
||||
{'1' : '单倍行距'},
|
||||
{'1.5' : '1.5倍行距'},
|
||||
{'2' : '2倍行距'},
|
||||
{'2.5' : '2.5倍行距'},
|
||||
{'3' : '3倍行距'}
|
||||
],
|
||||
'template.selectTemplate' : '可选模板',
|
||||
'template.replaceContent' : '替换当前内容',
|
||||
'template.fileList' : {
|
||||
'1.html' : '图片和文字',
|
||||
'2.html' : '表格',
|
||||
'3.html' : '项目编号'
|
||||
}
|
||||
}, 'zh_CN');
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*******************************************************************************
|
||||
* KindEditor - WYSIWYG HTML Editor for Internet
|
||||
* Copyright (C) 2006-2011 kindsoft.net
|
||||
*
|
||||
* @author Roddy <luolonghao@gmail.com>
|
||||
* @site http://www.kindsoft.net/
|
||||
* @licence http://www.kindsoft.net/license.php
|
||||
*******************************************************************************/
|
||||
|
||||
KindEditor.plugin('autoheight', function(K) {
|
||||
var self = this;
|
||||
//self.autoHeightMode = true;
|
||||
if (!self.autoHeightMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
var minHeight;
|
||||
|
||||
function hideScroll() {
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
body.style.overflowY = 'hidden';
|
||||
}
|
||||
|
||||
function resetHeight() {
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
|
||||
//最高418 超过用滚动条
|
||||
self.resize(null, Math.max(
|
||||
(K.IE ? body.scrollHeight : body.offsetHeight) > 385 ? 385+33 : (K.IE ? body.scrollHeight : body.offsetHeight)
|
||||
+ 33, minHeight));
|
||||
|
||||
if( self.height == "418px" ){
|
||||
edit.iframe[0].scroll = 'yes';
|
||||
body.style.overflowY = 'auto';
|
||||
}
|
||||
else{
|
||||
hideScroll();
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
minHeight = K.removeUnit(self.height);
|
||||
|
||||
self.edit.afterChange(resetHeight);
|
||||
hideScroll();
|
||||
var edit = self.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
self.resize(null, Math.max(
|
||||
((K.IE ? body.scrollHeight : body.offsetHeight) > 250 ? 250 : (K.IE ? body.scrollHeight : body.offsetHeight)) //限制初始化太高的情况
|
||||
+ 33, minHeight));
|
||||
}
|
||||
|
||||
if (self.isCreated) {
|
||||
init();
|
||||
} else {
|
||||
self.afterCreate(init);
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* 如何实现真正的自动高度?
|
||||
* 修改编辑器高度之后,再次获取body内容高度时,最小值只会是当前iframe的设置高度,这样就导致高度只增不减。
|
||||
* 所以每次获取body内容高度之前,先将iframe的高度重置为最小高度,这样就能获取body的实际高度。
|
||||
* 由此就实现了真正的自动高度
|
||||
* 测试:chrome、firefox、IE9、IE8
|
||||
* */
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
.ke-content {
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
||||
.ke-content pre {
|
||||
font-size:9pt;
|
||||
font-family:Courier New,Arial;
|
||||
border:1px solid #ddd;
|
||||
border-left:5px solid #6CE26C;
|
||||
background:#f6f6f6;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.ke-content code {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
white-space: nowrap;
|
||||
border: 1px solid #DDD;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.ke-content pre>code {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ke-content pre code {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ke-content p {
|
||||
/*margin: 0 0 15px 0;*/
|
||||
/*margin-bottom:15pt;*/
|
||||
line-height:1.5;
|
||||
/*letter-spacing: 1px;*/
|
||||
}
|
||||
|
||||
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
|
||||
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
|
||||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||
|
||||
|
||||
.ke-content blockquote{background: none;border: none;padding: 0px;margin: 0 0 0 40px;}
|
||||
span.at {color:#269ac9;}
|
||||
span.at a{color:#269ac9;text-decoration: none;}
|
||||
|
||||
/*yk*/
|
||||
.ke-content ol li{list-style-type: decimal;}
|
||||
.ke-content ul li{list-style-type: disc;}
|
||||
.ke-content ol,.ke-content ul,.ke-content h1,.ke-content h2,.ke-content h3,.ke-content h4{margin-top:0;margin-bottom: 0;}
|
||||
.ke-content a{color: #136ec2;}
|
||||
.ke-content a:link,.ke-content a:visited{text-decoration:none;}
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
// Generated by CoffeeScript 1.9.0
|
||||
|
||||
/*
|
||||
paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks.
|
||||
https://github.com/layerssss/paste.js
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var $, Paste, createHiddenEditable, dataURLtoBlob;
|
||||
|
||||
$ = window.jQuery;
|
||||
|
||||
$.paste = function(pasteContainer) {
|
||||
var pm;
|
||||
if (typeof console !== "undefined" && console !== null) {
|
||||
console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead.");
|
||||
}
|
||||
pm = Paste.mountNonInputable(pasteContainer);
|
||||
return pm._container;
|
||||
};
|
||||
|
||||
$.fn.pastableNonInputable = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountNonInputable(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.pastableTextarea = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountTextarea(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.pastableContenteditable = function() {
|
||||
var el, _i, _len;
|
||||
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
||||
el = this[_i];
|
||||
Paste.mountContenteditable(el);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
dataURLtoBlob = function(dataURL, sliceSize) {
|
||||
var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, slice, _ref;
|
||||
if (sliceSize == null) {
|
||||
sliceSize = 512;
|
||||
}
|
||||
if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) {
|
||||
return null;
|
||||
}
|
||||
_ref = m, m = _ref[0], contentType = _ref[1], b64Data = _ref[2];
|
||||
byteCharacters = atob(b64Data);
|
||||
byteArrays = [];
|
||||
offset = 0;
|
||||
while (offset < byteCharacters.length) {
|
||||
slice = byteCharacters.slice(offset, offset + sliceSize);
|
||||
byteNumbers = new Array(slice.length);
|
||||
i = 0;
|
||||
while (i < slice.length) {
|
||||
byteNumbers[i] = slice.charCodeAt(i);
|
||||
i++;
|
||||
}
|
||||
byteArray = new Uint8Array(byteNumbers);
|
||||
byteArrays.push(byteArray);
|
||||
offset += sliceSize;
|
||||
}
|
||||
return new Blob(byteArrays, {
|
||||
type: contentType
|
||||
});
|
||||
};
|
||||
|
||||
createHiddenEditable = function() {
|
||||
return $(document.createElement('div')).attr('contenteditable', true).css({
|
||||
width: 1,
|
||||
height: 1,
|
||||
position: 'fixed',
|
||||
left: -100,
|
||||
overflow: 'hidden'
|
||||
});
|
||||
};
|
||||
|
||||
Paste = (function() {
|
||||
Paste.prototype._target = null;
|
||||
|
||||
Paste.prototype._container = null;
|
||||
|
||||
Paste.mountNonInputable = function(nonInputable) {
|
||||
var paste;
|
||||
paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable);
|
||||
$(nonInputable).on('click', (function(_this) {
|
||||
return function() {
|
||||
return paste._container.focus();
|
||||
};
|
||||
})(this));
|
||||
paste._container.on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(nonInputable).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return paste._container.on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(nonInputable).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Paste.mountTextarea = function(textarea) {
|
||||
var ctlDown, paste;
|
||||
if (-1 !== navigator.userAgent.toLowerCase().indexOf('chrome')) {
|
||||
return this.mountContenteditable(textarea);
|
||||
}
|
||||
paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea);
|
||||
ctlDown = false;
|
||||
$(textarea).on('keyup', function(ev) {
|
||||
var _ref;
|
||||
if ((_ref = ev.keyCode) === 17 || _ref === 224) {
|
||||
return ctlDown = false;
|
||||
}
|
||||
});
|
||||
$(textarea).on('keydown', function(ev) {
|
||||
var _ref;
|
||||
if ((_ref = ev.keyCode) === 17 || _ref === 224) {
|
||||
ctlDown = true;
|
||||
}
|
||||
if (ctlDown && ev.keyCode === 86) {
|
||||
return paste._container.focus();
|
||||
}
|
||||
});
|
||||
$(paste._target).on('pasteImage', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).focus();
|
||||
};
|
||||
})(this));
|
||||
$(paste._target).on('pasteText', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).focus();
|
||||
};
|
||||
})(this));
|
||||
$(textarea).on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return $(textarea).on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(textarea).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Paste.mountContenteditable = function(contenteditable) {
|
||||
var paste;
|
||||
paste = new Paste(contenteditable, contenteditable);
|
||||
$(contenteditable).on('focus', (function(_this) {
|
||||
return function() {
|
||||
return $(contenteditable).addClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
return $(contenteditable).on('blur', (function(_this) {
|
||||
return function() {
|
||||
return $(contenteditable).removeClass('pastable-focus');
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
function Paste(_at__container, _at__target) {
|
||||
this._container = _at__container;
|
||||
this._target = _at__target;
|
||||
this._container = $(this._container);
|
||||
this._target = $(this._target).addClass('pastable');
|
||||
this._container.on('paste', (function(_this) {
|
||||
return function(ev) {
|
||||
var clipboardData, file, item, reader, text, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _results;
|
||||
if (((_ref = ev.originalEvent) != null ? _ref.clipboardData : void 0) != null) {
|
||||
clipboardData = ev.originalEvent.clipboardData;
|
||||
if (clipboardData.items) {
|
||||
_ref1 = clipboardData.items;
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
item = _ref1[_i];
|
||||
if (item.type.match(/^image\//)) {
|
||||
reader = new FileReader();
|
||||
reader.onload = function(event) {
|
||||
return _this._handleImage(event.target.result);
|
||||
};
|
||||
reader.readAsDataURL(item.getAsFile());
|
||||
}
|
||||
if (item.type === 'text/plain') {
|
||||
item.getAsString(function(string) {
|
||||
return _this._target.trigger('pasteText', {
|
||||
text: string
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) {
|
||||
text = clipboardData.getData('Text');
|
||||
_this._target.trigger('pasteText', {
|
||||
text: text
|
||||
});
|
||||
}
|
||||
_this._checkImagesInContainer(function(src) {
|
||||
return _this._handleImage(src);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (clipboardData = window.clipboardData) {
|
||||
if ((_ref2 = (text = clipboardData.getData('Text'))) != null ? _ref2.length : void 0) {
|
||||
return _this._target.trigger('pasteText', {
|
||||
text: text
|
||||
});
|
||||
} else {
|
||||
_ref3 = clipboardData.files;
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
|
||||
file = _ref3[_j];
|
||||
_this._handleImage(URL.createObjectURL(file));
|
||||
_results.push(_this._checkImagesInContainer(function() {}));
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
|
||||
Paste.prototype._handleImage = function(src) {
|
||||
var loader;
|
||||
loader = new Image();
|
||||
loader.onload = (function(_this) {
|
||||
return function() {
|
||||
var blob, canvas, ctx, dataURL;
|
||||
canvas = document.createElement('canvas');
|
||||
canvas.width = loader.width;
|
||||
canvas.height = loader.height;
|
||||
ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(loader, 0, 0, canvas.width, canvas.height);
|
||||
dataURL = null;
|
||||
try {
|
||||
dataURL = canvas.toDataURL('image/png');
|
||||
blob = dataURLtoBlob(dataURL);
|
||||
} catch (_error) {}
|
||||
if (dataURL) {
|
||||
return _this._target.trigger('pasteImage', {
|
||||
blob: blob,
|
||||
dataURL: dataURL,
|
||||
width: loader.width,
|
||||
height: loader.height
|
||||
});
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
return loader.src = src;
|
||||
};
|
||||
|
||||
Paste.prototype._checkImagesInContainer = function(cb) {
|
||||
var img, timespan, _i, _len, _ref;
|
||||
timespan = Math.floor(1000 * Math.random());
|
||||
_ref = this._container.find('img');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
img = _ref[_i];
|
||||
img["_paste_marked_" + timespan] = true;
|
||||
}
|
||||
return setTimeout((function(_this) {
|
||||
return function() {
|
||||
var _j, _len1, _ref1, _results;
|
||||
_ref1 = _this._container.find('img');
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
img = _ref1[_j];
|
||||
if (!img["_paste_marked_" + timespan]) {
|
||||
cb(img.src);
|
||||
}
|
||||
//firefox问题处理,因为采用了 pastableContenteditable 模式,故只需要删除默认的粘贴
|
||||
if ($(img).attr('src').startsWith('data:image/')) {
|
||||
_results.push($(img).remove());
|
||||
};
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
})(this), 1);
|
||||
};
|
||||
|
||||
return Paste;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
|
||||
KindEditor.plugin('paste', function(K) {
|
||||
var editor = this,
|
||||
name = 'paste';
|
||||
if(editor.edit == undefined || editor.edit.iframe == undefined){
|
||||
return;
|
||||
}
|
||||
var contentWindow = editor.edit.iframe[0].contentWindow;
|
||||
//var contentWindow = editor.iframeDoc;
|
||||
//var contentWindow = document.getElementsByTagName('iframe')[0].contentWindow;
|
||||
var nodeBody = contentWindow.document.getElementsByTagName('body')[0];
|
||||
console.log(nodeBody);
|
||||
$(nodeBody).pastableContenteditable();
|
||||
|
||||
dataURItoBlob = function(dataURI) {
|
||||
// convert base64/URLEncoded data component to raw binary data held in a string
|
||||
var byteString;
|
||||
if (dataURI.split(',')[0].indexOf('base64') >= 0)
|
||||
byteString = atob(dataURI.split(',')[1]);
|
||||
else
|
||||
byteString = unescape(dataURI.split(',')[1]);
|
||||
|
||||
// separate out the mime component
|
||||
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
|
||||
|
||||
// write the bytes of the string to a typed array
|
||||
var ia = new Uint8Array(byteString.length);
|
||||
for (var i = 0; i < byteString.length; i++) {
|
||||
ia[i] = byteString.charCodeAt(i);
|
||||
}
|
||||
|
||||
return new Blob([ia], {type:mimeString});
|
||||
};
|
||||
|
||||
$(nodeBody).on('pasteImage', function(ev, data) {
|
||||
console.log('pasteImage');
|
||||
console.log("dataURL: " + data.dataURL);
|
||||
console.log("width: " + data.width);
|
||||
console.log("height: " + data.height);
|
||||
var blob = dataURItoBlob(data.dataURL);
|
||||
if (data.blob !== null) {
|
||||
var data = new FormData();
|
||||
// data.append("imgFile",blob, "imageFilename.png");
|
||||
data.append("file",blob, "imageFilename.png");
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
url: '/kindeditor/upload?dir=image',
|
||||
url: '/api/attachments.json',
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
data: data,
|
||||
processData: false,
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
// editor.exec('insertimage', JSON.parse(data).url);
|
||||
|
||||
// /api/attachments/227362
|
||||
editor.exec('insertimage', '/api/attachments/' + data.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
return;
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
@font-face {
|
||||
font-family: "iconfont-color"; /* Project id 5169666 */
|
||||
/* Color fonts */
|
||||
src:
|
||||
url('iconfont.woff2?t=1780903107408') format('woff2'),
|
||||
url('iconfont.woff?t=1780903107408') format('woff'),
|
||||
url('iconfont.ttf?t=1780903107408') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont-color {
|
||||
font-family: "iconfont-color" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-colorzuojiantou:before {
|
||||
content: "\e6d4";
|
||||
}
|
||||
|
||||
.icon-coloryoujiantou:before {
|
||||
content: "\e6d5";
|
||||
}
|
||||
|
||||
.icon-colorqita:before {
|
||||
content: "\e7b3";
|
||||
}
|
||||
|
||||
.icon-coloryidongkaifa:before {
|
||||
content: "\e7b4";
|
||||
}
|
||||
|
||||
.icon-colordaimazhijian:before {
|
||||
content: "\e7b5";
|
||||
}
|
||||
|
||||
.icon-coloryunxiaogongju:before {
|
||||
content: "\e7b6";
|
||||
}
|
||||
|
||||
.icon-coloryouxiyule:before {
|
||||
content: "\e7b7";
|
||||
}
|
||||
|
||||
.icon-colorskill:before {
|
||||
content: "\e7b0";
|
||||
}
|
||||
|
||||
.icon-colorshujuji:before {
|
||||
content: "\e7b1";
|
||||
}
|
||||
|
||||
.icon-colordaimaku1:before {
|
||||
content: "\e7b2";
|
||||
}
|
||||
|
||||
.icon-colormoxingku:before {
|
||||
content: "\e7af";
|
||||
}
|
||||
|
||||
.icon-coloryinpin:before {
|
||||
content: "\e7ad";
|
||||
}
|
||||
|
||||
.icon-colorremenmoxing-1:before {
|
||||
content: "\e7a3";
|
||||
}
|
||||
|
||||
.icon-colorkexueyanjiuhejishufuwuye:before {
|
||||
content: "\e7ae";
|
||||
}
|
||||
|
||||
.icon-colora-zu18210:before {
|
||||
content: "\e7a6";
|
||||
}
|
||||
|
||||
.icon-colora-zu18240:before {
|
||||
content: "\e7a5";
|
||||
}
|
||||
|
||||
.icon-colora-zuixin1:before {
|
||||
content: "\e7a7";
|
||||
}
|
||||
|
||||
.icon-colorziranyuyanchuli:before {
|
||||
content: "\e7a8";
|
||||
}
|
||||
|
||||
.icon-colorshichangtuiguang-01:before {
|
||||
content: "\e7a4";
|
||||
}
|
||||
|
||||
.icon-coloryuyin:before {
|
||||
content: "\e7a9";
|
||||
}
|
||||
|
||||
.icon-colortuxiang:before {
|
||||
content: "\e7aa";
|
||||
}
|
||||
|
||||
.icon-colora-zu18213:before {
|
||||
content: "\e7ab";
|
||||
}
|
||||
|
||||
.icon-colorshipinbofang:before {
|
||||
content: "\e7ac";
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
{
|
||||
"id": "5169666",
|
||||
"name": "newForge-color",
|
||||
"font_family": "iconfont-color",
|
||||
"css_prefix_text": "icon-color",
|
||||
"description": "gitlink/红山开源 带颜色的icon",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "47799227",
|
||||
"name": "左箭头",
|
||||
"font_class": "zuojiantou",
|
||||
"unicode": "e6d4",
|
||||
"unicode_decimal": 59092
|
||||
},
|
||||
{
|
||||
"icon_id": "47799226",
|
||||
"name": "右箭头",
|
||||
"font_class": "youjiantou",
|
||||
"unicode": "e6d5",
|
||||
"unicode_decimal": 59093
|
||||
},
|
||||
{
|
||||
"icon_id": "47487873",
|
||||
"name": "其他",
|
||||
"font_class": "qita",
|
||||
"unicode": "e7b3",
|
||||
"unicode_decimal": 59315
|
||||
},
|
||||
{
|
||||
"icon_id": "47487872",
|
||||
"name": "移动开发",
|
||||
"font_class": "yidongkaifa",
|
||||
"unicode": "e7b4",
|
||||
"unicode_decimal": 59316
|
||||
},
|
||||
{
|
||||
"icon_id": "47487870",
|
||||
"name": "代码质检",
|
||||
"font_class": "daimazhijian",
|
||||
"unicode": "e7b5",
|
||||
"unicode_decimal": 59317
|
||||
},
|
||||
{
|
||||
"icon_id": "47487871",
|
||||
"name": "云效工具",
|
||||
"font_class": "yunxiaogongju",
|
||||
"unicode": "e7b6",
|
||||
"unicode_decimal": 59318
|
||||
},
|
||||
{
|
||||
"icon_id": "47487869",
|
||||
"name": "游戏娱乐",
|
||||
"font_class": "youxiyule",
|
||||
"unicode": "e7b7",
|
||||
"unicode_decimal": 59319
|
||||
},
|
||||
{
|
||||
"icon_id": "47487614",
|
||||
"name": "skill",
|
||||
"font_class": "skill",
|
||||
"unicode": "e7b0",
|
||||
"unicode_decimal": 59312
|
||||
},
|
||||
{
|
||||
"icon_id": "47487615",
|
||||
"name": "数据集",
|
||||
"font_class": "shujuji",
|
||||
"unicode": "e7b1",
|
||||
"unicode_decimal": 59313
|
||||
},
|
||||
{
|
||||
"icon_id": "47487613",
|
||||
"name": "代码库",
|
||||
"font_class": "daimaku1",
|
||||
"unicode": "e7b2",
|
||||
"unicode_decimal": 59314
|
||||
},
|
||||
{
|
||||
"icon_id": "47487578",
|
||||
"name": "模型库",
|
||||
"font_class": "moxingku",
|
||||
"unicode": "e7af",
|
||||
"unicode_decimal": 59311
|
||||
},
|
||||
{
|
||||
"icon_id": "47470053",
|
||||
"name": "音频",
|
||||
"font_class": "yinpin",
|
||||
"unicode": "e7ad",
|
||||
"unicode_decimal": 59309
|
||||
},
|
||||
{
|
||||
"icon_id": "47470038",
|
||||
"name": "热门模型-1",
|
||||
"font_class": "remenmoxing-1",
|
||||
"unicode": "e7a3",
|
||||
"unicode_decimal": 59299
|
||||
},
|
||||
{
|
||||
"icon_id": "47470036",
|
||||
"name": "科学研究和技术服务业",
|
||||
"font_class": "kexueyanjiuhejishufuwuye",
|
||||
"unicode": "e7ae",
|
||||
"unicode_decimal": 59310
|
||||
},
|
||||
{
|
||||
"icon_id": "47470068",
|
||||
"name": "组 18210",
|
||||
"font_class": "a-zu18210",
|
||||
"unicode": "e7a6",
|
||||
"unicode_decimal": 59302
|
||||
},
|
||||
{
|
||||
"icon_id": "47470067",
|
||||
"name": "组 18240",
|
||||
"font_class": "a-zu18240",
|
||||
"unicode": "e7a5",
|
||||
"unicode_decimal": 59301
|
||||
},
|
||||
{
|
||||
"icon_id": "47470066",
|
||||
"name": "最新 (1)",
|
||||
"font_class": "a-zuixin1",
|
||||
"unicode": "e7a7",
|
||||
"unicode_decimal": 59303
|
||||
},
|
||||
{
|
||||
"icon_id": "47470060",
|
||||
"name": "自然语言处理",
|
||||
"font_class": "ziranyuyanchuli",
|
||||
"unicode": "e7a8",
|
||||
"unicode_decimal": 59304
|
||||
},
|
||||
{
|
||||
"icon_id": "47470052",
|
||||
"name": "市场推广-01",
|
||||
"font_class": "shichangtuiguang-01",
|
||||
"unicode": "e7a4",
|
||||
"unicode_decimal": 59300
|
||||
},
|
||||
{
|
||||
"icon_id": "47470056",
|
||||
"name": "语音",
|
||||
"font_class": "yuyin",
|
||||
"unicode": "e7a9",
|
||||
"unicode_decimal": 59305
|
||||
},
|
||||
{
|
||||
"icon_id": "47470055",
|
||||
"name": "图像",
|
||||
"font_class": "tuxiang",
|
||||
"unicode": "e7aa",
|
||||
"unicode_decimal": 59306
|
||||
},
|
||||
{
|
||||
"icon_id": "47470057",
|
||||
"name": "组 18213",
|
||||
"font_class": "a-zu18213",
|
||||
"unicode": "e7ab",
|
||||
"unicode_decimal": 59307
|
||||
},
|
||||
{
|
||||
"icon_id": "47470047",
|
||||
"name": "视频播放",
|
||||
"font_class": "shipinbofang",
|
||||
"unicode": "e7ac",
|
||||
"unicode_decimal": 59308
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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; }
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 434 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
|
@ -0,0 +1 @@
|
|||
<!doctype html><html lang="zh-hans-CN" class="notranslate translated-ltr" translate="no"><head><title>GitLink | 新一代开源创新服务平台</title><meta charset="utf-8"><meta name="Keywords" content="GitLink, git, 开源, 代码托管, 项目管理, 版本控制, 代码分享, 项目协作, 协同开发平台"><meta name="description" content="GitLink 是一个新一代的开源创新服务平台,提供分布式协作开发、流水线运维、代码分析等功能,基于 Git 打造分布式代码托管环境。"><meta property="og:title" content="GitLink | 确实开源"/><meta property="og:type" content="website"/><meta property="og:url" content="https://gitlink.org.cn/"/><meta property="og:image" content="https://www.gitlink.org.cn/images/logo.png"/><meta property="og:image:alt" content="GitLink | 确实开源"/><meta property="og:site_name" content="GitLink"/><meta property="og:description" content="GitLink 是一个新一代的开源创新服务平台,提供分布式协作开发、流水线运维、代码分析等功能,基于 Git 打造分布式代码托管环境。"/><meta name="hostname" content="gitlink.org.cn"><meta name="keyboard-shortcuts-preference" content="all"><meta name="expected-hostname" content="gitlink.org.cn"><meta name="go-import" content="gitlink.org.cn git https://gitlink.org.cn"><meta name="octolytics-dimension-user_login" content="GitLink"><meta name="octolytics-dimension-repository_nwo" content="GitLink"><meta name="octolytics-dimension-repository_network_root_nwo" content="GitLink"><meta name="theme-color" content="#000000"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><meta name="google-site-verification" content="rGWc47_e6dmJlLtT6ngl3WSiXMsY8FCcll2dbdlNHm0"/><meta name="viewport" content=""><link rel="canonical" href="https://gitlink.org.cn" data-turbo-transient=""><link rel="fluid-icon" href="https://www.gitlink.org.cn/images/logo.png" title="GitLink"><link rel="manifest" href="/build//manifest.json"><link rel="stylesheet" href="/build/css/alex/alex.all.global.min.css"><link rel="stylesheet" href="/build/css/iconfont.css"><link rel="stylesheet" href="/build/css/iconfont-color/iconfont.css"><link rel="stylesheet" href="/build/css/editormd.min.css"><link rel="stylesheet" href="/build/css/gitlink.min.css"><link href="/build/static/css/main.7f9d9f47.chunk.css" rel="stylesheet"></head><body><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit widthunit"></div><div id="picture_display" style="display:none"></div><script src="https://gw.alipayobjects.com/os/lib/react/16.14.0/umd/react.production.min.js"></script><script src="https://gw.alipayobjects.com/os/lib/react-dom/16.14.0/umd/react-dom.production.min.js"></script><script src="/build/js/jquery-1.8.3.min.js"></script><script src="/build/js/js_min_all.js"></script><script src="/build/js/codemirror/codemirror.js"></script><script src="/build/js/editormd/editormd.min.js"></script><script src="/build/js/codemirror/merge/merge.js"></script><script src="/build/js/alex/moment.js"></script><script src="https://gw.alipayobjects.com/os/lib/alipay/alex/2.0.19/bundle/alex.all.global.min.js"></script><script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script><script src="/build/js/editormd/mermaid.min.js"></script><script src="/build/./static/js/runtime~main.b9181bd0.js"></script><script src="/build/./static/js/main.219e5735.chunk.js"></script><script>var _hmt=_hmt||[];!function(){var t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?7e2def1fe918f15f9f1c5c061f69b256";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(),window.onload=function(){$(".newContainer").delegate("a.anchors","click",(function(){let t=$(this).offset().top-180;return $("html,body").animate({scrollTop:t},10),window.location.hash=$(this).attr("name"),!1}))}</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>
|
||||
|
|
@ -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);
|
||||
});
|
||||
|
|
@ -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; }
|
||||
|
|
@ -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,427 @@
|
|||
//需求:表情栏可以隐藏显示,高度只要一点高
|
||||
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;
|
||||
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");
|
||||
}
|
||||
|
|
@ -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}
|
||||
|
|
@ -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;})();
|
||||
|
|
@ -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)}));
|
||||
|
|
@ -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 () {
|
||||
|
||||
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
|
||||