diff --git a/asset-manifest.json b/asset-manifest.json index f376005fe..bffc816f0 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,261 +1,475 @@ { - "./static/js/0.15abc98e.chunk.js": "/react/build/./static/js/0.15abc98e.chunk.js", - "static/css/1.50ff7122.chunk.css": "/react/build/static/css/1.50ff7122.chunk.css", - "./static/js/1.0d5f334b.chunk.js": "/react/build/./static/js/1.0d5f334b.chunk.js", - "static/css/2.8fcaeca1.chunk.css": "/react/build/static/css/2.8fcaeca1.chunk.css", - "./static/js/2.062749b7.chunk.js": "/react/build/./static/js/2.062749b7.chunk.js", - "./static/js/3.70a574e9.chunk.js": "/react/build/./static/js/3.70a574e9.chunk.js", - "static/css/4.60ec5609.chunk.css": "/react/build/static/css/4.60ec5609.chunk.css", - "./static/js/4.b7d37df8.chunk.js": "/react/build/./static/js/4.b7d37df8.chunk.js", - "static/css/5.5d2538f7.chunk.css": "/react/build/static/css/5.5d2538f7.chunk.css", - "./static/js/5.20bbf8bd.chunk.js": "/react/build/./static/js/5.20bbf8bd.chunk.js", - "static/css/6.51798ac5.chunk.css": "/react/build/static/css/6.51798ac5.chunk.css", - "./static/js/6.891fd9ea.chunk.js": "/react/build/./static/js/6.891fd9ea.chunk.js", - "static/css/7.73559298.chunk.css": "/react/build/static/css/7.73559298.chunk.css", - "./static/js/7.dc81aa0f.chunk.js": "/react/build/./static/js/7.dc81aa0f.chunk.js", - "static/css/8.f89d762e.chunk.css": "/react/build/static/css/8.f89d762e.chunk.css", - "./static/js/8.4630ac89.chunk.js": "/react/build/./static/js/8.4630ac89.chunk.js", - "./static/js/9.bb5e144d.chunk.js": "/react/build/./static/js/9.bb5e144d.chunk.js", - "static/css/10.58c2bda0.chunk.css": "/react/build/static/css/10.58c2bda0.chunk.css", - "./static/js/10.8130decd.chunk.js": "/react/build/./static/js/10.8130decd.chunk.js", - "static/css/11.f2db3685.chunk.css": "/react/build/static/css/11.f2db3685.chunk.css", - "./static/js/11.46691a1a.chunk.js": "/react/build/./static/js/11.46691a1a.chunk.js", - "static/css/12.fac0c3b4.chunk.css": "/react/build/static/css/12.fac0c3b4.chunk.css", - "./static/js/12.8f642746.chunk.js": "/react/build/./static/js/12.8f642746.chunk.js", - "static/css/13.620a5b46.chunk.css": "/react/build/static/css/13.620a5b46.chunk.css", - "./static/js/13.07fd8ad9.chunk.js": "/react/build/./static/js/13.07fd8ad9.chunk.js", - "static/css/14.971b56a9.chunk.css": "/react/build/static/css/14.971b56a9.chunk.css", - "./static/js/14.05538681.chunk.js": "/react/build/./static/js/14.05538681.chunk.js", - "static/css/15.f1c6115d.chunk.css": "/react/build/static/css/15.f1c6115d.chunk.css", - "./static/js/15.4566fc09.chunk.js": "/react/build/./static/js/15.4566fc09.chunk.js", - "./static/js/16.293cb2ae.chunk.js": "/react/build/./static/js/16.293cb2ae.chunk.js", - "static/css/17.b5cf2868.chunk.css": "/react/build/static/css/17.b5cf2868.chunk.css", - "./static/js/17.854efcf9.chunk.js": "/react/build/./static/js/17.854efcf9.chunk.js", - "static/css/18.71185f3e.chunk.css": "/react/build/static/css/18.71185f3e.chunk.css", - "./static/js/18.e4fe6795.chunk.js": "/react/build/./static/js/18.e4fe6795.chunk.js", - "static/css/19.0117fb9f.chunk.css": "/react/build/static/css/19.0117fb9f.chunk.css", - "./static/js/19.e76b4f2f.chunk.js": "/react/build/./static/js/19.e76b4f2f.chunk.js", - "static/css/20.09129764.chunk.css": "/react/build/static/css/20.09129764.chunk.css", - "./static/js/20.e12464a9.chunk.js": "/react/build/./static/js/20.e12464a9.chunk.js", - "static/css/21.c4194926.chunk.css": "/react/build/static/css/21.c4194926.chunk.css", - "./static/js/21.ce8f918c.chunk.js": "/react/build/./static/js/21.ce8f918c.chunk.js", - "static/css/22.5e0791f6.chunk.css": "/react/build/static/css/22.5e0791f6.chunk.css", - "./static/js/22.b67125c4.chunk.js": "/react/build/./static/js/22.b67125c4.chunk.js", - "static/css/23.8c8461b9.chunk.css": "/react/build/static/css/23.8c8461b9.chunk.css", - "./static/js/23.880f8ed1.chunk.js": "/react/build/./static/js/23.880f8ed1.chunk.js", - "static/css/24.1c02166c.chunk.css": "/react/build/static/css/24.1c02166c.chunk.css", - "./static/js/24.bd6b8e5b.chunk.js": "/react/build/./static/js/24.bd6b8e5b.chunk.js", - "static/css/25.a9c91e0d.chunk.css": "/react/build/static/css/25.a9c91e0d.chunk.css", - "./static/js/25.25e73f97.chunk.js": "/react/build/./static/js/25.25e73f97.chunk.js", - "static/css/26.ccb22271.chunk.css": "/react/build/static/css/26.ccb22271.chunk.css", - "./static/js/26.51b2a14e.chunk.js": "/react/build/./static/js/26.51b2a14e.chunk.js", - "static/css/27.98309187.chunk.css": "/react/build/static/css/27.98309187.chunk.css", - "./static/js/27.4f50c382.chunk.js": "/react/build/./static/js/27.4f50c382.chunk.js", - "static/css/28.5a296074.chunk.css": "/react/build/static/css/28.5a296074.chunk.css", - "./static/js/28.c5cd468d.chunk.js": "/react/build/./static/js/28.c5cd468d.chunk.js", - "static/css/29.5a296074.chunk.css": "/react/build/static/css/29.5a296074.chunk.css", - "./static/js/29.1b0fcf31.chunk.js": "/react/build/./static/js/29.1b0fcf31.chunk.js", - "static/css/30.5a296074.chunk.css": "/react/build/static/css/30.5a296074.chunk.css", - "./static/js/30.60f9de04.chunk.js": "/react/build/./static/js/30.60f9de04.chunk.js", - "static/css/31.35bdf19b.chunk.css": "/react/build/static/css/31.35bdf19b.chunk.css", - "./static/js/31.11b216a5.chunk.js": "/react/build/./static/js/31.11b216a5.chunk.js", - "static/css/32.db66b023.chunk.css": "/react/build/static/css/32.db66b023.chunk.css", - "./static/js/32.7860c029.chunk.js": "/react/build/./static/js/32.7860c029.chunk.js", - "static/css/33.563249a3.chunk.css": "/react/build/static/css/33.563249a3.chunk.css", - "./static/js/33.826d5e1b.chunk.js": "/react/build/./static/js/33.826d5e1b.chunk.js", - "static/css/34.34d67b4f.chunk.css": "/react/build/static/css/34.34d67b4f.chunk.css", - "./static/js/34.21764cb8.chunk.js": "/react/build/./static/js/34.21764cb8.chunk.js", - "static/css/35.34d67b4f.chunk.css": "/react/build/static/css/35.34d67b4f.chunk.css", - "./static/js/35.d8f250b5.chunk.js": "/react/build/./static/js/35.d8f250b5.chunk.js", - "static/css/36.edb9591e.chunk.css": "/react/build/static/css/36.edb9591e.chunk.css", - "./static/js/36.055fc70d.chunk.js": "/react/build/./static/js/36.055fc70d.chunk.js", - "static/css/37.eb23fcd9.chunk.css": "/react/build/static/css/37.eb23fcd9.chunk.css", - "./static/js/37.a9a2167c.chunk.js": "/react/build/./static/js/37.a9a2167c.chunk.js", - "static/css/38.eb23fcd9.chunk.css": "/react/build/static/css/38.eb23fcd9.chunk.css", - "./static/js/38.804f4580.chunk.js": "/react/build/./static/js/38.804f4580.chunk.js", - "static/css/39.8209bf16.chunk.css": "/react/build/static/css/39.8209bf16.chunk.css", - "./static/js/39.b9738759.chunk.js": "/react/build/./static/js/39.b9738759.chunk.js", - "static/css/40.5f6ba0d1.chunk.css": "/react/build/static/css/40.5f6ba0d1.chunk.css", - "./static/js/40.a5fab6ef.chunk.js": "/react/build/./static/js/40.a5fab6ef.chunk.js", - "static/css/41.c9b15536.chunk.css": "/react/build/static/css/41.c9b15536.chunk.css", - "./static/js/41.d8d4bbe6.chunk.js": "/react/build/./static/js/41.d8d4bbe6.chunk.js", - "static/css/42.fac0c3b4.chunk.css": "/react/build/static/css/42.fac0c3b4.chunk.css", - "./static/js/42.43d3136d.chunk.js": "/react/build/./static/js/42.43d3136d.chunk.js", - "static/css/43.b3a10cb7.chunk.css": "/react/build/static/css/43.b3a10cb7.chunk.css", - "./static/js/43.38ab8a15.chunk.js": "/react/build/./static/js/43.38ab8a15.chunk.js", - "static/css/44.0a8dbdbd.chunk.css": "/react/build/static/css/44.0a8dbdbd.chunk.css", - "./static/js/44.890ac70e.chunk.js": "/react/build/./static/js/44.890ac70e.chunk.js", - "static/css/45.20f45c6e.chunk.css": "/react/build/static/css/45.20f45c6e.chunk.css", - "./static/js/45.57a5d042.chunk.js": "/react/build/./static/js/45.57a5d042.chunk.js", - "static/css/46.45756f6b.chunk.css": "/react/build/static/css/46.45756f6b.chunk.css", - "./static/js/46.158d8c3c.chunk.js": "/react/build/./static/js/46.158d8c3c.chunk.js", - "static/css/47.b0a68826.chunk.css": "/react/build/static/css/47.b0a68826.chunk.css", - "./static/js/47.530408f1.chunk.js": "/react/build/./static/js/47.530408f1.chunk.js", - "static/css/48.7349f8f1.chunk.css": "/react/build/static/css/48.7349f8f1.chunk.css", - "./static/js/48.c5697d21.chunk.js": "/react/build/./static/js/48.c5697d21.chunk.js", - "static/css/49.cb6631a4.chunk.css": "/react/build/static/css/49.cb6631a4.chunk.css", - "./static/js/49.4e50ec91.chunk.js": "/react/build/./static/js/49.4e50ec91.chunk.js", - "static/css/50.b925ac6a.chunk.css": "/react/build/static/css/50.b925ac6a.chunk.css", - "./static/js/50.95b2c57a.chunk.js": "/react/build/./static/js/50.95b2c57a.chunk.js", - "static/css/51.97d7a4c3.chunk.css": "/react/build/static/css/51.97d7a4c3.chunk.css", - "./static/js/51.4ed9dc0c.chunk.js": "/react/build/./static/js/51.4ed9dc0c.chunk.js", - "static/css/52.b25d46f3.chunk.css": "/react/build/static/css/52.b25d46f3.chunk.css", - "./static/js/52.119b48bd.chunk.js": "/react/build/./static/js/52.119b48bd.chunk.js", - "static/css/53.b2f79f42.chunk.css": "/react/build/static/css/53.b2f79f42.chunk.css", - "./static/js/53.fb80bf78.chunk.js": "/react/build/./static/js/53.fb80bf78.chunk.js", - "static/css/54.b0138fc6.chunk.css": "/react/build/static/css/54.b0138fc6.chunk.css", - "./static/js/54.7154dd92.chunk.js": "/react/build/./static/js/54.7154dd92.chunk.js", - "static/css/55.8081f48c.chunk.css": "/react/build/static/css/55.8081f48c.chunk.css", - "./static/js/55.d9e62893.chunk.js": "/react/build/./static/js/55.d9e62893.chunk.js", - "static/css/56.cce966d7.chunk.css": "/react/build/static/css/56.cce966d7.chunk.css", - "./static/js/56.db61fe62.chunk.js": "/react/build/./static/js/56.db61fe62.chunk.js", - "static/css/57.640f37d5.chunk.css": "/react/build/static/css/57.640f37d5.chunk.css", - "./static/js/57.69fa7fce.chunk.js": "/react/build/./static/js/57.69fa7fce.chunk.js", - "static/css/58.6f0cea72.chunk.css": "/react/build/static/css/58.6f0cea72.chunk.css", - "./static/js/58.8d11edef.chunk.js": "/react/build/./static/js/58.8d11edef.chunk.js", - "./static/js/59.778af43b.chunk.js": "/react/build/./static/js/59.778af43b.chunk.js", - "static/css/60.640f37d5.chunk.css": "/react/build/static/css/60.640f37d5.chunk.css", - "./static/js/60.6402aa76.chunk.js": "/react/build/./static/js/60.6402aa76.chunk.js", - "static/css/61.cce966d7.chunk.css": "/react/build/static/css/61.cce966d7.chunk.css", - "./static/js/61.ae3c0866.chunk.js": "/react/build/./static/js/61.ae3c0866.chunk.js", - "static/css/62.c347466a.chunk.css": "/react/build/static/css/62.c347466a.chunk.css", - "./static/js/62.cf604c28.chunk.js": "/react/build/./static/js/62.cf604c28.chunk.js", - "static/css/63.242041f2.chunk.css": "/react/build/static/css/63.242041f2.chunk.css", - "./static/js/63.6a55bf2a.chunk.js": "/react/build/./static/js/63.6a55bf2a.chunk.js", - "static/css/64.8725ffda.chunk.css": "/react/build/static/css/64.8725ffda.chunk.css", - "./static/js/64.a893dd3e.chunk.js": "/react/build/./static/js/64.a893dd3e.chunk.js", - "static/css/65.640f37d5.chunk.css": "/react/build/static/css/65.640f37d5.chunk.css", - "./static/js/65.0be9b615.chunk.js": "/react/build/./static/js/65.0be9b615.chunk.js", - "static/css/66.fac0c3b4.chunk.css": "/react/build/static/css/66.fac0c3b4.chunk.css", - "./static/js/66.ab27c768.chunk.js": "/react/build/./static/js/66.ab27c768.chunk.js", - "static/css/67.65e09ca8.chunk.css": "/react/build/static/css/67.65e09ca8.chunk.css", - "./static/js/67.3dbc8909.chunk.js": "/react/build/./static/js/67.3dbc8909.chunk.js", - "static/css/68.61abc8ad.chunk.css": "/react/build/static/css/68.61abc8ad.chunk.css", - "./static/js/68.752ea584.chunk.js": "/react/build/./static/js/68.752ea584.chunk.js", - "./static/js/69.0d1d5fc8.chunk.js": "/react/build/./static/js/69.0d1d5fc8.chunk.js", - "static/css/70.1be69314.chunk.css": "/react/build/static/css/70.1be69314.chunk.css", - "./static/js/70.23576fc6.chunk.js": "/react/build/./static/js/70.23576fc6.chunk.js", - "static/css/71.1be69314.chunk.css": "/react/build/static/css/71.1be69314.chunk.css", - "./static/js/71.d147a685.chunk.js": "/react/build/./static/js/71.d147a685.chunk.js", - "static/css/72.38988ded.chunk.css": "/react/build/static/css/72.38988ded.chunk.css", - "./static/js/72.2c4a89d3.chunk.js": "/react/build/./static/js/72.2c4a89d3.chunk.js", - "static/css/73.5695dd0f.chunk.css": "/react/build/static/css/73.5695dd0f.chunk.css", - "./static/js/73.dea81240.chunk.js": "/react/build/./static/js/73.dea81240.chunk.js", - "static/css/74.1be69314.chunk.css": "/react/build/static/css/74.1be69314.chunk.css", - "./static/js/74.6e8598e2.chunk.js": "/react/build/./static/js/74.6e8598e2.chunk.js", - "static/css/75.0d39367d.chunk.css": "/react/build/static/css/75.0d39367d.chunk.css", - "./static/js/75.7a132a58.chunk.js": "/react/build/./static/js/75.7a132a58.chunk.js", - "static/css/76.8a98e92f.chunk.css": "/react/build/static/css/76.8a98e92f.chunk.css", - "./static/js/76.458605c7.chunk.js": "/react/build/./static/js/76.458605c7.chunk.js", - "static/css/77.640f37d5.chunk.css": "/react/build/static/css/77.640f37d5.chunk.css", - "./static/js/77.41e96fed.chunk.js": "/react/build/./static/js/77.41e96fed.chunk.js", - "static/css/78.f9ddef41.chunk.css": "/react/build/static/css/78.f9ddef41.chunk.css", - "./static/js/78.10474619.chunk.js": "/react/build/./static/js/78.10474619.chunk.js", - "static/css/79.f9ddef41.chunk.css": "/react/build/static/css/79.f9ddef41.chunk.css", - "./static/js/79.e691680d.chunk.js": "/react/build/./static/js/79.e691680d.chunk.js", - "./static/js/80.56df1a0e.chunk.js": "/react/build/./static/js/80.56df1a0e.chunk.js", - "static/css/81.1be69314.chunk.css": "/react/build/static/css/81.1be69314.chunk.css", - "./static/js/81.b465be2e.chunk.js": "/react/build/./static/js/81.b465be2e.chunk.js", - "./static/js/82.6a3c797b.chunk.js": "/react/build/./static/js/82.6a3c797b.chunk.js", - "./static/js/83.d7a80c67.chunk.js": "/react/build/./static/js/83.d7a80c67.chunk.js", - "static/css/84.4031c982.chunk.css": "/react/build/static/css/84.4031c982.chunk.css", - "./static/js/84.d9a19b4e.chunk.js": "/react/build/./static/js/84.d9a19b4e.chunk.js", - "static/css/85.8725ffda.chunk.css": "/react/build/static/css/85.8725ffda.chunk.css", - "./static/js/85.6c0ca0e9.chunk.js": "/react/build/./static/js/85.6c0ca0e9.chunk.js", - "static/css/86.f9ddef41.chunk.css": "/react/build/static/css/86.f9ddef41.chunk.css", - "./static/js/86.9c245ff9.chunk.js": "/react/build/./static/js/86.9c245ff9.chunk.js", - "./static/js/87.2cb4db1c.chunk.js": "/react/build/./static/js/87.2cb4db1c.chunk.js", - "./static/js/88.393f3e7c.chunk.js": "/react/build/./static/js/88.393f3e7c.chunk.js", - "./static/js/89.ddaf23f9.chunk.js": "/react/build/./static/js/89.ddaf23f9.chunk.js", - "./static/js/90.266a47bc.chunk.js": "/react/build/./static/js/90.266a47bc.chunk.js", - "static/css/91.2413039e.chunk.css": "/react/build/static/css/91.2413039e.chunk.css", - "./static/js/91.b02b3d95.chunk.js": "/react/build/./static/js/91.b02b3d95.chunk.js", - "./static/js/92.dbe77388.chunk.js": "/react/build/./static/js/92.dbe77388.chunk.js", - "static/css/93.520fd912.chunk.css": "/react/build/static/css/93.520fd912.chunk.css", - "./static/js/93.a7cfd6f1.chunk.js": "/react/build/./static/js/93.a7cfd6f1.chunk.js", - "./static/js/94.ac6d9514.chunk.js": "/react/build/./static/js/94.ac6d9514.chunk.js", - "./static/js/95.91510362.chunk.js": "/react/build/./static/js/95.91510362.chunk.js", - "./static/js/96.57f05ffb.chunk.js": "/react/build/./static/js/96.57f05ffb.chunk.js", - "./static/js/97.b704219b.chunk.js": "/react/build/./static/js/97.b704219b.chunk.js", - "./static/js/98.f4510382.chunk.js": "/react/build/./static/js/98.f4510382.chunk.js", - "./static/js/99.e8cf2cd4.chunk.js": "/react/build/./static/js/99.e8cf2cd4.chunk.js", - "./static/js/100.3f1f7448.chunk.js": "/react/build/./static/js/100.3f1f7448.chunk.js", - "./static/js/101.ecc1ee24.chunk.js": "/react/build/./static/js/101.ecc1ee24.chunk.js", - "./static/js/102.cd4dcbf8.chunk.js": "/react/build/./static/js/102.cd4dcbf8.chunk.js", - "./static/js/103.6d90be76.chunk.js": "/react/build/./static/js/103.6d90be76.chunk.js", - "./static/js/104.bfd22441.chunk.js": "/react/build/./static/js/104.bfd22441.chunk.js", - "./static/js/105.9bb1bae4.chunk.js": "/react/build/./static/js/105.9bb1bae4.chunk.js", - "./static/js/106.24c77257.chunk.js": "/react/build/./static/js/106.24c77257.chunk.js", - "./static/js/107.704c393d.chunk.js": "/react/build/./static/js/107.704c393d.chunk.js", - "./static/js/108.1375cabf.chunk.js": "/react/build/./static/js/108.1375cabf.chunk.js", - "./static/js/109.fc4ae0b0.chunk.js": "/react/build/./static/js/109.fc4ae0b0.chunk.js", - "./static/js/110.9fe7c1dc.chunk.js": "/react/build/./static/js/110.9fe7c1dc.chunk.js", - "./static/js/111.a5270b38.chunk.js": "/react/build/./static/js/111.a5270b38.chunk.js", - "./static/js/112.10dd19e2.chunk.js": "/react/build/./static/js/112.10dd19e2.chunk.js", - "./static/js/113.94061032.chunk.js": "/react/build/./static/js/113.94061032.chunk.js", - "./static/js/114.7d98ee28.chunk.js": "/react/build/./static/js/114.7d98ee28.chunk.js", - "./static/js/115.2c0c0d55.chunk.js": "/react/build/./static/js/115.2c0c0d55.chunk.js", - "./static/js/116.46ee7a44.chunk.js": "/react/build/./static/js/116.46ee7a44.chunk.js", - "./static/js/117.9e20aa4e.chunk.js": "/react/build/./static/js/117.9e20aa4e.chunk.js", - "./static/js/118.373e3b42.chunk.js": "/react/build/./static/js/118.373e3b42.chunk.js", - "./static/js/119.96b4d165.chunk.js": "/react/build/./static/js/119.96b4d165.chunk.js", - "./static/js/120.e9a223e7.chunk.js": "/react/build/./static/js/120.e9a223e7.chunk.js", - "./static/js/121.4a0c7f81.chunk.js": "/react/build/./static/js/121.4a0c7f81.chunk.js", - "./static/js/122.1e3325d0.chunk.js": "/react/build/./static/js/122.1e3325d0.chunk.js", - "./static/js/123.9fec29a2.chunk.js": "/react/build/./static/js/123.9fec29a2.chunk.js", - "./static/js/124.ad8e29a9.chunk.js": "/react/build/./static/js/124.ad8e29a9.chunk.js", - "./static/js/125.8840e096.chunk.js": "/react/build/./static/js/125.8840e096.chunk.js", - "./static/js/126.8c4fd354.chunk.js": "/react/build/./static/js/126.8c4fd354.chunk.js", - "./static/js/127.9a3ee86f.chunk.js": "/react/build/./static/js/127.9a3ee86f.chunk.js", - "./static/js/128.10ebb693.chunk.js": "/react/build/./static/js/128.10ebb693.chunk.js", - "./static/js/129.18517a16.chunk.js": "/react/build/./static/js/129.18517a16.chunk.js", - "./static/js/130.07ed1328.chunk.js": "/react/build/./static/js/130.07ed1328.chunk.js", - "./static/js/131.4b26544e.chunk.js": "/react/build/./static/js/131.4b26544e.chunk.js", - "./static/js/132.d5840c64.chunk.js": "/react/build/./static/js/132.d5840c64.chunk.js", - "./static/js/133.703a27f9.chunk.js": "/react/build/./static/js/133.703a27f9.chunk.js", - "./static/js/134.6b2520b6.chunk.js": "/react/build/./static/js/134.6b2520b6.chunk.js", - "./static/js/135.c6916a52.chunk.js": "/react/build/./static/js/135.c6916a52.chunk.js", - "./static/js/136.e5e7ac11.chunk.js": "/react/build/./static/js/136.e5e7ac11.chunk.js", - "./static/js/137.1584bff5.chunk.js": "/react/build/./static/js/137.1584bff5.chunk.js", - "./static/js/138.0f982519.chunk.js": "/react/build/./static/js/138.0f982519.chunk.js", - "./static/js/139.94a11889.chunk.js": "/react/build/./static/js/139.94a11889.chunk.js", - "./static/js/140.8edb82e7.chunk.js": "/react/build/./static/js/140.8edb82e7.chunk.js", - "./static/js/141.d8532b0b.chunk.js": "/react/build/./static/js/141.d8532b0b.chunk.js", - "./static/js/142.95892d46.chunk.js": "/react/build/./static/js/142.95892d46.chunk.js", - "./static/js/143.37e03bad.chunk.js": "/react/build/./static/js/143.37e03bad.chunk.js", - "./static/js/144.d1e0aa05.chunk.js": "/react/build/./static/js/144.d1e0aa05.chunk.js", - "./static/js/145.db4ff6d4.chunk.js": "/react/build/./static/js/145.db4ff6d4.chunk.js", - "./static/js/146.823ebaa5.chunk.js": "/react/build/./static/js/146.823ebaa5.chunk.js", - "./static/js/147.d0e562d4.chunk.js": "/react/build/./static/js/147.d0e562d4.chunk.js", - "./static/js/148.90ce8bbb.chunk.js": "/react/build/./static/js/148.90ce8bbb.chunk.js", - "./static/js/149.c969a3de.chunk.js": "/react/build/./static/js/149.c969a3de.chunk.js", - "./static/js/150.70bca75f.chunk.js": "/react/build/./static/js/150.70bca75f.chunk.js", - "./static/js/151.d84f5f94.chunk.js": "/react/build/./static/js/151.d84f5f94.chunk.js", - "./static/js/152.3907da3e.chunk.js": "/react/build/./static/js/152.3907da3e.chunk.js", - "./static/js/153.94276524.chunk.js": "/react/build/./static/js/153.94276524.chunk.js", - "main.css": "/react/build/static/css/main.d31a9b96.chunk.css", - "main.js": "/react/build/./static/js/main.8d8df813.chunk.js", - "runtime~main.js": "/react/build/./static/js/runtime~main.3036498e.js", - "./static/js/148.90ce8bbb.chunk.js.LICENSE.txt": "/react/build/./static/js/148.90ce8bbb.chunk.js.LICENSE.txt", - "./static/js/15.4566fc09.chunk.js.LICENSE.txt": "/react/build/./static/js/15.4566fc09.chunk.js.LICENSE.txt", - "./static/js/17.854efcf9.chunk.js.LICENSE.txt": "/react/build/./static/js/17.854efcf9.chunk.js.LICENSE.txt", - "./static/js/23.880f8ed1.chunk.js.LICENSE.txt": "/react/build/./static/js/23.880f8ed1.chunk.js.LICENSE.txt", - "./static/js/24.bd6b8e5b.chunk.js.LICENSE.txt": "/react/build/./static/js/24.bd6b8e5b.chunk.js.LICENSE.txt", - "./static/js/25.25e73f97.chunk.js.LICENSE.txt": "/react/build/./static/js/25.25e73f97.chunk.js.LICENSE.txt", - "./static/js/26.51b2a14e.chunk.js.LICENSE.txt": "/react/build/./static/js/26.51b2a14e.chunk.js.LICENSE.txt", - "./static/js/27.4f50c382.chunk.js.LICENSE.txt": "/react/build/./static/js/27.4f50c382.chunk.js.LICENSE.txt", - "./static/js/36.055fc70d.chunk.js.LICENSE.txt": "/react/build/./static/js/36.055fc70d.chunk.js.LICENSE.txt", - "./static/js/9.bb5e144d.chunk.js.LICENSE.txt": "/react/build/./static/js/9.bb5e144d.chunk.js.LICENSE.txt", - "./static/js/main.8d8df813.chunk.js.LICENSE.txt": "/react/build/./static/js/main.8d8df813.chunk.js.LICENSE.txt", + "static/css/0.d9d88bd2.chunk.css": "/react/build/static/css/0.d9d88bd2.chunk.css", + "./static/js/0.950b043c.chunk.js": "/react/build/./static/js/0.950b043c.chunk.js", + "static/css/1.0ba7a726.chunk.css": "/react/build/static/css/1.0ba7a726.chunk.css", + "./static/js/1.9de07cbc.chunk.js": "/react/build/./static/js/1.9de07cbc.chunk.js", + "static/css/2.2254a4a8.chunk.css": "/react/build/static/css/2.2254a4a8.chunk.css", + "./static/js/2.867be313.chunk.js": "/react/build/./static/js/2.867be313.chunk.js", + "./static/js/3.4dc00b2b.chunk.js": "/react/build/./static/js/3.4dc00b2b.chunk.js", + "static/css/4.d01698e8.chunk.css": "/react/build/static/css/4.d01698e8.chunk.css", + "./static/js/4.705c2920.chunk.js": "/react/build/./static/js/4.705c2920.chunk.js", + "./static/js/5.ab9433b7.chunk.js": "/react/build/./static/js/5.ab9433b7.chunk.js", + "static/css/6.8bc7b323.chunk.css": "/react/build/static/css/6.8bc7b323.chunk.css", + "./static/js/6.c010a26e.chunk.js": "/react/build/./static/js/6.c010a26e.chunk.js", + "static/css/7.bbfdfc43.chunk.css": "/react/build/static/css/7.bbfdfc43.chunk.css", + "./static/js/7.db9e3af4.chunk.js": "/react/build/./static/js/7.db9e3af4.chunk.js", + "static/css/8.1632b9c8.chunk.css": "/react/build/static/css/8.1632b9c8.chunk.css", + "./static/js/8.460c5da9.chunk.js": "/react/build/./static/js/8.460c5da9.chunk.js", + "static/css/9.d4345223.chunk.css": "/react/build/static/css/9.d4345223.chunk.css", + "./static/js/9.74545efc.chunk.js": "/react/build/./static/js/9.74545efc.chunk.js", + "static/css/10.6e0686d9.chunk.css": "/react/build/static/css/10.6e0686d9.chunk.css", + "./static/js/10.d24f0376.chunk.js": "/react/build/./static/js/10.d24f0376.chunk.js", + "static/css/11.1c5f3a58.chunk.css": "/react/build/static/css/11.1c5f3a58.chunk.css", + "./static/js/11.9b6d6a8d.chunk.js": "/react/build/./static/js/11.9b6d6a8d.chunk.js", + "static/css/12.ae4c77b5.chunk.css": "/react/build/static/css/12.ae4c77b5.chunk.css", + "./static/js/12.0f4afd34.chunk.js": "/react/build/./static/js/12.0f4afd34.chunk.js", + "static/css/13.ae349a22.chunk.css": "/react/build/static/css/13.ae349a22.chunk.css", + "./static/js/13.fd263686.chunk.js": "/react/build/./static/js/13.fd263686.chunk.js", + "./static/js/14.95b5db37.chunk.js": "/react/build/./static/js/14.95b5db37.chunk.js", + "static/css/15.1e970b46.chunk.css": "/react/build/static/css/15.1e970b46.chunk.css", + "./static/js/15.e4f92b66.chunk.js": "/react/build/./static/js/15.e4f92b66.chunk.js", + "static/css/16.cf56d612.chunk.css": "/react/build/static/css/16.cf56d612.chunk.css", + "./static/js/16.7d6f2538.chunk.js": "/react/build/./static/js/16.7d6f2538.chunk.js", + "static/css/17.1c396c45.chunk.css": "/react/build/static/css/17.1c396c45.chunk.css", + "./static/js/17.3d9be2e6.chunk.js": "/react/build/./static/js/17.3d9be2e6.chunk.js", + "static/css/18.d0c774b5.chunk.css": "/react/build/static/css/18.d0c774b5.chunk.css", + "./static/js/18.3340e6ca.chunk.js": "/react/build/./static/js/18.3340e6ca.chunk.js", + "static/css/19.7bd7b9f3.chunk.css": "/react/build/static/css/19.7bd7b9f3.chunk.css", + "./static/js/19.94d795c9.chunk.js": "/react/build/./static/js/19.94d795c9.chunk.js", + "static/css/20.012aec0d.chunk.css": "/react/build/static/css/20.012aec0d.chunk.css", + "./static/js/20.fb21ccaf.chunk.js": "/react/build/./static/js/20.fb21ccaf.chunk.js", + "static/css/21.e5544bad.chunk.css": "/react/build/static/css/21.e5544bad.chunk.css", + "./static/js/21.6d5a039a.chunk.js": "/react/build/./static/js/21.6d5a039a.chunk.js", + "./static/js/22.2539176f.chunk.js": "/react/build/./static/js/22.2539176f.chunk.js", + "static/css/23.db9266b0.chunk.css": "/react/build/static/css/23.db9266b0.chunk.css", + "./static/js/23.a37322cc.chunk.js": "/react/build/./static/js/23.a37322cc.chunk.js", + "static/css/24.0b7937b6.chunk.css": "/react/build/static/css/24.0b7937b6.chunk.css", + "./static/js/24.41d24303.chunk.js": "/react/build/./static/js/24.41d24303.chunk.js", + "static/css/25.92df39ea.chunk.css": "/react/build/static/css/25.92df39ea.chunk.css", + "./static/js/25.05415ebf.chunk.js": "/react/build/./static/js/25.05415ebf.chunk.js", + "./static/js/26.e9e9c6fc.chunk.js": "/react/build/./static/js/26.e9e9c6fc.chunk.js", + "static/css/27.e3fa2a7b.chunk.css": "/react/build/static/css/27.e3fa2a7b.chunk.css", + "./static/js/27.1ad25fe1.chunk.js": "/react/build/./static/js/27.1ad25fe1.chunk.js", + "static/css/28.6ba5b2c7.chunk.css": "/react/build/static/css/28.6ba5b2c7.chunk.css", + "./static/js/28.a28a15b0.chunk.js": "/react/build/./static/js/28.a28a15b0.chunk.js", + "./static/js/29.fc579b75.chunk.js": "/react/build/./static/js/29.fc579b75.chunk.js", + "static/css/30.215bc3a5.chunk.css": "/react/build/static/css/30.215bc3a5.chunk.css", + "./static/js/30.392e284c.chunk.js": "/react/build/./static/js/30.392e284c.chunk.js", + "static/css/31.47647ec8.chunk.css": "/react/build/static/css/31.47647ec8.chunk.css", + "./static/js/31.c0101882.chunk.js": "/react/build/./static/js/31.c0101882.chunk.js", + "static/css/32.2cb5f2e5.chunk.css": "/react/build/static/css/32.2cb5f2e5.chunk.css", + "./static/js/32.91558abd.chunk.js": "/react/build/./static/js/32.91558abd.chunk.js", + "static/css/33.b9711f2d.chunk.css": "/react/build/static/css/33.b9711f2d.chunk.css", + "./static/js/33.797d8de2.chunk.js": "/react/build/./static/js/33.797d8de2.chunk.js", + "static/css/34.6d6792ac.chunk.css": "/react/build/static/css/34.6d6792ac.chunk.css", + "./static/js/34.bfc7e636.chunk.js": "/react/build/./static/js/34.bfc7e636.chunk.js", + "static/css/35.b298dd17.chunk.css": "/react/build/static/css/35.b298dd17.chunk.css", + "./static/js/35.9d635066.chunk.js": "/react/build/./static/js/35.9d635066.chunk.js", + "static/css/36.7818b8e6.chunk.css": "/react/build/static/css/36.7818b8e6.chunk.css", + "./static/js/36.7f8322f1.chunk.js": "/react/build/./static/js/36.7f8322f1.chunk.js", + "static/css/37.73d9bcf3.chunk.css": "/react/build/static/css/37.73d9bcf3.chunk.css", + "./static/js/37.258e5be8.chunk.js": "/react/build/./static/js/37.258e5be8.chunk.js", + "static/css/38.50f071b5.chunk.css": "/react/build/static/css/38.50f071b5.chunk.css", + "./static/js/38.15e80ba8.chunk.js": "/react/build/./static/js/38.15e80ba8.chunk.js", + "static/css/39.d758abd4.chunk.css": "/react/build/static/css/39.d758abd4.chunk.css", + "./static/js/39.0d1d89da.chunk.js": "/react/build/./static/js/39.0d1d89da.chunk.js", + "static/css/40.c55de694.chunk.css": "/react/build/static/css/40.c55de694.chunk.css", + "./static/js/40.89c25ad3.chunk.js": "/react/build/./static/js/40.89c25ad3.chunk.js", + "static/css/41.1c396c45.chunk.css": "/react/build/static/css/41.1c396c45.chunk.css", + "./static/js/41.e6355000.chunk.js": "/react/build/./static/js/41.e6355000.chunk.js", + "static/css/42.1c396c45.chunk.css": "/react/build/static/css/42.1c396c45.chunk.css", + "./static/js/42.1f380e89.chunk.js": "/react/build/./static/js/42.1f380e89.chunk.js", + "static/css/43.1c396c45.chunk.css": "/react/build/static/css/43.1c396c45.chunk.css", + "./static/js/43.9bec87d0.chunk.js": "/react/build/./static/js/43.9bec87d0.chunk.js", + "static/css/44.1c396c45.chunk.css": "/react/build/static/css/44.1c396c45.chunk.css", + "./static/js/44.4b01089f.chunk.js": "/react/build/./static/js/44.4b01089f.chunk.js", + "static/css/45.1c396c45.chunk.css": "/react/build/static/css/45.1c396c45.chunk.css", + "./static/js/45.63927482.chunk.js": "/react/build/./static/js/45.63927482.chunk.js", + "static/css/46.a217b7eb.chunk.css": "/react/build/static/css/46.a217b7eb.chunk.css", + "./static/js/46.da1f47c6.chunk.js": "/react/build/./static/js/46.da1f47c6.chunk.js", + "static/css/47.b6b4e948.chunk.css": "/react/build/static/css/47.b6b4e948.chunk.css", + "./static/js/47.01fd594e.chunk.js": "/react/build/./static/js/47.01fd594e.chunk.js", + "static/css/48.59b01c1c.chunk.css": "/react/build/static/css/48.59b01c1c.chunk.css", + "./static/js/48.64b15f86.chunk.js": "/react/build/./static/js/48.64b15f86.chunk.js", + "./static/js/49.43aa9d53.chunk.js": "/react/build/./static/js/49.43aa9d53.chunk.js", + "static/css/50.cb512b32.chunk.css": "/react/build/static/css/50.cb512b32.chunk.css", + "./static/js/50.7074ad54.chunk.js": "/react/build/./static/js/50.7074ad54.chunk.js", + "static/css/51.cb512b32.chunk.css": "/react/build/static/css/51.cb512b32.chunk.css", + "./static/js/51.29e9edd7.chunk.js": "/react/build/./static/js/51.29e9edd7.chunk.js", + "static/css/52.68faae98.chunk.css": "/react/build/static/css/52.68faae98.chunk.css", + "./static/js/52.075b5266.chunk.js": "/react/build/./static/js/52.075b5266.chunk.js", + "static/css/53.8aa1f7b9.chunk.css": "/react/build/static/css/53.8aa1f7b9.chunk.css", + "./static/js/53.2400e3e0.chunk.js": "/react/build/./static/js/53.2400e3e0.chunk.js", + "./static/js/54.9b468fee.chunk.js": "/react/build/./static/js/54.9b468fee.chunk.js", + "static/css/55.080d6958.chunk.css": "/react/build/static/css/55.080d6958.chunk.css", + "./static/js/55.fd22ad3e.chunk.js": "/react/build/./static/js/55.fd22ad3e.chunk.js", + "./static/js/56.311e64fd.chunk.js": "/react/build/./static/js/56.311e64fd.chunk.js", + "static/css/57.d0d19c61.chunk.css": "/react/build/static/css/57.d0d19c61.chunk.css", + "./static/js/57.534c2fad.chunk.js": "/react/build/./static/js/57.534c2fad.chunk.js", + "./static/js/58.9032f92e.chunk.js": "/react/build/./static/js/58.9032f92e.chunk.js", + "static/css/59.2b4fa75d.chunk.css": "/react/build/static/css/59.2b4fa75d.chunk.css", + "./static/js/59.2fb94832.chunk.js": "/react/build/./static/js/59.2fb94832.chunk.js", + "static/css/60.4f25932e.chunk.css": "/react/build/static/css/60.4f25932e.chunk.css", + "./static/js/60.0990e7fa.chunk.js": "/react/build/./static/js/60.0990e7fa.chunk.js", + "static/css/61.b299cb62.chunk.css": "/react/build/static/css/61.b299cb62.chunk.css", + "./static/js/61.48c1146b.chunk.js": "/react/build/./static/js/61.48c1146b.chunk.js", + "static/css/62.4f215d24.chunk.css": "/react/build/static/css/62.4f215d24.chunk.css", + "./static/js/62.d2c37e43.chunk.js": "/react/build/./static/js/62.d2c37e43.chunk.js", + "static/css/63.81eadb75.chunk.css": "/react/build/static/css/63.81eadb75.chunk.css", + "./static/js/63.9e373d70.chunk.js": "/react/build/./static/js/63.9e373d70.chunk.js", + "static/css/64.6422e07b.chunk.css": "/react/build/static/css/64.6422e07b.chunk.css", + "./static/js/64.d3dec321.chunk.js": "/react/build/./static/js/64.d3dec321.chunk.js", + "static/css/65.328c5f31.chunk.css": "/react/build/static/css/65.328c5f31.chunk.css", + "./static/js/65.e49e3734.chunk.js": "/react/build/./static/js/65.e49e3734.chunk.js", + "static/css/66.c2f5b906.chunk.css": "/react/build/static/css/66.c2f5b906.chunk.css", + "./static/js/66.2205fafe.chunk.js": "/react/build/./static/js/66.2205fafe.chunk.js", + "static/css/67.0e85f7d5.chunk.css": "/react/build/static/css/67.0e85f7d5.chunk.css", + "./static/js/67.d60ffc84.chunk.js": "/react/build/./static/js/67.d60ffc84.chunk.js", + "static/css/68.6f4b18b7.chunk.css": "/react/build/static/css/68.6f4b18b7.chunk.css", + "./static/js/68.7898abb2.chunk.js": "/react/build/./static/js/68.7898abb2.chunk.js", + "static/css/69.79145572.chunk.css": "/react/build/static/css/69.79145572.chunk.css", + "./static/js/69.578bd27d.chunk.js": "/react/build/./static/js/69.578bd27d.chunk.js", + "static/css/70.67a9b0d6.chunk.css": "/react/build/static/css/70.67a9b0d6.chunk.css", + "./static/js/70.d945860d.chunk.js": "/react/build/./static/js/70.d945860d.chunk.js", + "static/css/71.bc4d3096.chunk.css": "/react/build/static/css/71.bc4d3096.chunk.css", + "./static/js/71.ac7a05ac.chunk.js": "/react/build/./static/js/71.ac7a05ac.chunk.js", + "static/css/72.1ff4022b.chunk.css": "/react/build/static/css/72.1ff4022b.chunk.css", + "./static/js/72.bef599ce.chunk.js": "/react/build/./static/js/72.bef599ce.chunk.js", + "static/css/73.ae116d0a.chunk.css": "/react/build/static/css/73.ae116d0a.chunk.css", + "./static/js/73.7b2075b7.chunk.js": "/react/build/./static/js/73.7b2075b7.chunk.js", + "./static/js/74.da8c8422.chunk.js": "/react/build/./static/js/74.da8c8422.chunk.js", + "static/css/75.3eb7f5e2.chunk.css": "/react/build/static/css/75.3eb7f5e2.chunk.css", + "./static/js/75.aae1d288.chunk.js": "/react/build/./static/js/75.aae1d288.chunk.js", + "static/css/76.05177416.chunk.css": "/react/build/static/css/76.05177416.chunk.css", + "./static/js/76.3ec0d9b7.chunk.js": "/react/build/./static/js/76.3ec0d9b7.chunk.js", + "static/css/77.330fa4e3.chunk.css": "/react/build/static/css/77.330fa4e3.chunk.css", + "./static/js/77.da521d19.chunk.js": "/react/build/./static/js/77.da521d19.chunk.js", + "static/css/78.520bfea6.chunk.css": "/react/build/static/css/78.520bfea6.chunk.css", + "./static/js/78.e0770374.chunk.js": "/react/build/./static/js/78.e0770374.chunk.js", + "static/css/79.a5678b8f.chunk.css": "/react/build/static/css/79.a5678b8f.chunk.css", + "./static/js/79.89a2e2ff.chunk.js": "/react/build/./static/js/79.89a2e2ff.chunk.js", + "static/css/80.9d206204.chunk.css": "/react/build/static/css/80.9d206204.chunk.css", + "./static/js/80.2fbf05b9.chunk.js": "/react/build/./static/js/80.2fbf05b9.chunk.js", + "./static/js/81.1932b21f.chunk.js": "/react/build/./static/js/81.1932b21f.chunk.js", + "static/css/82.ea97577b.chunk.css": "/react/build/static/css/82.ea97577b.chunk.css", + "./static/js/82.1a8b32e2.chunk.js": "/react/build/./static/js/82.1a8b32e2.chunk.js", + "static/css/83.b2109eb4.chunk.css": "/react/build/static/css/83.b2109eb4.chunk.css", + "./static/js/83.bd338219.chunk.js": "/react/build/./static/js/83.bd338219.chunk.js", + "static/css/84.ddd123f8.chunk.css": "/react/build/static/css/84.ddd123f8.chunk.css", + "./static/js/84.f4332bff.chunk.js": "/react/build/./static/js/84.f4332bff.chunk.js", + "static/css/85.358b8e2c.chunk.css": "/react/build/static/css/85.358b8e2c.chunk.css", + "./static/js/85.68b6ea23.chunk.js": "/react/build/./static/js/85.68b6ea23.chunk.js", + "static/css/86.61b37499.chunk.css": "/react/build/static/css/86.61b37499.chunk.css", + "./static/js/86.e05228d1.chunk.js": "/react/build/./static/js/86.e05228d1.chunk.js", + "static/css/87.61b37499.chunk.css": "/react/build/static/css/87.61b37499.chunk.css", + "./static/js/87.57f1151b.chunk.js": "/react/build/./static/js/87.57f1151b.chunk.js", + "static/css/88.802376aa.chunk.css": "/react/build/static/css/88.802376aa.chunk.css", + "./static/js/88.82adfd43.chunk.js": "/react/build/./static/js/88.82adfd43.chunk.js", + "static/css/89.92df39ea.chunk.css": "/react/build/static/css/89.92df39ea.chunk.css", + "./static/js/89.7e946380.chunk.js": "/react/build/./static/js/89.7e946380.chunk.js", + "static/css/90.cbeef085.chunk.css": "/react/build/static/css/90.cbeef085.chunk.css", + "./static/js/90.1753b07a.chunk.js": "/react/build/./static/js/90.1753b07a.chunk.js", + "static/css/91.1926e8da.chunk.css": "/react/build/static/css/91.1926e8da.chunk.css", + "./static/js/91.d4314892.chunk.js": "/react/build/./static/js/91.d4314892.chunk.js", + "static/css/92.72690062.chunk.css": "/react/build/static/css/92.72690062.chunk.css", + "./static/js/92.8f8f13b6.chunk.js": "/react/build/./static/js/92.8f8f13b6.chunk.js", + "./static/js/93.c3c08c56.chunk.js": "/react/build/./static/js/93.c3c08c56.chunk.js", + "static/css/94.4054f41b.chunk.css": "/react/build/static/css/94.4054f41b.chunk.css", + "./static/js/94.a20881d0.chunk.js": "/react/build/./static/js/94.a20881d0.chunk.js", + "static/css/95.6b286560.chunk.css": "/react/build/static/css/95.6b286560.chunk.css", + "./static/js/95.89fe1ff4.chunk.js": "/react/build/./static/js/95.89fe1ff4.chunk.js", + "static/css/96.d16cbade.chunk.css": "/react/build/static/css/96.d16cbade.chunk.css", + "./static/js/96.d770512c.chunk.js": "/react/build/./static/js/96.d770512c.chunk.js", + "static/css/97.2276e27f.chunk.css": "/react/build/static/css/97.2276e27f.chunk.css", + "./static/js/97.6f575e28.chunk.js": "/react/build/./static/js/97.6f575e28.chunk.js", + "static/css/98.92df39ea.chunk.css": "/react/build/static/css/98.92df39ea.chunk.css", + "./static/js/98.e26d259a.chunk.js": "/react/build/./static/js/98.e26d259a.chunk.js", + "static/css/99.c2f5b906.chunk.css": "/react/build/static/css/99.c2f5b906.chunk.css", + "./static/js/99.ada1839e.chunk.js": "/react/build/./static/js/99.ada1839e.chunk.js", + "static/css/100.fd3fa2e9.chunk.css": "/react/build/static/css/100.fd3fa2e9.chunk.css", + "./static/js/100.0fcbf83d.chunk.js": "/react/build/./static/js/100.0fcbf83d.chunk.js", + "./static/js/101.14eab4d4.chunk.js": "/react/build/./static/js/101.14eab4d4.chunk.js", + "static/css/102.33144286.chunk.css": "/react/build/static/css/102.33144286.chunk.css", + "./static/js/102.1d66a6a7.chunk.js": "/react/build/./static/js/102.1d66a6a7.chunk.js", + "static/css/103.06bcf029.chunk.css": "/react/build/static/css/103.06bcf029.chunk.css", + "./static/js/103.f5b3b266.chunk.js": "/react/build/./static/js/103.f5b3b266.chunk.js", + "static/css/104.92df39ea.chunk.css": "/react/build/static/css/104.92df39ea.chunk.css", + "./static/js/104.7b9d0c2c.chunk.js": "/react/build/./static/js/104.7b9d0c2c.chunk.js", + "static/css/105.92df39ea.chunk.css": "/react/build/static/css/105.92df39ea.chunk.css", + "./static/js/105.266ebd65.chunk.js": "/react/build/./static/js/105.266ebd65.chunk.js", + "./static/js/106.ba73452d.chunk.js": "/react/build/./static/js/106.ba73452d.chunk.js", + "./static/js/107.370f7596.chunk.js": "/react/build/./static/js/107.370f7596.chunk.js", + "./static/js/108.e9d3cb50.chunk.js": "/react/build/./static/js/108.e9d3cb50.chunk.js", + "static/css/109.3598c90d.chunk.css": "/react/build/static/css/109.3598c90d.chunk.css", + "./static/js/109.bbc83e4b.chunk.js": "/react/build/./static/js/109.bbc83e4b.chunk.js", + "static/css/110.b6f629c2.chunk.css": "/react/build/static/css/110.b6f629c2.chunk.css", + "./static/js/110.f7ba47e2.chunk.js": "/react/build/./static/js/110.f7ba47e2.chunk.js", + "static/css/111.9d206204.chunk.css": "/react/build/static/css/111.9d206204.chunk.css", + "./static/js/111.4a049a31.chunk.js": "/react/build/./static/js/111.4a049a31.chunk.js", + "static/css/112.632d7855.chunk.css": "/react/build/static/css/112.632d7855.chunk.css", + "./static/js/112.b83a9449.chunk.js": "/react/build/./static/js/112.b83a9449.chunk.js", + "static/css/113.ebddf6de.chunk.css": "/react/build/static/css/113.ebddf6de.chunk.css", + "./static/js/113.27be418a.chunk.js": "/react/build/./static/js/113.27be418a.chunk.js", + "static/css/114.e2a8a600.chunk.css": "/react/build/static/css/114.e2a8a600.chunk.css", + "./static/js/114.7d79edee.chunk.js": "/react/build/./static/js/114.7d79edee.chunk.js", + "static/css/115.9d206204.chunk.css": "/react/build/static/css/115.9d206204.chunk.css", + "./static/js/115.53db6ace.chunk.js": "/react/build/./static/js/115.53db6ace.chunk.js", + "static/css/116.9d206204.chunk.css": "/react/build/static/css/116.9d206204.chunk.css", + "./static/js/116.64ad5599.chunk.js": "/react/build/./static/js/116.64ad5599.chunk.js", + "static/css/117.e9295e40.chunk.css": "/react/build/static/css/117.e9295e40.chunk.css", + "./static/js/117.aa5ab5b0.chunk.js": "/react/build/./static/js/117.aa5ab5b0.chunk.js", + "static/css/118.92df39ea.chunk.css": "/react/build/static/css/118.92df39ea.chunk.css", + "./static/js/118.31729c8e.chunk.js": "/react/build/./static/js/118.31729c8e.chunk.js", + "./static/js/119.e1ffe803.chunk.js": "/react/build/./static/js/119.e1ffe803.chunk.js", + "static/css/120.11a04942.chunk.css": "/react/build/static/css/120.11a04942.chunk.css", + "./static/js/120.14919caf.chunk.js": "/react/build/./static/js/120.14919caf.chunk.js", + "./static/js/121.ac0459ca.chunk.js": "/react/build/./static/js/121.ac0459ca.chunk.js", + "./static/js/122.d0d45210.chunk.js": "/react/build/./static/js/122.d0d45210.chunk.js", + "./static/js/123.2d476250.chunk.js": "/react/build/./static/js/123.2d476250.chunk.js", + "./static/js/124.5fc51cfe.chunk.js": "/react/build/./static/js/124.5fc51cfe.chunk.js", + "static/css/125.3edde0c7.chunk.css": "/react/build/static/css/125.3edde0c7.chunk.css", + "./static/js/125.23c30c60.chunk.js": "/react/build/./static/js/125.23c30c60.chunk.js", + "static/css/126.215bc3a5.chunk.css": "/react/build/static/css/126.215bc3a5.chunk.css", + "./static/js/126.84d8c142.chunk.js": "/react/build/./static/js/126.84d8c142.chunk.js", + "./static/js/127.1cdf3c84.chunk.js": "/react/build/./static/js/127.1cdf3c84.chunk.js", + "static/css/128.a338dc08.chunk.css": "/react/build/static/css/128.a338dc08.chunk.css", + "./static/js/128.03d2ac88.chunk.js": "/react/build/./static/js/128.03d2ac88.chunk.js", + "static/css/129.2f409942.chunk.css": "/react/build/static/css/129.2f409942.chunk.css", + "./static/js/129.d544b3d1.chunk.js": "/react/build/./static/js/129.d544b3d1.chunk.js", + "./static/js/130.686cf6d8.chunk.js": "/react/build/./static/js/130.686cf6d8.chunk.js", + "./static/js/131.b28edf39.chunk.js": "/react/build/./static/js/131.b28edf39.chunk.js", + "./static/js/132.03e9a586.chunk.js": "/react/build/./static/js/132.03e9a586.chunk.js", + "./static/js/133.1b22e8fa.chunk.js": "/react/build/./static/js/133.1b22e8fa.chunk.js", + "static/css/134.1ff4022b.chunk.css": "/react/build/static/css/134.1ff4022b.chunk.css", + "./static/js/134.fe9ebfd6.chunk.js": "/react/build/./static/js/134.fe9ebfd6.chunk.js", + "static/css/135.fd96c397.chunk.css": "/react/build/static/css/135.fd96c397.chunk.css", + "./static/js/135.bc65d0b7.chunk.js": "/react/build/./static/js/135.bc65d0b7.chunk.js", + "static/css/136.188a7db8.chunk.css": "/react/build/static/css/136.188a7db8.chunk.css", + "./static/js/136.6f8ca28c.chunk.js": "/react/build/./static/js/136.6f8ca28c.chunk.js", + "static/css/137.af9850ad.chunk.css": "/react/build/static/css/137.af9850ad.chunk.css", + "./static/js/137.358cfd10.chunk.js": "/react/build/./static/js/137.358cfd10.chunk.js", + "static/css/138.215bc3a5.chunk.css": "/react/build/static/css/138.215bc3a5.chunk.css", + "./static/js/138.376925b3.chunk.js": "/react/build/./static/js/138.376925b3.chunk.js", + "static/css/139.215bc3a5.chunk.css": "/react/build/static/css/139.215bc3a5.chunk.css", + "./static/js/139.55e8b3c1.chunk.js": "/react/build/./static/js/139.55e8b3c1.chunk.js", + "static/css/140.215bc3a5.chunk.css": "/react/build/static/css/140.215bc3a5.chunk.css", + "./static/js/140.36e3a04a.chunk.js": "/react/build/./static/js/140.36e3a04a.chunk.js", + "static/css/141.f2060fe7.chunk.css": "/react/build/static/css/141.f2060fe7.chunk.css", + "./static/js/141.efa47aa5.chunk.js": "/react/build/./static/js/141.efa47aa5.chunk.js", + "static/css/142.83d23924.chunk.css": "/react/build/static/css/142.83d23924.chunk.css", + "./static/js/142.61427897.chunk.js": "/react/build/./static/js/142.61427897.chunk.js", + "static/css/143.0485185f.chunk.css": "/react/build/static/css/143.0485185f.chunk.css", + "./static/js/143.5e0536a4.chunk.js": "/react/build/./static/js/143.5e0536a4.chunk.js", + "static/css/144.9d206204.chunk.css": "/react/build/static/css/144.9d206204.chunk.css", + "./static/js/144.cd46041c.chunk.js": "/react/build/./static/js/144.cd46041c.chunk.js", + "./static/js/145.530eed7f.chunk.js": "/react/build/./static/js/145.530eed7f.chunk.js", + "./static/js/146.9d817983.chunk.js": "/react/build/./static/js/146.9d817983.chunk.js", + "./static/js/147.df687caf.chunk.js": "/react/build/./static/js/147.df687caf.chunk.js", + "./static/js/148.82fc1b24.chunk.js": "/react/build/./static/js/148.82fc1b24.chunk.js", + "./static/js/149.72fbdf88.chunk.js": "/react/build/./static/js/149.72fbdf88.chunk.js", + "./static/js/150.cb61bec3.chunk.js": "/react/build/./static/js/150.cb61bec3.chunk.js", + "./static/js/151.cbc2c0c6.chunk.js": "/react/build/./static/js/151.cbc2c0c6.chunk.js", + "./static/js/152.b40350c9.chunk.js": "/react/build/./static/js/152.b40350c9.chunk.js", + "./static/js/153.244cf7c3.chunk.js": "/react/build/./static/js/153.244cf7c3.chunk.js", + "./static/js/154.b75a8647.chunk.js": "/react/build/./static/js/154.b75a8647.chunk.js", + "./static/js/155.59bc01ea.chunk.js": "/react/build/./static/js/155.59bc01ea.chunk.js", + "./static/js/156.e094e402.chunk.js": "/react/build/./static/js/156.e094e402.chunk.js", + "./static/js/157.d5628ed4.chunk.js": "/react/build/./static/js/157.d5628ed4.chunk.js", + "./static/js/158.1db4b932.chunk.js": "/react/build/./static/js/158.1db4b932.chunk.js", + "./static/js/159.ffe647a5.chunk.js": "/react/build/./static/js/159.ffe647a5.chunk.js", + "./static/js/160.f7af3ddb.chunk.js": "/react/build/./static/js/160.f7af3ddb.chunk.js", + "./static/js/161.0ed3a0a7.chunk.js": "/react/build/./static/js/161.0ed3a0a7.chunk.js", + "./static/js/162.281bd799.chunk.js": "/react/build/./static/js/162.281bd799.chunk.js", + "./static/js/163.bf48f207.chunk.js": "/react/build/./static/js/163.bf48f207.chunk.js", + "./static/js/164.844ca7ff.chunk.js": "/react/build/./static/js/164.844ca7ff.chunk.js", + "./static/js/165.b8bb319f.chunk.js": "/react/build/./static/js/165.b8bb319f.chunk.js", + "./static/js/166.96fbaade.chunk.js": "/react/build/./static/js/166.96fbaade.chunk.js", + "./static/js/167.81eb918c.chunk.js": "/react/build/./static/js/167.81eb918c.chunk.js", + "./static/js/168.39ae77ca.chunk.js": "/react/build/./static/js/168.39ae77ca.chunk.js", + "./static/js/169.a7df60fd.chunk.js": "/react/build/./static/js/169.a7df60fd.chunk.js", + "./static/js/170.37d7c055.chunk.js": "/react/build/./static/js/170.37d7c055.chunk.js", + "./static/js/171.10ff6133.chunk.js": "/react/build/./static/js/171.10ff6133.chunk.js", + "./static/js/172.02e58187.chunk.js": "/react/build/./static/js/172.02e58187.chunk.js", + "./static/js/173.d1250841.chunk.js": "/react/build/./static/js/173.d1250841.chunk.js", + "./static/js/174.98e10a93.chunk.js": "/react/build/./static/js/174.98e10a93.chunk.js", + "./static/js/175.4394df40.chunk.js": "/react/build/./static/js/175.4394df40.chunk.js", + "./static/js/176.ff91d553.chunk.js": "/react/build/./static/js/176.ff91d553.chunk.js", + "./static/js/177.6e37f804.chunk.js": "/react/build/./static/js/177.6e37f804.chunk.js", + "./static/js/178.3112a1d6.chunk.js": "/react/build/./static/js/178.3112a1d6.chunk.js", + "./static/js/179.7be99d52.chunk.js": "/react/build/./static/js/179.7be99d52.chunk.js", + "./static/js/180.5be8f3d4.chunk.js": "/react/build/./static/js/180.5be8f3d4.chunk.js", + "./static/js/181.3bf2cc9e.chunk.js": "/react/build/./static/js/181.3bf2cc9e.chunk.js", + "./static/js/182.0c9bcb00.chunk.js": "/react/build/./static/js/182.0c9bcb00.chunk.js", + "./static/js/183.9e37d31f.chunk.js": "/react/build/./static/js/183.9e37d31f.chunk.js", + "./static/js/184.d0c38225.chunk.js": "/react/build/./static/js/184.d0c38225.chunk.js", + "./static/js/185.b5efa2ec.chunk.js": "/react/build/./static/js/185.b5efa2ec.chunk.js", + "./static/js/186.a260669f.chunk.js": "/react/build/./static/js/186.a260669f.chunk.js", + "./static/js/187.e1aac1fc.chunk.js": "/react/build/./static/js/187.e1aac1fc.chunk.js", + "./static/js/188.501e32b5.chunk.js": "/react/build/./static/js/188.501e32b5.chunk.js", + "./static/js/189.d54e68dc.chunk.js": "/react/build/./static/js/189.d54e68dc.chunk.js", + "./static/js/190.b7ecd4db.chunk.js": "/react/build/./static/js/190.b7ecd4db.chunk.js", + "./static/js/191.bd163b89.chunk.js": "/react/build/./static/js/191.bd163b89.chunk.js", + "./static/js/192.d4d79725.chunk.js": "/react/build/./static/js/192.d4d79725.chunk.js", + "./static/js/193.37e18b9e.chunk.js": "/react/build/./static/js/193.37e18b9e.chunk.js", + "./static/js/194.ddf2ba5c.chunk.js": "/react/build/./static/js/194.ddf2ba5c.chunk.js", + "./static/js/195.bb701d31.chunk.js": "/react/build/./static/js/195.bb701d31.chunk.js", + "./static/js/196.60c6a7de.chunk.js": "/react/build/./static/js/196.60c6a7de.chunk.js", + "./static/js/197.bd678c9c.chunk.js": "/react/build/./static/js/197.bd678c9c.chunk.js", + "./static/js/198.d0fe1696.chunk.js": "/react/build/./static/js/198.d0fe1696.chunk.js", + "./static/js/199.045592c0.chunk.js": "/react/build/./static/js/199.045592c0.chunk.js", + "./static/js/200.0e1acb9c.chunk.js": "/react/build/./static/js/200.0e1acb9c.chunk.js", + "./static/js/201.5acd736a.chunk.js": "/react/build/./static/js/201.5acd736a.chunk.js", + "./static/js/202.6b2ead7f.chunk.js": "/react/build/./static/js/202.6b2ead7f.chunk.js", + "./static/js/203.e9e7d3ce.chunk.js": "/react/build/./static/js/203.e9e7d3ce.chunk.js", + "./static/js/204.5fe6667b.chunk.js": "/react/build/./static/js/204.5fe6667b.chunk.js", + "./static/js/205.0c499f8d.chunk.js": "/react/build/./static/js/205.0c499f8d.chunk.js", + "./static/js/206.74b3f3c4.chunk.js": "/react/build/./static/js/206.74b3f3c4.chunk.js", + "main.css": "/react/build/static/css/main.4ba9c42e.chunk.css", + "main.js": "/react/build/./static/js/main.43bd7abd.chunk.js", + "runtime~main.js": "/react/build/./static/js/runtime~main.87af1e5f.js", + "./static/js/129.d544b3d1.chunk.js.LICENSE.txt": "/react/build/./static/js/129.d544b3d1.chunk.js.LICENSE.txt", + "./static/js/159.ffe647a5.chunk.js.LICENSE.txt": "/react/build/./static/js/159.ffe647a5.chunk.js.LICENSE.txt", + "./static/js/201.5acd736a.chunk.js.LICENSE.txt": "/react/build/./static/js/201.5acd736a.chunk.js.LICENSE.txt", + "./static/js/33.797d8de2.chunk.js.LICENSE.txt": "/react/build/./static/js/33.797d8de2.chunk.js.LICENSE.txt", + "./static/js/35.9d635066.chunk.js.LICENSE.txt": "/react/build/./static/js/35.9d635066.chunk.js.LICENSE.txt", + "./static/js/5.ab9433b7.chunk.js.LICENSE.txt": "/react/build/./static/js/5.ab9433b7.chunk.js.LICENSE.txt", + "./static/js/8.460c5da9.chunk.js.LICENSE.txt": "/react/build/./static/js/8.460c5da9.chunk.js.LICENSE.txt", + "./static/js/main.43bd7abd.chunk.js.LICENSE.txt": "/react/build/./static/js/main.43bd7abd.chunk.js.LICENSE.txt", "css.worker.js": "/react/build/css.worker.js", "editor.worker.js": "/react/build/editor.worker.js", "html.worker.js": "/react/build/html.worker.js", "index.html": "/react/build/index.html", "json.worker.js": "/react/build/json.worker.js", + "static/media/Index.scss": "/react/build/static/media/typebg.b2b0ea32.png", + "static/media/2-2-1.png": "/react/build/static/media/2-2-1.afd0f2f5.png", + "static/media/2-2-2.png": "/react/build/static/media/2-2-2.26bc3301.png", + "static/media/2-2-3.png": "/react/build/static/media/2-2-3.6d6ce99c.png", + "static/media/2-2-head.png": "/react/build/static/media/2-2-head.5e69dbb2.png", + "static/media/2-3-1.png": "/react/build/static/media/2-3-1.bcb33d47.png", + "static/media/2-3-2.png": "/react/build/static/media/2-3-2.84718f27.png", + "static/media/2-3-3.png": "/react/build/static/media/2-3-3.db9fe021.png", + "static/media/2-3-4.png": "/react/build/static/media/2-3-4.15673036.png", + "static/media/2-6-1.png": "/react/build/static/media/2-6-1.302b729e.png", + "static/media/2-6-2.png": "/react/build/static/media/2-6-2.b262b91e.png", + "static/media/3-1.png": "/react/build/static/media/3-1.9fdda521.png", + "static/media/3-2.png": "/react/build/static/media/3-2.47050941.png", + "static/media/3-3.png": "/react/build/static/media/3-3.c767aae7.png", + "static/media/3-4.png": "/react/build/static/media/3-4.92820cbc.png", + "static/media/34@2x.png": "/react/build/static/media/34@2x.ed8e5910.png", + "static/media/35@2x.png": "/react/build/static/media/35@2x.33462edc.png", + "static/media/36@2x.png": "/react/build/static/media/36@2x.8f54f5ba.png", + "static/media/37@2x.png": "/react/build/static/media/37@2x.97a40a2a.png", + "static/media/38@2x.png": "/react/build/static/media/38@2x.f072fe68.png", + "static/media/39@2x.png": "/react/build/static/media/39@2x.ee1af05a.png", + "static/media/4-1.png": "/react/build/static/media/4-1.79fa159d.png", + "static/media/4-2.png": "/react/build/static/media/4-2.9c066e75.png", + "static/media/4-3.png": "/react/build/static/media/4-3.a1487a5b.png", + "static/media/4-4.png": "/react/build/static/media/4-4.5eb40734.png", + "static/media/40@2x.png": "/react/build/static/media/40@2x.f10a55e2.png", + "static/media/42@2x.png": "/react/build/static/media/42@2x.25d6b5fd.png", + "static/media/44@2x.png": "/react/build/static/media/44@2x.1374baf9.png", + "static/media/46@2x.png": "/react/build/static/media/46@2x.e272d43e.png", + "static/media/48@2x.png": "/react/build/static/media/48@2x.3bde4de9.png", + "static/media/49.png": "/react/build/static/media/49.b03e6efe.png", + "static/media/50@2x.png": "/react/build/static/media/50@2x.69b76634.png", + "static/media/52@2x.png": "/react/build/static/media/52@2x.41805cbb.png", + "static/media/55@2x.png": "/react/build/static/media/55@2x.83486b73.png", + "static/media/57@2x.png": "/react/build/static/media/57@2x.8dc6b0b8.png", + "static/media/59@2x.png": "/react/build/static/media/59@2x.b0884ef0.png", + "static/media/61@2x.png": "/react/build/static/media/61@2x.99d3cc3e.png", + "static/media/63@2x.png": "/react/build/static/media/63@2x.49f389b9.png", + "static/media/65@2x.png": "/react/build/static/media/65@2x.ef33e2f9.png", + "static/media/67@2x.png": "/react/build/static/media/67@2x.4a4f4b6c.png", + "static/media/69@2x.png": "/react/build/static/media/69@2x.379c6a82.png", + "static/media/BJHKHT.png": "/react/build/static/media/BJHKHT.f065403a.png", + "static/media/CEC.png": "/react/build/static/media/CEC.3b748059.png", + "static/media/GFKJ.png": "/react/build/static/media/GFKJ.eb30c414.png", + "static/media/HSKY.png": "/react/build/static/media/HSKY.2e76ba44.png", + "static/media/ISCAS.png": "/react/build/static/media/ISCAS.851fcfda.png", + "static/media/KYRJLM.png": "/react/build/static/media/KYRJLM.2d659e5c.png", "static/media/katex.min.css": "/react/build/static/media/KaTeX_Typewriter-Regular.d3c8e68f.woff", - "static/media/banner_list.jpg": "/react/build/static/media/banner_list.e02c5e16.jpg", - "static/media/beijintulogontwo.png": "/react/build/static/media/beijintulogontwo.41076faf.png", - "static/media/logo.png": "/react/build/static/media/logo.1c60f36c.png", + "static/media/LC.png": "/react/build/static/media/LC.f247fdb8.png", + "static/media/LSLM.png": "/react/build/static/media/LSLM.99387946.png", + "static/media/ML.png": "/react/build/static/media/ML.08d278e2.png", + "static/media/NJDX.png": "/react/build/static/media/NJDX.bb34b326.png", + "static/media/QH.png": "/react/build/static/media/QH.b57a0131.png", + "static/media/SHJT.png": "/react/build/static/media/SHJT.426bf0c7.png", + "static/media/TX.png": "/react/build/static/media/TX.b703476c.png", + "static/media/WXYJY.png": "/react/build/static/media/WXYJY.21e40191.png", + "static/media/XH.png": "/react/build/static/media/XH.a0a88f17.png", + "static/media/XJY.png": "/react/build/static/media/XJY.b4c57bf1.png", + "static/media/YKD.png": "/react/build/static/media/YKD.4f7e2766.png", + "static/media/ZC.png": "/react/build/static/media/ZC.ad056aa5.png", + "static/media/achievements.png": "/react/build/static/media/achievements.f20b7e39.png", + "static/media/index.scss": "/react/build/static/media/time-bg.c9372737.png", + "static/media/ball.png": "/react/build/static/media/ball.24214b6e.png", + "static/media/AboutUs.scss": "/react/build/static/media/joinUs.26ec28cd.png", + "static/media/banner.png": "/react/build/static/media/banner.f7da2db1.png", + "static/media/beijing.png": "/react/build/static/media/beijing.bfcd5b0e.png", + "static/media/LoginRegisterPage.scss": "/react/build/static/media/rightBg.55f14f0c.png", + "static/media/bgPng.png": "/react/build/static/media/bgPng.ed010245.png", + "static/media/bug-red.svg": "/react/build/static/media/bug-red.f6f13b0a.svg", + "static/media/bug.svg": "/react/build/static/media/bug.e9f26f65.svg", + "static/media/ccf_logo.png": "/react/build/static/media/ccf_logo.a54fdc70.png", + "static/media/ccf_logo1.png": "/react/build/static/media/ccf_logo1.be10ead7.png", + "static/media/codeafter.png": "/react/build/static/media/codeafter.c3088c74.png", + "static/media/codesmell.svg": "/react/build/static/media/codesmell.a8c1c3c1.svg", + "static/media/computer.png": "/react/build/static/media/computer.4fe86b12.png", + "static/media/earth.png": "/react/build/static/media/earth.050b1435.png", + "static/media/fun1.png": "/react/build/static/media/fun1.c99ffa49.png", + "static/media/fun2.png": "/react/build/static/media/fun2.12f22bca.png", + "static/media/fun3.png": "/react/build/static/media/fun3.75c280e6.png", + "static/media/fun4.png": "/react/build/static/media/fun4.f499794e.png", + "static/media/fun5.png": "/react/build/static/media/fun5.96b44942.png", + "static/media/gitlink1.png": "/react/build/static/media/gitlink1.4bf0ed96.png", + "static/media/gitlink2.png": "/react/build/static/media/gitlink2.0ec0ec22.png", + "static/media/head.png": "/react/build/static/media/head.52aa3fc8.png", + "static/media/help.png": "/react/build/static/media/help.0bfb2587.png", + "static/media/help_bg.png": "/react/build/static/media/help_bg.23e22049.png", + "static/media/huake.png": "/react/build/static/media/huake.63b6a34d.png", + "static/media/huawei.png": "/react/build/static/media/huawei.73ec7c22.png", + "static/media/Teaching.scss": "/react/build/static/media/image22.d4d77f6c.svg", + "static/media/img1.png": "/react/build/static/media/img1.e0beda57.png", + "static/media/img10.png": "/react/build/static/media/img10.64149a3d.png", + "static/media/img15.png": "/react/build/static/media/img15.87a3556c.png", + "static/media/img16.png": "/react/build/static/media/img16.32badab9.png", + "static/media/img17.png": "/react/build/static/media/img17.c25d5edc.png", + "static/media/img18.png": "/react/build/static/media/img18.4963efc1.png", + "static/media/img2.png": "/react/build/static/media/img2.ae303051.png", + "static/media/img3.png": "/react/build/static/media/img3.cee3ac5b.png", + "static/media/img4.png": "/react/build/static/media/img4.53c937cb.png", + "static/media/img5.png": "/react/build/static/media/img5.ca3a2287.png", + "static/media/img6.png": "/react/build/static/media/img6.8f81bf78.png", + "static/media/img7.png": "/react/build/static/media/img7.e4a68e6e.png", + "static/media/img8.png": "/react/build/static/media/img8.10500e00.png", + "static/media/img9.png": "/react/build/static/media/img9.d25372ba.png", + "static/media/introduce.png": "/react/build/static/media/introduce.1d68f199.png", + "static/media/jijinhui.png": "/react/build/static/media/jijinhui.041fb524.png", + "static/media/lightspot1.png": "/react/build/static/media/lightspot1.9214f0ae.png", + "static/media/lightspot2.png": "/react/build/static/media/lightspot2.b7053786.png", + "static/media/lightspot3.png": "/react/build/static/media/lightspot3.2f8af8da.png", + "static/media/lightspot4.png": "/react/build/static/media/lightspot4.93769763.png", + "static/media/logo.png": "/react/build/static/media/logo.62af9fee.png", + "static/media/logo.svg": "/react/build/static/media/logo.f0d4927b.svg", + "static/media/logo1.png": "/react/build/static/media/logo1.ec3c2e67.png", + "static/media/logo2.png": "/react/build/static/media/logo2.b04c07f2.png", + "static/media/mulan.png": "/react/build/static/media/mulan.690d2289.png", + "static/media/qqChat.png": "/react/build/static/media/qqChat.9e56cc22.png", + "static/media/quality.svg": "/react/build/static/media/quality.053b1b15.svg", + "static/media/semibold.svg": "/react/build/static/media/semibold.2a4e7ea4.svg", + "static/media/slick-theme.css": "/react/build/static/media/slick.c94f7671.ttf", + "static/media/sponsor11.png": "/react/build/static/media/sponsor11.5e9da48d.png", + "static/media/sponsor21.png": "/react/build/static/media/sponsor21.8a655acc.png", + "static/media/sponsor22.png": "/react/build/static/media/sponsor22.96e2b643.png", + "static/media/sponsor31.png": "/react/build/static/media/sponsor31.0fd95bcb.png", + "static/media/sponsor33.png": "/react/build/static/media/sponsor33.27be3b2d.png", + "static/media/studentProject.png": "/react/build/static/media/studentProject.d14e51c5.png", + "static/media/subtitle.png": "/react/build/static/media/subtitle.5019e086.png", + "static/media/teacher-img.png": "/react/build/static/media/teacher-img.1261f6b3.png", + "static/media/xigongye.png": "/react/build/static/media/xigongye.d51231d3.png", + "static/media/xiuos.png": "/react/build/static/media/xiuos.67682257.png", + "static/media/xjy.png": "/react/build/static/media/xjy.6e62f4d6.png", + "static/media/浙江大学.png": "/react/build/static/media/浙江大学.3c545e69.png", "ts.worker.js": "/react/build/ts.worker.js", "ts.worker.js.LICENSE.txt": "/react/build/ts.worker.js.LICENSE.txt" } \ No newline at end of file diff --git a/assets/kindeditor/kindeditor.js b/assets/kindeditor/kindeditor.js index 1df0f835a..9e72f7c33 100644 --- a/assets/kindeditor/kindeditor.js +++ b/assets/kindeditor/kindeditor.js @@ -1,6272 +1,6272 @@ -//function dump_obj(myObject) { -// var s = ""; -// for (var property in myObject) { -// s = s + "\n "+property +": " + myObject[property] ; -// } -// alert(s) -/******************************************************************************* -* KindEditor - WYSIWYG HTML Editor for Internet -* Copyright (C) 2006-2013 kindsoft.net -* -* @author Roddy -* @website http://www.kindsoft.net/ -* @licence http://www.kindsoft.net/license.php -* @version 4.1.10 (2013-11-23) -*******************************************************************************/ -(function (window, undefined) { - if (window.KindEditor) { - return; - } -if (!window.console) { - window.console = {}; -} -if (!console.log) { - console.log = function () {}; -} -var _VERSION = '4.1.10 (2013-11-23)', - _ua = navigator.userAgent.toLowerCase(), - _IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1, - _NEWIE = _ua.indexOf('msie') == -1 && _ua.indexOf('trident') > -1, - _GECKO = _ua.indexOf('gecko') > -1 && _ua.indexOf('khtml') == -1, - _WEBKIT = _ua.indexOf('applewebkit') > -1, - _OPERA = _ua.indexOf('opera') > -1, - _MOBILE = _ua.indexOf('mobile') > -1, - _IOS = /ipad|iphone|ipod/.test(_ua), - _QUIRKS = document.compatMode != 'CSS1Compat', - _IERANGE = !window.getSelection, - _matches = /(?:msie|firefox|webkit|opera)[\/:\s](\d+)/.exec(_ua), - _V = _matches ? _matches[1] : '0', - _TIME = new Date().getTime(); -function _isArray(val) { - if (!val) { - return false; - } - return Object.prototype.toString.call(val) === '[object Array]'; -} -function _isFunction(val) { - if (!val) { - return false; - } - return Object.prototype.toString.call(val) === '[object Function]'; -} -function _inArray(val, arr) { - for (var i = 0, len = arr.length; i < len; i++) { - if (val === arr[i]) { - return i; - } - } - return -1; -} -function _each(obj, fn) { - if (_isArray(obj)) { - for (var i = 0, len = obj.length; i < len; i++) { - if (fn.call(obj[i], i, obj[i]) === false) { - break; - } - } - } else { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - if (fn.call(obj[key], key, obj[key]) === false) { - break; - } - } - } - } -} -function _trim(str) { - return str.replace(/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, ''); -} -function _inString(val, str, delimiter) { - delimiter = delimiter === undefined ? ',' : delimiter; - return (delimiter + str + delimiter).indexOf(delimiter + val + delimiter) >= 0; -} -function _addUnit(val, unit) { - unit = unit || 'px'; - //return val && /^\d+$/.test(val) ? val + unit : val; - return val && /^-?\d+(?:\.\d+)?$/.test(val) ? val + unit : val; -} -function _removeUnit(val) { - var match; - return val && (match = /(\d+)/.exec(val)) ? parseInt(match[1], 10) : 0; -} -function _escape(val) { - return val.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); -} -function _unescape(val) { - return val.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/&/g, '&'); -} -function _toCamel(str) { - var arr = str.split('-'); - str = ''; - _each(arr, function(key, val) { - str += (key > 0) ? val.charAt(0).toUpperCase() + val.substr(1) : val; - }); - return str; -} -function _toHex(val) { - function hex(d) { - var s = parseInt(d, 10).toString(16).toUpperCase(); - return s.length > 1 ? s : '0' + s; - } - return val.replace(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/ig, - function($0, $1, $2, $3) { - return '#' + hex($1) + hex($2) + hex($3); - } - ); -} -function _toMap(val, delimiter) { - delimiter = delimiter === undefined ? ',' : delimiter; - var map = {}, arr = _isArray(val) ? val : val.split(delimiter), match; - _each(arr, function(key, val) { - if ((match = /^(\d+)\.\.(\d+)$/.exec(val))) { - for (var i = parseInt(match[1], 10); i <= parseInt(match[2], 10); i++) { - map[i.toString()] = true; - } - } else { - map[val] = true; - } - }); - return map; -} -function _toArray(obj, offset) { - return Array.prototype.slice.call(obj, offset || 0); -} -function _undef(val, defaultVal) { - return val === undefined ? defaultVal : val; -} -function _invalidUrl(url) { - return !url || /[<>"]/.test(url); -} -function _addParam(url, param) { - return url.indexOf('?') >= 0 ? url + '&' + param : url + '?' + param; -} -function _extend(child, parent, proto) { - if (!proto) { - proto = parent; - parent = null; - } - var childProto; - if (parent) { - var fn = function () {}; - fn.prototype = parent.prototype; - childProto = new fn(); - _each(proto, function(key, val) { - childProto[key] = val; - }); - } else { - childProto = proto; - } - childProto.constructor = child; - child.prototype = childProto; - child.parent = parent ? parent.prototype : null; -} -function _json(text) { - var match; - if ((match = /\{[\s\S]*\}|\[[\s\S]*\]/.exec(text))) { - text = match[0]; - } - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - if (/^[\],:{}\s]*$/. - test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). - replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). - replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - return eval('(' + text + ')'); - } - throw 'JSON parse error'; -} -var _round = Math.round; -var K = { - DEBUG : false, - VERSION : _VERSION, - IE : _IE, - GECKO : _GECKO, - WEBKIT : _WEBKIT, - OPERA : _OPERA, - V : _V, - TIME : _TIME, - each : _each, - isArray : _isArray, - isFunction : _isFunction, - inArray : _inArray, - inString : _inString, - trim : _trim, - addUnit : _addUnit, - removeUnit : _removeUnit, - escape : _escape, - unescape : _unescape, - toCamel : _toCamel, - toHex : _toHex, - toMap : _toMap, - toArray : _toArray, - undef : _undef, - invalidUrl : _invalidUrl, - addParam : _addParam, - extend : _extend, - json : _json -}; -var _INLINE_TAG_MAP = _toMap('a,abbr,acronym,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,img,input,ins,kbd,label,map,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'), - _BLOCK_TAG_MAP = _toMap('address,applet,blockquote,body,center,dd,dir,div,dl,dt,fieldset,form,frameset,h1,h2,h3,h4,h5,h6,head,hr,html,iframe,ins,isindex,li,map,menu,meta,noframes,noscript,object,ol,p,pre,script,style,table,tbody,td,tfoot,th,thead,title,tr,ul'), - _SINGLE_TAG_MAP = _toMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed'), - _STYLE_TAG_MAP = _toMap('b,basefont,big,del,em,font,i,s,small,span,strike,strong,sub,sup,u'), - _CONTROL_TAG_MAP = _toMap('img,table,input,textarea,button'), - _PRE_TAG_MAP = _toMap('pre,style,script'), - _NOSPLIT_TAG_MAP = _toMap('html,head,body,td,tr,table,ol,ul,li'), - _AUTOCLOSE_TAG_MAP = _toMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'), - _FILL_ATTR_MAP = _toMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'), - _VALUE_TAG_MAP = _toMap('input,button,textarea,select'); -// Begining of modification by Macrow -function _getBasePath() { - var refPath = '/assets/kindeditor/'; - var els = document.getElementsByTagName('script'), src; - for (var i = 0, len = els.length; i < len; i++) { - src = els[i].src || ''; - if (/(kindeditor|application)[\w\-\.]*\.js/.test(src)) { - return src.substring(0, src.indexOf('assets')) + refPath; - } - } - return refPath; -} -// End of modification by Macrow -K.basePath = _getBasePath(); -K.options = { - placeholder : '', - local_storage_mdu : '', - local_storage_id : '', - designMode : true, - fullscreenMode : false, - filterMode : true, - wellFormatMode : true, - shadowMode : true, - loadStyleMode : true, - basePath : K.basePath, - emotionsBasePath: '', //TODO http://forge.trustie.net - themesPath : K.basePath + 'themes/', - langPath : K.basePath + 'lang/', - pluginsPath : K.basePath + 'plugins/', - themeType : 'default', - langType : 'zh_CN', - urlType : '', - newlineTag : 'p', - resizeType : 1, - syncType : 'form', - pasteType : 2, - dialogAlignType : 'page', - useContextmenu : true, - fullscreenShortcut : false, - bodyClass : 'ke-content', - indentChar : '\t', - cssPath : K.basePath +'plugins/code/previewcode.css', - cssData : 'font{color:black;}', - minWidth : 650, - minHeight : 100, - minChangeSize : 1, - zIndex : 811213, - items : ['code','emoticons','fontname', - 'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|', - 'formatblock', 'fontsize', '|','indent', 'outdent', - '|','imagedirectupload','table', 'media', 'preview',"more" - ], - noDisableItems : ['source', 'fullscreen'], - colorTable : [ - ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'], - ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'], - ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'], - ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000'] - ], - fontSizeTable : ['选中的字体大小:','9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px'], - htmlTags : { - font : ['id', 'class', 'color', 'size', 'face', '.background-color'], - span : [ - 'id', 'class', '.color', '.background-color', '.font-size', '.font-family', '.background', - '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height', 'data-user-id' - ], - div : [ - 'id', 'class', 'align', '.border', '.margin', '.padding', '.text-align', '.color', - '.background-color', '.font-size', '.font-family', '.font-weight', '.background', - '.font-style', '.text-decoration', '.vertical-align', '.margin-left' - ], - table: [ - 'id', 'class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor', - '.padding', '.margin', '.border','.border-color', 'bgcolor', '.text-align', '.color', '.background-color', - '.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background', - '.width', '.height', '.border-collapse','.table-layout' - ], - 'td,th': [ - 'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor', - '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight', - '.font-style', '.text-decoration', '.vertical-align', '.background', '.border','.border-color', '.text-overflow','.overflow','.white-space' - ], - a : ['id', 'class', 'href', 'target', 'name','data-method','data-remote','rel'], - embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], - img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'], - 'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [ - 'id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background', - '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left', '.margin', '.border', '.padding' - ], - pre : ['id', 'class'], - hr : ['id', 'class', '.page-break-after'], - 'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del' : ['id', 'class'], - iframe : ['id', 'class', 'src', 'frameborder', 'width', 'height', '.width', '.height'] - }, - layout : '
' -}; -var _useCapture = false; -var _INPUT_KEY_MAP = _toMap('8,9,13,32,46,48..57,59,61,65..90,106,109..111,188,190..192,219..222'); -var _CURSORMOVE_KEY_MAP = _toMap('33..40'); -var _CHANGE_KEY_MAP = {}; -_each(_INPUT_KEY_MAP, function(key, val) { - _CHANGE_KEY_MAP[key] = val; -}); -_each(_CURSORMOVE_KEY_MAP, function(key, val) { - _CHANGE_KEY_MAP[key] = val; -}); -function _bindEvent(el, type, fn) { - if (el.addEventListener){ - el.addEventListener(type, fn, _useCapture); - } else if (el.attachEvent){ - el.attachEvent('on' + type, fn); - } -} -function _unbindEvent(el, type, fn) { - if (el.removeEventListener){ - el.removeEventListener(type, fn, _useCapture); - } else if (el.detachEvent){ - el.detachEvent('on' + type, fn); - } -} -var _EVENT_PROPS = ('altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,' + - 'data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,originalTarget,pageX,' + - 'pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which').split(','); -function KEvent(el, event) { - this.init(el, event); -} -_extend(KEvent, { - init : function(el, event) { - var self = this, doc = el.ownerDocument || el.document || el; - self.event = event; - _each(_EVENT_PROPS, function(key, val) { - self[val] = event[val]; - }); - if (!self.target) { - self.target = self.srcElement || doc; - } - if (self.target.nodeType === 3) { - self.target = self.target.parentNode; - } - if (!self.relatedTarget && self.fromElement) { - self.relatedTarget = self.fromElement === self.target ? self.toElement : self.fromElement; - } - if (self.pageX == null && self.clientX != null) { - var d = doc.documentElement, body = doc.body; - self.pageX = self.clientX + (d && d.scrollLeft || body && body.scrollLeft || 0) - (d && d.clientLeft || body && body.clientLeft || 0); - self.pageY = self.clientY + (d && d.scrollTop || body && body.scrollTop || 0) - (d && d.clientTop || body && body.clientTop || 0); - } - if (!self.which && ((self.charCode || self.charCode === 0) ? self.charCode : self.keyCode)) { - self.which = self.charCode || self.keyCode; - } - if (!self.metaKey && self.ctrlKey) { - self.metaKey = self.ctrlKey; - } - if (!self.which && self.button !== undefined) { - self.which = (self.button & 1 ? 1 : (self.button & 2 ? 3 : (self.button & 4 ? 2 : 0))); - } - switch (self.which) { - case 186 : - self.which = 59; - break; - case 187 : - case 107 : - case 43 : - self.which = 61; - break; - case 189 : - case 45 : - self.which = 109; - break; - case 42 : - self.which = 106; - break; - case 47 : - self.which = 111; - break; - case 78 : - self.which = 110; - break; - } - if (self.which >= 96 && self.which <= 105) { - self.which -= 48; - } - }, - preventDefault : function() { - var ev = this.event; - if (ev.preventDefault) { - ev.preventDefault(); - } else { - ev.returnValue = false; - } - }, - stopPropagation : function() { - var ev = this.event; - if (ev.stopPropagation) { - ev.stopPropagation(); - } else { - ev.cancelBubble = true; - } - }, - stop : function() { - this.preventDefault(); - this.stopPropagation(); - } -}); -var _eventExpendo = 'kindeditor_' + _TIME, _eventId = 0, _eventData = {}; -function _getId(el) { - return el[_eventExpendo] || null; -} -function _setId(el) { - el[_eventExpendo] = ++_eventId; - return _eventId; -} -function _removeId(el) { - try { - delete el[_eventExpendo]; - } catch(e) { - if (el.removeAttribute) { - el.removeAttribute(_eventExpendo); - } - } -} -function _bind(el, type, fn) { - if (type.indexOf(',') >= 0) { - _each(type.split(','), function() { - _bind(el, this, fn); - }); - return; - } - var id = _getId(el); - if (!id) { - id = _setId(el); - } - if (_eventData[id] === undefined) { - _eventData[id] = {}; - } - var events = _eventData[id][type]; - if (events && events.length > 0) { - _unbindEvent(el, type, events[0]); - } else { - _eventData[id][type] = []; - _eventData[id].el = el; - } - events = _eventData[id][type]; - if (events.length === 0) { - events[0] = function(e) { - var kevent = e ? new KEvent(el, e) : undefined; - _each(events, function(i, event) { - if (i > 0 && event) { - event.call(el, kevent); - } - }); - }; - } - if (_inArray(fn, events) < 0) { - events.push(fn); - } - _bindEvent(el, type, events[0]); -} -function _unbind(el, type, fn) { - if (type && type.indexOf(',') >= 0) { - _each(type.split(','), function() { - _unbind(el, this, fn); - }); - return; - } - var id = _getId(el); - if (!id) { - return; - } - if (type === undefined) { - if (id in _eventData) { - _each(_eventData[id], function(key, events) { - if (key != 'el' && events.length > 0) { - _unbindEvent(el, key, events[0]); - } - }); - delete _eventData[id]; - _removeId(el); - } - return; - } - if (!_eventData[id]) { - return; - } - var events = _eventData[id][type]; - if (events && events.length > 0) { - if (fn === undefined) { - _unbindEvent(el, type, events[0]); - delete _eventData[id][type]; - } else { - _each(events, function(i, event) { - if (i > 0 && event === fn) { - events.splice(i, 1); - } - }); - if (events.length == 1) { - _unbindEvent(el, type, events[0]); - delete _eventData[id][type]; - } - } - var count = 0; - _each(_eventData[id], function() { - count++; - }); - if (count < 2) { - delete _eventData[id]; - _removeId(el); - } - } -} -function _fire(el, type) { - if (type.indexOf(',') >= 0) { - _each(type.split(','), function() { - _fire(el, this); - }); - return; - } - var id = _getId(el); - if (!id) { - return; - } - var events = _eventData[id][type]; - if (_eventData[id] && events && events.length > 0) { - events[0](); - } -} -function _ctrl(el, key, fn) { - var self = this; - key = /^\d{2,}$/.test(key) ? key : key.toUpperCase().charCodeAt(0); - _bind(el, 'keydown', function(e) { - if (e.ctrlKey && e.which == key && !e.shiftKey && !e.altKey) { - fn.call(el); - e.stop(); - } - }); -} -var _readyFinished = false; -function _ready(fn) { - if (_readyFinished) { - fn(KindEditor); - return; - } - var loaded = false; - function readyFunc() { - if (!loaded) { - loaded = true; - fn(KindEditor); - _readyFinished = true; - } - } - function ieReadyFunc() { - if (!loaded) { - try { - document.documentElement.doScroll('left'); - } catch(e) { - setTimeout(ieReadyFunc, 100); - return; - } - readyFunc(); - } - } - function ieReadyStateFunc() { - if (document.readyState === 'complete') { - readyFunc(); - } - } - if (document.addEventListener) { - _bind(document, 'DOMContentLoaded', readyFunc); - } else if (document.attachEvent) { - _bind(document, 'readystatechange', ieReadyStateFunc); - var toplevel = false; - try { - toplevel = window.frameElement == null; - } catch(e) {} - if (document.documentElement.doScroll && toplevel) { - ieReadyFunc(); - } - } - _bind(window, 'load', readyFunc); -} -if (window.attachEvent) { - window.attachEvent('onunload', function() { - _each(_eventData, function(key, events) { - if (events.el) { - _unbind(events.el); - } - }); - }); -} -K.ctrl = _ctrl; -K.ready = _ready; -function _getCssList(css) { - var list = {}, - reg = /\s*([\w\-]+)\s*:([^;]*)(;|$)/g, - match; - while ((match = reg.exec(css))) { - var key = _trim(match[1].toLowerCase()), - val = _trim(_toHex(match[2])); - list[key] = val; - } - return list; -} -function _getAttrList(tag) { - var list = {}, - reg = /\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g, - match; - while ((match = reg.exec(tag))) { - var key = (match[1] || match[2] || match[4] || match[6]).toLowerCase(), - val = (match[2] ? match[3] : (match[4] ? match[5] : match[7])) || ''; - list[key] = val; - } - return list; -} -function _addClassToTag(tag, className) { - if (/\s+class\s*=/.test(tag)) { - tag = tag.replace(/(\s+class=["']?)([^"']*)(["']?[\s>])/, function($0, $1, $2, $3) { - if ((' ' + $2 + ' ').indexOf(' ' + className + ' ') < 0) { - return $2 === '' ? $1 + className + $3 : $1 + $2 + ' ' + className + $3; - } else { - return $0; - } - }); - } else { - tag = tag.substr(0, tag.length - 1) + ' class="' + className + '">'; - } - return tag; -} -function _formatCss(css) { - var str = ''; - _each(_getCssList(css), function(key, val) { - str += key + ':' + val + ';'; - }); - return str; -} -function _formatUrl(url, mode, host, pathname) { - mode = _undef(mode, '').toLowerCase(); - if (url.substr(0, 5) != 'data:') { - url = url.replace(/([^:])\/\//g, '$1/'); - } - if (_inArray(mode, ['absolute', 'relative', 'domain']) < 0) { - return url; - } - host = host || location.protocol + '//' + location.host; - if (pathname === undefined) { - var m = location.pathname.match(/^(\/.*)\//); - pathname = m ? m[1] : ''; - } - var match; - if ((match = /^(\w+:\/\/[^\/]*)/.exec(url))) { - if (match[1] !== host) { - return url; - } - } else if (/^\w+:/.test(url)) { - return url; - } - function getRealPath(path) { - var parts = path.split('/'), paths = []; - for (var i = 0, len = parts.length; i < len; i++) { - var part = parts[i]; - if (part == '..') { - if (paths.length > 0) { - paths.pop(); - } - } else if (part !== '' && part != '.') { - paths.push(part); - } - } - return '/' + paths.join('/'); - } - if (/^\//.test(url)) { - url = host + getRealPath(url.substr(1)); - } else if (!/^\w+:\/\//.test(url)) { - url = host + getRealPath(pathname + '/' + url); - } - function getRelativePath(path, depth) { - if (url.substr(0, path.length) === path) { - var arr = []; - for (var i = 0; i < depth; i++) { - arr.push('..'); - } - var prefix = '.'; - if (arr.length > 0) { - prefix += '/' + arr.join('/'); - } - if (pathname == '/') { - prefix += '/'; - } - return prefix + url.substr(path.length); - } else { - if ((match = /^(.*)\//.exec(path))) { - return getRelativePath(match[1], ++depth); - } - } - } - if (mode === 'relative') { - url = getRelativePath(host + pathname, 0).substr(2); - } else if (mode === 'absolute') { - if (url.substr(0, host.length) === host) { - url = url.substr(host.length); - } - } - return url; -} -function _formatHtml(html, htmlTags, urlType, wellFormatted, indentChar) { - if (html == null) { - html = ''; - } - urlType = urlType || ''; - wellFormatted = _undef(wellFormatted, false); - indentChar = _undef(indentChar, '\t'); - var fontSizeList = 'xx-small,x-small,small,medium,large,x-large,xx-large'.split(','); - html = html.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function($0, $1, $2, $3) { - return $1 + $2.replace(/<(?:br|br\s[^>]*)>/ig, '\n') + $3; - }); - html = html.replace(/<(?:br|br\s[^>]*)\s*\/?>\s*<\/p>/ig, '

'); - html = html.replace(/(<(?:p|p\s[^>]*)>)\s*(<\/p>)/ig, '$1
$2'); - html = html.replace(/\u200B/g, ''); - html = html.replace(/\u00A9/g, '©'); - html = html.replace(/\u00AE/g, '®'); - html = html.replace(/\u2003/g, ' '); - html = html.replace(/\u3000/g, ' '); - html = html.replace(/<[^>]+/g, function($0) { - return $0.replace(/\s+/g, ' '); - }); - var htmlTagMap = {}; - if (htmlTags) { - _each(htmlTags, function(key, val) { - var arr = key.split(','); - for (var i = 0, len = arr.length; i < len; i++) { - htmlTagMap[arr[i]] = _toMap(val); - } - }); - if (!htmlTagMap.script) { - html = html.replace(/(<(?:script|script\s[^>]*)>)([\s\S]*?)(<\/script>)/ig, ''); - } - if (!htmlTagMap.style) { - html = html.replace(/(<(?:style|style\s[^>]*)>)([\s\S]*?)(<\/style>)/ig, ''); - } - } - var re = /(\s*)<(\/)?([\w\-:]+)((?:\s+|(?:\s+[\w\-:]+)|(?:\s+[\w\-:]+=[^\s"'<>]+)|(?:\s+[\w\-:"]+="[^"]*")|(?:\s+[\w\-:"]+='[^']*'))*)(\/)?>(\s*)/g; - var tagStack = []; - html = html.replace(re, function($0, $1, $2, $3, $4, $5, $6) { - var full = $0, - startNewline = $1 || '', - startSlash = $2 || '', - tagName = $3.toLowerCase(), - attr = $4 || '', - endSlash = $5 ? ' ' + $5 : '', - endNewline = $6 || ''; - if (htmlTags && !htmlTagMap[tagName]) { - return ''; - } - if (endSlash === '' && _SINGLE_TAG_MAP[tagName]) { - endSlash = ' /'; - } - if (_INLINE_TAG_MAP[tagName]) { - if (startNewline) { - startNewline = ' '; - } - if (endNewline) { - endNewline = ' '; - } - } - if (_PRE_TAG_MAP[tagName]) { - if (startSlash) { - endNewline = '\n'; - } else { - startNewline = '\n'; - } - } - if (wellFormatted && tagName == 'br') { - endNewline = '\n'; - } - if (_BLOCK_TAG_MAP[tagName] && !_PRE_TAG_MAP[tagName]) { - if (wellFormatted) { - if (startSlash && tagStack.length > 0 && tagStack[tagStack.length - 1] === tagName) { - tagStack.pop(); - } else { - tagStack.push(tagName); - } - startNewline = '\n'; - endNewline = '\n'; - for (var i = 0, len = startSlash ? tagStack.length : tagStack.length - 1; i < len; i++) { - startNewline += indentChar; - if (!startSlash) { - endNewline += indentChar; - } - } - if (endSlash) { - tagStack.pop(); - } else if (!startSlash) { - endNewline += indentChar; - } - } else { - startNewline = endNewline = ''; - } - } - //blockquote 单独加上style 之后再改成接口 给别的加上默认的 - if (attr !== '' || (tagName === 'blockquote')) { - var attrMap = _getAttrList(full); - if (tagName === 'font') { - var fontStyleMap = {}, fontStyle = ''; - _each(attrMap, function(key, val) { - if (key === 'color') { - fontStyleMap.color = val; - delete attrMap[key]; - } - if (key === 'size') { - fontStyleMap['font-size'] = fontSizeList[parseInt(val, 10) - 1] || ''; - delete attrMap[key]; - } - if (key === 'face') { - fontStyleMap['font-family'] = val; - delete attrMap[key]; - } - if (key === 'style') { - fontStyle = val; - } - }); - if (fontStyle && !/;$/.test(fontStyle)) { - fontStyle += ';'; - } - _each(fontStyleMap, function(key, val) { - if (val === '') { - return; - } - if (/\s/.test(val)) { - val = "'" + val + "'"; - } - fontStyle += key + ':' + val + ';'; - }); - attrMap.style = fontStyle; - } - _each(attrMap, function(key, val) { - if (_FILL_ATTR_MAP[key]) { - attrMap[key] = key; - } - if (_inArray(key, ['src', 'href']) >= 0) { - attrMap[key] = _formatUrl(val, urlType); - } - if (htmlTags && key !== 'style' && !htmlTagMap[tagName]['*'] && !htmlTagMap[tagName][key] || - tagName === 'body' && key === 'contenteditable' || - /^kindeditor_\d+$/.test(key)) { - delete attrMap[key]; - } - if (key === 'style' && val !== '') { - var styleMap = _getCssList(val); - _each(styleMap, function(k, v) { - if (htmlTags && !htmlTagMap[tagName].style && !htmlTagMap[tagName]['.' + k]) { - delete styleMap[k]; - } - }); - var style = ''; - _each(styleMap, function(k, v) { - style += k + ':' + v + ';'; - }); - attrMap.style = style; - } - }); - attr = ''; - if (tagName === 'blockquote') { - attrMap['style'] = "margin: 0 0 0 40px; border: none; padding: 0px;background: none;background-color: ;"; - } - _each(attrMap, function(key, val) { - if (key === 'style' && val === '') { - return; - } - val = val.replace(/"/g, '"'); - attr += ' ' + key + '="' + val + '"'; - }); - } - if (tagName === 'font') { - tagName = 'span'; - } - return startNewline + '<' + startSlash + tagName + attr + endSlash + '>' + endNewline; - }); - html = html.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function($0, $1, $2, $3) { - return $1 + $2.replace(/\n/g, '\n') + $3; - }); - html = html.replace(/\n\s*\n/g, '\n'); - html = html.replace(/\n/g, '\n'); - return _trim(html); -} -function _clearMsWord(html, htmlTags) { - html = html.replace(//ig, '') - .replace(//ig, '') - .replace(/]*>[\s\S]*?<\/style>/ig, '') - .replace(/]*>[\s\S]*?<\/script>/ig, '') - .replace(/]+>[\s\S]*?<\/w:[^>]+>/ig, '') - .replace(/]+>[\s\S]*?<\/o:[^>]+>/ig, '') - .replace(/[\s\S]*?<\/xml>/ig, '') - .replace(/<(?:table|td)[^>]*>/ig, function(full) { - return full.replace(/border-bottom:([#\w\s]+)/ig, 'border:$1'); - }); - return _formatHtml(html, htmlTags); -} -function _mediaType(src) { - if (/\.(rm|rmvb)(\?|$)/i.test(src)) { - return 'audio/x-pn-realaudio-plugin'; - } - if (/\.(swf|flv)(\?|$)/i.test(src)) { - return 'application/x-shockwave-flash'; - } - return 'video/x-ms-asf-plugin'; -} -function _mediaClass(type) { - if (/realaudio/i.test(type)) { - return 'ke-rm'; - } - if (/flash/i.test(type)) { - return 'ke-flash'; - } - return 'ke-media'; -} -function _mediaAttrs(srcTag) { - return _getAttrList(unescape(srcTag)); -} -function _mediaEmbed(attrs,target) { - if(target && target === "media"){ - var html = [[],""); - html[0] = html[0].join(""); - html.push("/>"); - return html.join(""); - }else{ - var html = ' 0) { - style += 'width:' + width + 'px;'; - } - if (/\D/.test(height)) { - style += 'height:' + height + ';'; - } else if (height > 0) { - style += 'height:' + height + 'px;'; - } - var html = ''; - return html; -} -function _tmpl(str, data) { - var fn = new Function("obj", - "var p=[],print=function(){p.push.apply(p,arguments);};" + - "with(obj){p.push('" + - str.replace(/[\r\t\n]/g, " ") - .split("<%").join("\t") - .replace(/((^|%>)[^\t]*)'/g, "$1\r") - .replace(/\t=(.*?)%>/g, "',$1,'") - .split("\t").join("');") - .split("%>").join("p.push('") - .split("\r").join("\\'") + "');}return p.join('');"); - return data ? fn(data) : fn; -} -K.formatUrl = _formatUrl; -K.formatHtml = _formatHtml; -K.getCssList = _getCssList; -K.getAttrList = _getAttrList; -K.mediaType = _mediaType; -K.mediaAttrs = _mediaAttrs; -K.mediaEmbed = _mediaEmbed; -K.mediaImg = _mediaImg; -K.clearMsWord = _clearMsWord; -K.tmpl = _tmpl; -function _contains(nodeA, nodeB) { - if (nodeA.nodeType == 9 && nodeB.nodeType != 9) { - return true; - } - while ((nodeB = nodeB.parentNode)) { - if (nodeB == nodeA) { - return true; - } - } - return false; -} -var _getSetAttrDiv = document.createElement('div'); -_getSetAttrDiv.setAttribute('className', 't'); -var _GET_SET_ATTRIBUTE = _getSetAttrDiv.className !== 't'; -function _getAttr(el, key) { - key = key.toLowerCase(); - var val = null; - if (!_GET_SET_ATTRIBUTE && el.nodeName.toLowerCase() != 'script') { - var div = el.ownerDocument.createElement('div'); - div.appendChild(el.cloneNode(false)); - var list = _getAttrList(_unescape(div.innerHTML)); - if (key in list) { - val = list[key]; - } - } else { - try { - val = el.getAttribute(key, 2); - } catch(e) { - val = el.getAttribute(key, 1); - } - } - if (key === 'style' && val !== null) { - val = _formatCss(val); - } - return val; -} -function _queryAll(expr, root) { - var exprList = expr.split(','); - if (exprList.length > 1) { - var mergedResults = []; - _each(exprList, function() { - _each(_queryAll(this, root), function() { - if (_inArray(this, mergedResults) < 0) { - mergedResults.push(this); - } - }); - }); - return mergedResults; - } - root = root || document; - function escape(str) { - if (typeof str != 'string') { - return str; - } - return str.replace(/([^\w\-])/g, '\\$1'); - } - function stripslashes(str) { - return str.replace(/\\/g, ''); - } - function cmpTag(tagA, tagB) { - return tagA === '*' || tagA.toLowerCase() === escape(tagB.toLowerCase()); - } - function byId(id, tag, root) { - var arr = [], - doc = root.ownerDocument || root, - el = doc.getElementById(stripslashes(id)); - if (el) { - if (cmpTag(tag, el.nodeName) && _contains(root, el)) { - arr.push(el); - } - } - return arr; - } - function byClass(className, tag, root) { - var doc = root.ownerDocument || root, arr = [], els, i, len, el; - if (root.getElementsByClassName) { - els = root.getElementsByClassName(stripslashes(className)); - for (i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (cmpTag(tag, el.nodeName)) { - arr.push(el); - } - } - } else if (doc.querySelectorAll) { - els = doc.querySelectorAll((root.nodeName !== '#document' ? root.nodeName + ' ' : '') + tag + '.' + className); - for (i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (_contains(root, el)) { - arr.push(el); - } - } - } else { - els = root.getElementsByTagName(tag); - className = ' ' + className + ' '; - for (i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (el.nodeType == 1) { - var cls = el.className; - if (cls && (' ' + cls + ' ').indexOf(className) > -1) { - arr.push(el); - } - } - } - } - return arr; - } - function byName(name, tag, root) { - var arr = [], doc = root.ownerDocument || root, - els = doc.getElementsByName(stripslashes(name)), el; - for (var i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (cmpTag(tag, el.nodeName) && _contains(root, el)) { - if (el.getAttribute('name') !== null) { - arr.push(el); - } - } - } - return arr; - } - function byAttr(key, val, tag, root) { - var arr = [], els = root.getElementsByTagName(tag), el; - for (var i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (el.nodeType == 1) { - if (val === null) { - if (_getAttr(el, key) !== null) { - arr.push(el); - } - } else { - if (val === escape(_getAttr(el, key))) { - arr.push(el); - } - } - } - } - return arr; - } - function select(expr, root) { - var arr = [], matches; - matches = /^((?:\\.|[^.#\s\[<>])+)/.exec(expr); - var tag = matches ? matches[1] : '*'; - if ((matches = /#((?:[\w\-]|\\.)+)$/.exec(expr))) { - arr = byId(matches[1], tag, root); - } else if ((matches = /\.((?:[\w\-]|\\.)+)$/.exec(expr))) { - arr = byClass(matches[1], tag, root); - } else if ((matches = /\[((?:[\w\-]|\\.)+)\]/.exec(expr))) { - arr = byAttr(matches[1].toLowerCase(), null, tag, root); - } else if ((matches = /\[((?:[\w\-]|\\.)+)\s*=\s*['"]?((?:\\.|[^'"]+)+)['"]?\]/.exec(expr))) { - var key = matches[1].toLowerCase(), val = matches[2]; - if (key === 'id') { - arr = byId(val, tag, root); - } else if (key === 'class') { - arr = byClass(val, tag, root); - } else if (key === 'name') { - arr = byName(val, tag, root); - } else { - arr = byAttr(key, val, tag, root); - } - } else { - var els = root.getElementsByTagName(tag), el; - for (var i = 0, len = els.length; i < len; i++) { - el = els[i]; - if (el.nodeType == 1) { - arr.push(el); - } - } - } - return arr; - } - var parts = [], arr, re = /((?:\\.|[^\s>])+|[\s>])/g; - while ((arr = re.exec(expr))) { - if (arr[1] !== ' ') { - parts.push(arr[1]); - } - } - var results = []; - if (parts.length == 1) { - return select(parts[0], root); - } - var isChild = false, part, els, subResults, val, v, i, j, k, length, len, l; - for (i = 0, lenth = parts.length; i < lenth; i++) { - part = parts[i]; - if (part === '>') { - isChild = true; - continue; - } - if (i > 0) { - els = []; - for (j = 0, len = results.length; j < len; j++) { - val = results[j]; - subResults = select(part, val); - for (k = 0, l = subResults.length; k < l; k++) { - v = subResults[k]; - if (isChild) { - if (val === v.parentNode) { - els.push(v); - } - } else { - els.push(v); - } - } - } - results = els; - } else { - results = select(part, root); - } - if (results.length === 0) { - return []; - } - } - return results; -} -function _query(expr, root) { - var arr = _queryAll(expr, root); - return arr.length > 0 ? arr[0] : null; -} -K.query = _query; -K.queryAll = _queryAll; -function _get(val) { - return K(val)[0]; -} -function _getDoc(node) { - if (!node) { - return document; - } - return node.ownerDocument || node.document || node; -} -function _getWin(node) { - if (!node) { - return window; - } - var doc = _getDoc(node); - return doc.parentWindow || doc.defaultView; -} -function _setHtml(el, html) { - if (el.nodeType != 1) { - return; - } - var doc = _getDoc(el); - try { - el.innerHTML = '' + html; - var temp = doc.getElementById('__kindeditor_temp_tag__'); - temp.parentNode.removeChild(temp); - } catch(e) { - K(el).empty(); - K('@' + html, doc).each(function() { - el.appendChild(this); - }); - } -} -function _hasClass(el, cls) { - return _inString(cls, el.className, ' '); -} -function _setAttr(el, key, val) { - if (_IE && _V < 8 && key.toLowerCase() == 'class') { - key = 'className'; - } - el.setAttribute(key, '' + val); -} -function _removeAttr(el, key) { - if (_IE && _V < 8 && key.toLowerCase() == 'class') { - key = 'className'; - } - _setAttr(el, key, ''); - el.removeAttribute(key); -} -function _getNodeName(node) { - if (!node || !node.nodeName) { - return ''; - } - return node.nodeName.toLowerCase(); -} -function _computedCss(el, key) { - var self = this, win = _getWin(el), camelKey = _toCamel(key), val = ''; - if (win.getComputedStyle) { - var style = win.getComputedStyle(el, null); - val = style[camelKey] || style.getPropertyValue(key) || el.style[camelKey]; - } else if (el.currentStyle) { - val = el.currentStyle[camelKey] || el.style[camelKey]; - } - return val; -} -function _hasVal(node) { - return !!_VALUE_TAG_MAP[_getNodeName(node)]; -} -function _docElement(doc) { - doc = doc || document; - return _QUIRKS ? doc.body : doc.documentElement; -} -function _docHeight(doc) { - var el = _docElement(doc); - return Math.max(el.scrollHeight, el.clientHeight); -} -function _docWidth(doc) { - var el = _docElement(doc); - return Math.max(el.scrollWidth, el.clientWidth); -} -function _getScrollPos(doc) { - doc = doc || document; - var x, y; - if (_IE || _NEWIE || _OPERA) { - x = _docElement(doc).scrollLeft; - y = _docElement(doc).scrollTop; - } else { - x = _getWin(doc).scrollX; - y = _getWin(doc).scrollY; - } - return {x : x, y : y}; -} -function KNode(node) { - this.init(node); -} -_extend(KNode, { - init : function(node) { - var self = this; - node = _isArray(node) ? node : [node]; - var length = 0; - for (var i = 0, len = node.length; i < len; i++) { - if (node[i]) { - self[i] = node[i].constructor === KNode ? node[i][0] : node[i]; - length++; - } - } - self.length = length; - self.doc = _getDoc(self[0]); - self.name = _getNodeName(self[0]); - self.type = self.length > 0 ? self[0].nodeType : null; - self.win = _getWin(self[0]); - }, - each : function(fn) { - var self = this; - for (var i = 0; i < self.length; i++) { - if (fn.call(self[i], i, self[i]) === false) { - return self; - } - } - return self; - }, - bind : function(type, fn) { - this.each(function() { - _bind(this, type, fn); - }); - return this; - }, - unbind : function(type, fn) { - this.each(function() { - _unbind(this, type, fn); - }); - return this; - }, - fire : function(type) { - if (this.length < 1) { - return this; - } - _fire(this[0], type); - return this; - }, - hasAttr : function(key) { - if (this.length < 1) { - return false; - } - return !!_getAttr(this[0], key); - }, - attr : function(key, val) { - var self = this; - if (key === undefined) { - return _getAttrList(self.outer()); - } - if (typeof key === 'object') { - _each(key, function(k, v) { - self.attr(k, v); - }); - return self; - } - if (val === undefined) { - val = self.length < 1 ? null : _getAttr(self[0], key); - return val === null ? '' : val; - } - self.each(function() { - _setAttr(this, key, val); - }); - return self; - }, - removeAttr : function(key) { - this.each(function() { - _removeAttr(this, key); - }); - return this; - }, - get : function(i) { - if (this.length < 1) { - return null; - } - return this[i || 0]; - }, - eq : function(i) { - if (this.length < 1) { - return null; - } - return this[i] ? new KNode(this[i]) : null; - }, - hasClass : function(cls) { - if (this.length < 1) { - return false; - } - return _hasClass(this[0], cls); - }, - addClass : function(cls) { - this.each(function() { - if (!_hasClass(this, cls)) { - this.className = _trim(this.className + ' ' + cls); - } - }); - return this; - }, - removeClass : function(cls) { - this.each(function() { - if (_hasClass(this, cls)) { - this.className = _trim(this.className.replace(new RegExp('(^|\\s)' + cls + '(\\s|$)'), ' ')); - } - }); - return this; - }, - html : function(val) { - var self = this; - if (val === undefined) { - if (self.length < 1 || self.type != 1) { - return ''; - } - return _formatHtml(self[0].innerHTML); - } - self.each(function() { - _setHtml(this, val); - }); - return self; - }, - text : function() { - var self = this; - if (self.length < 1) { - return ''; - } - return _IE ? self[0].innerText : self[0].textContent; - }, - hasVal : function() { - if (this.length < 1) { - return false; - } - return _hasVal(this[0]); - }, - val : function(val) { - var self = this; - if (val === undefined) { - if (self.length < 1) { - return ''; - } - return self.hasVal() ? self[0].value : self.attr('value'); - } else { - self.each(function() { - if (_hasVal(this)) { - this.value = val; - } else { - _setAttr(this, 'value' , val); - } - }); - return self; - } - }, - css : function(key, val) { - var self = this; - if (key === undefined) { - return _getCssList(self.attr('style')); - } - if (typeof key === 'object') { - _each(key, function(k, v) { - self.css(k, v); - }); - return self; - } - if (val === undefined) { - if (self.length < 1) { - return ''; - } - return self[0].style[_toCamel(key)] || _computedCss(self[0], key) || ''; - } - self.each(function() { - this.style[_toCamel(key)] = val; - }); - return self; - }, - width : function(val) { - var self = this; - if (val === undefined) { - if (self.length < 1) { - return 0; - } - return self[0].offsetWidth; - } - return self.css('width', _addUnit(val)); - }, - height : function(val) { - var self = this; - if (val === undefined) { - if (self.length < 1) { - return 0; - } - return self[0].offsetHeight; - } - return self.css('height', _addUnit(val)); - }, - opacity : function(val) { - this.each(function() { - if (this.style.opacity === undefined) { - this.style.filter = val == 1 ? '' : 'alpha(opacity=' + (val * 100) + ')'; - } else { - this.style.opacity = val == 1 ? '' : val; - } - }); - return this; - }, - data : function(key, val) { - var self = this; - key = 'kindeditor_data_' + key; - if (val === undefined) { - if (self.length < 1) { - return null; - } - return self[0][key]; - } - this.each(function() { - this[key] = val; - }); - return self; - }, - pos : function() { - var self = this, node = self[0], x = 0, y = 0; - if (node) { - if (node.getBoundingClientRect) { - var box = node.getBoundingClientRect(), - pos = _getScrollPos(self.doc); - x = box.left + pos.x; - y = box.top + pos.y; - } else { - while (node) { - x += node.offsetLeft; - y += node.offsetTop; - node = node.offsetParent; - } - } - } - return {x : _round(x), y : _round(y)}; - }, - clone : function(bool) { - if (this.length < 1) { - return new KNode([]); - } - return new KNode(this[0].cloneNode(bool)); - }, - append : function(expr) { - this.each(function() { - if (this.appendChild) { - this.appendChild(_get(expr)); - } - }); - return this; - }, - appendTo : function(expr) { - this.each(function() { - _get(expr).appendChild(this); - }); - return this; - }, - before : function(expr) { - this.each(function() { - this.parentNode.insertBefore(_get(expr), this); - }); - return this; - }, - after : function(expr) { - this.each(function() { - if (this.nextSibling) { - this.parentNode.insertBefore(_get(expr), this.nextSibling); - } else { - this.parentNode.appendChild(_get(expr)); - } - }); - return this; - }, - replaceWith : function(expr) { - var nodes = []; - this.each(function(i, node) { - _unbind(node); - var newNode = _get(expr); - node.parentNode.replaceChild(newNode, node); - nodes.push(newNode); - }); - return K(nodes); - }, - empty : function() { - var self = this; - self.each(function(i, node) { - var child = node.firstChild; - while (child) { - if (!node.parentNode) { - return; - } - var next = child.nextSibling; - child.parentNode.removeChild(child); - child = next; - } - }); - return self; - }, - remove : function(keepChilds) { - var self = this; - self.each(function(i, node) { - if (!node.parentNode) { - return; - } - _unbind(node); - if (keepChilds) { - var child = node.firstChild; - while (child) { - var next = child.nextSibling; - node.parentNode.insertBefore(child, node); - child = next; - } - } - node.parentNode.removeChild(node); - delete self[i]; - }); - self.length = 0; - return self; - }, - show : function(val) { - var self = this; - if (val === undefined) { - val = self._originDisplay || ''; - } - if (self.css('display') != 'none') { - return self; - } - return self.css('display', val); - }, - hide : function() { - var self = this; - if (self.length < 1) { - return self; - } - self._originDisplay = self[0].style.display; - return self.css('display', 'none'); - }, - outer : function() { - var self = this; - if (self.length < 1) { - return ''; - } - var div = self.doc.createElement('div'), html; - div.appendChild(self[0].cloneNode(true)); - html = _formatHtml(div.innerHTML); - div = null; - return html; - }, - isSingle : function() { - return !!_SINGLE_TAG_MAP[this.name]; - }, - isInline : function() { - return !!_INLINE_TAG_MAP[this.name]; - }, - isBlock : function() { - return !!_BLOCK_TAG_MAP[this.name]; - }, - isStyle : function() { - return !!_STYLE_TAG_MAP[this.name]; - }, - isControl : function() { - return !!_CONTROL_TAG_MAP[this.name]; - }, - contains : function(otherNode) { - if (this.length < 1) { - return false; - } - return _contains(this[0], _get(otherNode)); - }, - parent : function() { - if (this.length < 1) { - return null; - } - var node = this[0].parentNode; - return node ? new KNode(node) : null; - }, - children : function() { - if (this.length < 1) { - return new KNode([]); - } - var list = [], child = this[0].firstChild; - while (child) { - if (child.nodeType != 3 || _trim(child.nodeValue) !== '') { - list.push(child); - } - child = child.nextSibling; - } - return new KNode(list); - }, - first : function() { - var list = this.children(); - return list.length > 0 ? list.eq(0) : null; - }, - last : function() { - var list = this.children(); - return list.length > 0 ? list.eq(list.length - 1) : null; - }, - index : function() { - if (this.length < 1) { - return -1; - } - var i = -1, sibling = this[0]; - while (sibling) { - i++; - sibling = sibling.previousSibling; - } - return i; - }, - prev : function() { - if (this.length < 1) { - return null; - } - var node = this[0].previousSibling; - return node ? new KNode(node) : null; - }, - next : function() { - if (this.length < 1) { - return null; - } - var node = this[0].nextSibling; - return node ? new KNode(node) : null; - }, - scan : function(fn, order) { - if (this.length < 1) { - return; - } - order = (order === undefined) ? true : order; - function walk(node) { - var n = order ? node.firstChild : node.lastChild; - while (n) { - var next = order ? n.nextSibling : n.previousSibling; - if (fn(n) === false) { - return false; - } - if (walk(n) === false) { - return false; - } - n = next; - } - } - walk(this[0]); - return this; - } -}); -_each(('blur,focus,focusin,focusout,load,resize,scroll,unload,click,dblclick,' + - 'mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,' + - 'change,select,submit,keydown,keypress,keyup,error,contextmenu').split(','), function(i, type) { - KNode.prototype[type] = function(fn) { - return fn ? this.bind(type, fn) : this.fire(type); - }; -}); -var _K = K; -K = function(expr, root) { - if (expr === undefined || expr === null) { - return; - } - function newNode(node) { - if (!node[0]) { - node = []; - } - return new KNode(node); - } - if (typeof expr === 'string') { - if (root) { - root = _get(root); - } - var length = expr.length; - if (expr.charAt(0) === '@') { - expr = expr.substr(1); - } - if (expr.length !== length || /<.+>/.test(expr)) { - var doc = root ? root.ownerDocument || root : document, - div = doc.createElement('div'), list = []; - div.innerHTML = '' + expr; - for (var i = 0, len = div.childNodes.length; i < len; i++) { - var child = div.childNodes[i]; - if (child.id == '__kindeditor_temp_tag__') { - continue; - } - list.push(child); - } - return newNode(list); - } - return newNode(_queryAll(expr, root)); - } - if (expr && expr.constructor === KNode) { - return expr; - } - if (expr.toArray) { - expr = expr.toArray(); - } - if (_isArray(expr)) { - return newNode(expr); - } - return newNode(_toArray(arguments)); -}; -_each(_K, function(key, val) { - K[key] = val; -}); -K.NodeClass = KNode; -window.KindEditor = K; -var _START_TO_START = 0, - _START_TO_END = 1, - _END_TO_END = 2, - _END_TO_START = 3, - _BOOKMARK_ID = 0; -function _updateCollapsed(range) { - range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset); - return range; -} -function _copyAndDelete(range, isCopy, isDelete) { - var doc = range.doc, nodeList = []; - function splitTextNode(node, startOffset, endOffset) { - var length = node.nodeValue.length, centerNode; - if (isCopy) { - var cloneNode = node.cloneNode(true); - if (startOffset > 0) { - centerNode = cloneNode.splitText(startOffset); - } else { - centerNode = cloneNode; - } - if (endOffset < length) { - centerNode.splitText(endOffset - startOffset); - } - } - if (isDelete) { - var center = node; - if (startOffset > 0) { - center = node.splitText(startOffset); - range.setStart(node, startOffset); - } - if (endOffset < length) { - var right = center.splitText(endOffset - startOffset); - range.setEnd(right, 0); - } - nodeList.push(center); - } - return centerNode; - } - function removeNodes() { - if (isDelete) { - range.up().collapse(true); - } - for (var i = 0, len = nodeList.length; i < len; i++) { - var node = nodeList[i]; - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - } - var copyRange = range.cloneRange().down(); - var start = -1, incStart = -1, incEnd = -1, end = -1, - ancestor = range.commonAncestor(), frag = doc.createDocumentFragment(); - if (ancestor.nodeType == 3) { - var textNode = splitTextNode(ancestor, range.startOffset, range.endOffset); - if (isCopy) { - frag.appendChild(textNode); - } - removeNodes(); - return isCopy ? frag : range; - } - function extractNodes(parent, frag) { - var node = parent.firstChild, nextNode; - while (node) { - var testRange = new KRange(doc).selectNode(node); - start = testRange.compareBoundaryPoints(_START_TO_END, range); - if (start >= 0 && incStart <= 0) { - incStart = testRange.compareBoundaryPoints(_START_TO_START, range); - } - if (incStart >= 0 && incEnd <= 0) { - incEnd = testRange.compareBoundaryPoints(_END_TO_END, range); - } - if (incEnd >= 0 && end <= 0) { - end = testRange.compareBoundaryPoints(_END_TO_START, range); - } - if (end >= 0) { - return false; - } - nextNode = node.nextSibling; - if (start > 0) { - if (node.nodeType == 1) { - if (incStart >= 0 && incEnd <= 0) { - if (isCopy) { - frag.appendChild(node.cloneNode(true)); - } - if (isDelete) { - nodeList.push(node); - } - } else { - var childFlag; - if (isCopy) { - childFlag = node.cloneNode(false); - frag.appendChild(childFlag); - } - if (extractNodes(node, childFlag) === false) { - return false; - } - } - } else if (node.nodeType == 3) { - var textNode; - if (node == copyRange.startContainer) { - textNode = splitTextNode(node, copyRange.startOffset, node.nodeValue.length); - } else if (node == copyRange.endContainer) { - textNode = splitTextNode(node, 0, copyRange.endOffset); - } else { - textNode = splitTextNode(node, 0, node.nodeValue.length); - } - if (isCopy) { - try { - frag.appendChild(textNode); - } catch(e) {} - } - } - } - node = nextNode; - } - } - extractNodes(ancestor, frag); - if (isDelete) { - range.up().collapse(true); - } - for (var i = 0, len = nodeList.length; i < len; i++) { - var node = nodeList[i]; - if (node.parentNode) { - node.parentNode.removeChild(node); - } - } - return isCopy ? frag : range; -} -function _moveToElementText(range, el) { - var node = el; - while (node) { - var knode = K(node); - if (knode.name == 'marquee' || knode.name == 'select') { - return; - } - node = node.parentNode; - } - try { - range.moveToElementText(el); - } catch(e) {} -} -function _getStartEnd(rng, isStart) { - var doc = rng.parentElement().ownerDocument, - pointRange = rng.duplicate(); - pointRange.collapse(isStart); - var parent = pointRange.parentElement(), - nodes = parent.childNodes; - if (nodes.length === 0) { - return {node: parent.parentNode, offset: K(parent).index()}; - } - var startNode = doc, startPos = 0, cmp = -1; - var testRange = rng.duplicate(); - _moveToElementText(testRange, parent); - for (var i = 0, len = nodes.length; i < len; i++) { - var node = nodes[i]; - cmp = testRange.compareEndPoints('StartToStart', pointRange); - if (cmp === 0) { - return {node: node.parentNode, offset: i}; - } - if (node.nodeType == 1) { - var nodeRange = rng.duplicate(), dummy, knode = K(node), newNode = node; - if (knode.isControl()) { - dummy = doc.createElement('span'); - knode.after(dummy); - newNode = dummy; - startPos += knode.text().replace(/\r\n|\n|\r/g, '').length; - } - _moveToElementText(nodeRange, newNode); - testRange.setEndPoint('StartToEnd', nodeRange); - if (cmp > 0) { - startPos += nodeRange.text.replace(/\r\n|\n|\r/g, '').length; - } else { - startPos = 0; - } - if (dummy) { - K(dummy).remove(); - } - } else if (node.nodeType == 3) { - testRange.moveStart('character', node.nodeValue.length); - startPos += node.nodeValue.length; - } - if (cmp < 0) { - startNode = node; - } - } - if (cmp < 0 && startNode.nodeType == 1) { - return {node: parent, offset: K(parent.lastChild).index() + 1}; - } - if (cmp > 0) { - while (startNode.nextSibling && startNode.nodeType == 1) { - startNode = startNode.nextSibling; - } - } - testRange = rng.duplicate(); - _moveToElementText(testRange, parent); - testRange.setEndPoint('StartToEnd', pointRange); - startPos -= testRange.text.replace(/\r\n|\n|\r/g, '').length; - if (cmp > 0 && startNode.nodeType == 3) { - var prevNode = startNode.previousSibling; - while (prevNode && prevNode.nodeType == 3) { - startPos -= prevNode.nodeValue.length; - prevNode = prevNode.previousSibling; - } - } - return {node: startNode, offset: startPos}; -} -function _getEndRange(node, offset) { - var doc = node.ownerDocument || node, - range = doc.body.createTextRange(); - if (doc == node) { - range.collapse(true); - return range; - } - if (node.nodeType == 1 && node.childNodes.length > 0) { - var children = node.childNodes, isStart, child; - if (offset === 0) { - child = children[0]; - isStart = true; - } else { - child = children[offset - 1]; - isStart = false; - } - if (!child) { - return range; - } - if (K(child).name === 'head') { - if (offset === 1) { - isStart = true; - } - if (offset === 2) { - isStart = false; - } - range.collapse(isStart); - return range; - } - if (child.nodeType == 1) { - var kchild = K(child), span; - if (kchild.isControl()) { - span = doc.createElement('span'); - if (isStart) { - kchild.before(span); - } else { - kchild.after(span); - } - child = span; - } - _moveToElementText(range, child); - range.collapse(isStart); - if (span) { - K(span).remove(); - } - return range; - } - node = child; - offset = isStart ? 0 : child.nodeValue.length; - } - var dummy = doc.createElement('span'); - K(node).before(dummy); - _moveToElementText(range, dummy); - range.moveStart('character', offset); - K(dummy).remove(); - return range; -} -function _toRange(rng) { - var doc, range; - function tr2td(start) { - if (K(start.node).name == 'tr') { - start.node = start.node.cells[start.offset]; - start.offset = 0; - } - } - if (_IERANGE) { - if (rng.item) { - doc = _getDoc(rng.item(0)); - range = new KRange(doc); - range.selectNode(rng.item(0)); - return range; - } - doc = rng.parentElement().ownerDocument; - var start = _getStartEnd(rng, true), - end = _getStartEnd(rng, false); - tr2td(start); - tr2td(end); - range = new KRange(doc); - range.setStart(start.node, start.offset); - range.setEnd(end.node, end.offset); - return range; - } - var startContainer = rng.startContainer; - doc = startContainer.ownerDocument || startContainer; - range = new KRange(doc); - range.setStart(startContainer, rng.startOffset); - range.setEnd(rng.endContainer, rng.endOffset); - return range; -} -function KRange(doc) { - this.init(doc); -} -_extend(KRange, { - init : function(doc) { - var self = this; - self.startContainer = doc; - self.startOffset = 0; - self.endContainer = doc; - self.endOffset = 0; - self.collapsed = true; - self.doc = doc; - }, - commonAncestor : function() { - function getParents(node) { - var parents = []; - while (node) { - parents.push(node); - node = node.parentNode; - } - return parents; - } - var parentsA = getParents(this.startContainer), - parentsB = getParents(this.endContainer), - i = 0, lenA = parentsA.length, lenB = parentsB.length, parentA, parentB; - while (++i) { - parentA = parentsA[lenA - i]; - parentB = parentsB[lenB - i]; - if (!parentA || !parentB || parentA !== parentB) { - break; - } - } - return parentsA[lenA - i + 1]; - }, - setStart : function(node, offset) { - var self = this, doc = self.doc; - self.startContainer = node; - self.startOffset = offset; - if (self.endContainer === doc) { - self.endContainer = node; - self.endOffset = offset; - } - return _updateCollapsed(this); - }, - setEnd : function(node, offset) { - var self = this, doc = self.doc; - self.endContainer = node; - self.endOffset = offset; - if (self.startContainer === doc) { - self.startContainer = node; - self.startOffset = offset; - } - return _updateCollapsed(this); - }, - setStartBefore : function(node) { - return this.setStart(node.parentNode || this.doc, K(node).index()); - }, - setStartAfter : function(node) { - return this.setStart(node.parentNode || this.doc, K(node).index() + 1); - }, - setEndBefore : function(node) { - return this.setEnd(node.parentNode || this.doc, K(node).index()); - }, - setEndAfter : function(node) { - return this.setEnd(node.parentNode || this.doc, K(node).index() + 1); - }, - selectNode : function(node) { - return this.setStartBefore(node).setEndAfter(node); - }, - selectNodeContents : function(node) { - var knode = K(node); - if (knode.type == 3 || knode.isSingle()) { - return this.selectNode(node); - } - var children = knode.children(); - if (children.length > 0) { - return this.setStartBefore(children[0]).setEndAfter(children[children.length - 1]); - } - return this.setStart(node, 0).setEnd(node, 0); - }, - collapse : function(toStart) { - if (toStart) { - return this.setEnd(this.startContainer, this.startOffset); - } - return this.setStart(this.endContainer, this.endOffset); - }, - compareBoundaryPoints : function(how, range) { - var rangeA = this.get(), rangeB = range.get(); - if (_IERANGE) { - var arr = {}; - arr[_START_TO_START] = 'StartToStart'; - arr[_START_TO_END] = 'EndToStart'; - arr[_END_TO_END] = 'EndToEnd'; - arr[_END_TO_START] = 'StartToEnd'; - var cmp = rangeA.compareEndPoints(arr[how], rangeB); - if (cmp !== 0) { - return cmp; - } - var nodeA, nodeB, nodeC, posA, posB; - if (how === _START_TO_START || how === _END_TO_START) { - nodeA = this.startContainer; - posA = this.startOffset; - } - if (how === _START_TO_END || how === _END_TO_END) { - nodeA = this.endContainer; - posA = this.endOffset; - } - if (how === _START_TO_START || how === _START_TO_END) { - nodeB = range.startContainer; - posB = range.startOffset; - } - if (how === _END_TO_END || how === _END_TO_START) { - nodeB = range.endContainer; - posB = range.endOffset; - } - if (nodeA === nodeB) { - var diff = posA - posB; - return diff > 0 ? 1 : (diff < 0 ? -1 : 0); - } - nodeC = nodeB; - while (nodeC && nodeC.parentNode !== nodeA) { - nodeC = nodeC.parentNode; - } - if (nodeC) { - return K(nodeC).index() >= posA ? -1 : 1; - } - nodeC = nodeA; - while (nodeC && nodeC.parentNode !== nodeB) { - nodeC = nodeC.parentNode; - } - if (nodeC) { - return K(nodeC).index() >= posB ? 1 : -1; - } - nodeC = K(nodeB).next(); - if (nodeC && nodeC.contains(nodeA)) { - return 1; - } - nodeC = K(nodeA).next(); - if (nodeC && nodeC.contains(nodeB)) { - return -1; - } - } else { - return rangeA.compareBoundaryPoints(how, rangeB); - } - }, - cloneRange : function() { - return new KRange(this.doc).setStart(this.startContainer, this.startOffset).setEnd(this.endContainer, this.endOffset); - }, - toString : function() { - var rng = this.get(), str = _IERANGE ? rng.text : rng.toString(); - return str.replace(/\r\n|\n|\r/g, ''); - }, - cloneContents : function() { - return _copyAndDelete(this, true, false); - }, - deleteContents : function() { - return _copyAndDelete(this, false, true); - }, - extractContents : function() { - return _copyAndDelete(this, true, true); - }, - insertNode : function(node) { - var self = this, - sc = self.startContainer, so = self.startOffset, - ec = self.endContainer, eo = self.endOffset, - firstChild, lastChild, c, nodeCount = 1; - if (node.nodeName.toLowerCase() === '#document-fragment') { - firstChild = node.firstChild; - lastChild = node.lastChild; - nodeCount = node.childNodes.length; - } - if (sc.nodeType == 1) { - c = sc.childNodes[so]; - if (c) { - sc.insertBefore(node, c); - if (sc === ec) { - eo += nodeCount; - } - } else { - sc.appendChild(node); - } - } else if (sc.nodeType == 3) { - if (so === 0) { - sc.parentNode.insertBefore(node, sc); - if (sc.parentNode === ec) { - eo += nodeCount; - } - } else if (so >= sc.nodeValue.length) { - if (sc.nextSibling) { - sc.parentNode.insertBefore(node, sc.nextSibling); - } else { - sc.parentNode.appendChild(node); - } - } else { - if (so > 0) { - c = sc.splitText(so); - } else { - c = sc; - } - sc.parentNode.insertBefore(node, c); - if (sc === ec) { - ec = c; - eo -= so; - } - } - } - if (firstChild) { - self.setStartBefore(firstChild).setEndAfter(lastChild); - } else { - self.selectNode(node); - } - if (self.compareBoundaryPoints(_END_TO_END, self.cloneRange().setEnd(ec, eo)) >= 1) { - return self; - } - return self.setEnd(ec, eo); - }, - surroundContents : function(node) { - node.appendChild(this.extractContents()); - return this.insertNode(node).selectNode(node); - }, - isControl : function() { - var self = this, - sc = self.startContainer, so = self.startOffset, - ec = self.endContainer, eo = self.endOffset, rng; - return sc.nodeType == 1 && sc === ec && so + 1 === eo && K(sc.childNodes[so]).isControl(); - }, - get : function(hasControlRange) { - var self = this, doc = self.doc, node, rng; - if (!_IERANGE) { - rng = doc.createRange(); - try { - rng.setStart(self.startContainer, self.startOffset); - rng.setEnd(self.endContainer, self.endOffset); - } catch (e) {} - return rng; - } - if (hasControlRange && self.isControl()) { - rng = doc.body.createControlRange(); - rng.addElement(self.startContainer.childNodes[self.startOffset]); - return rng; - } - var range = self.cloneRange().down(); - rng = doc.body.createTextRange(); - rng.setEndPoint('StartToStart', _getEndRange(range.startContainer, range.startOffset)); - rng.setEndPoint('EndToStart', _getEndRange(range.endContainer, range.endOffset)); - return rng; - }, - html : function() { - return K(this.cloneContents()).outer(); - }, - down : function() { - var self = this; - function downPos(node, pos, isStart) { - if (node.nodeType != 1) { - return; - } - var children = K(node).children(); - if (children.length === 0) { - return; - } - var left, right, child, offset; - if (pos > 0) { - left = children.eq(pos - 1); - } - if (pos < children.length) { - right = children.eq(pos); - } - if (left && left.type == 3) { - child = left[0]; - offset = child.nodeValue.length; - } - if (right && right.type == 3) { - child = right[0]; - offset = 0; - } - if (!child) { - return; - } - if (isStart) { - self.setStart(child, offset); - } else { - self.setEnd(child, offset); - } - } - downPos(self.startContainer, self.startOffset, true); - downPos(self.endContainer, self.endOffset, false); - return self; - }, - up : function() { - var self = this; - function upPos(node, pos, isStart) { - if (node.nodeType != 3) { - return; - } - if (pos === 0) { - if (isStart) { - self.setStartBefore(node); - } else { - self.setEndBefore(node); - } - } else if (pos == node.nodeValue.length) { - if (isStart) { - self.setStartAfter(node); - } else { - self.setEndAfter(node); - } - } - } - upPos(self.startContainer, self.startOffset, true); - upPos(self.endContainer, self.endOffset, false); - return self; - }, - enlarge : function(toBlock) { - var self = this; - self.up(); - function enlargePos(node, pos, isStart) { - var knode = K(node), parent; - if (knode.type == 3 || _NOSPLIT_TAG_MAP[knode.name] || !toBlock && knode.isBlock()) { - return; - } - if (pos === 0) { - while (!knode.prev()) { - parent = knode.parent(); - if (!parent || _NOSPLIT_TAG_MAP[parent.name] || !toBlock && parent.isBlock()) { - break; - } - knode = parent; - } - if (isStart) { - self.setStartBefore(knode[0]); - } else { - self.setEndBefore(knode[0]); - } - } else if (pos == knode.children().length) { - while (!knode.next()) { - parent = knode.parent(); - if (!parent || _NOSPLIT_TAG_MAP[parent.name] || !toBlock && parent.isBlock()) { - break; - } - knode = parent; - } - if (isStart) { - self.setStartAfter(knode[0]); - } else { - self.setEndAfter(knode[0]); - } - } - } - enlargePos(self.startContainer, self.startOffset, true); - enlargePos(self.endContainer, self.endOffset, false); - return self; - }, - shrink : function() { - var self = this, child, collapsed = self.collapsed; - while (self.startContainer.nodeType == 1 && (child = self.startContainer.childNodes[self.startOffset]) && child.nodeType == 1 && !K(child).isSingle()) { - self.setStart(child, 0); - } - if (collapsed) { - return self.collapse(collapsed); - } - while (self.endContainer.nodeType == 1 && self.endOffset > 0 && (child = self.endContainer.childNodes[self.endOffset - 1]) && child.nodeType == 1 && !K(child).isSingle()) { - self.setEnd(child, child.childNodes.length); - } - return self; - }, - createBookmark : function(serialize) { - var self = this, doc = self.doc, endNode, - startNode = K('', doc)[0]; - startNode.id = '__kindeditor_bookmark_start_' + (_BOOKMARK_ID++) + '__'; - if (!self.collapsed) { - endNode = startNode.cloneNode(true); - endNode.id = '__kindeditor_bookmark_end_' + (_BOOKMARK_ID++) + '__'; - } - if (endNode) { - self.cloneRange().collapse(false).insertNode(endNode).setEndBefore(endNode); - } - self.insertNode(startNode).setStartAfter(startNode); - return { - start : serialize ? '#' + startNode.id : startNode, - end : endNode ? (serialize ? '#' + endNode.id : endNode) : null - }; - }, - moveToBookmark : function(bookmark) { - var self = this, doc = self.doc, - start = K(bookmark.start, doc), end = bookmark.end ? K(bookmark.end, doc) : null; - if (!start || start.length < 1) { - return self; - } - self.setStartBefore(start[0]); - start.remove(); - if (end && end.length > 0) { - self.setEndBefore(end[0]); - end.remove(); - } else { - self.collapse(true); - } - return self; - }, - dump : function() { - console.log('--------------------'); - console.log(this.startContainer.nodeType == 3 ? this.startContainer.nodeValue : this.startContainer, this.startOffset); - console.log(this.endContainer.nodeType == 3 ? this.endContainer.nodeValue : this.endContainer, this.endOffset); - } -}); -function _range(mixed) { - if (!mixed.nodeName) { - return mixed.constructor === KRange ? mixed : _toRange(mixed); - } - return new KRange(mixed); -} -K.RangeClass = KRange; -K.range = _range; -K.START_TO_START = _START_TO_START; -K.START_TO_END = _START_TO_END; -K.END_TO_END = _END_TO_END; -K.END_TO_START = _END_TO_START; - -function _nativeCommand(doc, key, val) { - try { - doc.execCommand(key, false, val); - } catch(e) {} -} -function _nativeCommandValue(doc, key) { - var val = ''; - try { -// val = doc.query_nativeCommand(self.doc, name, val);Value(key); - val = doc.queryCommandValue(key); - } catch (e) {} - if (typeof val !== 'string') { - val = ''; - } - return val; -} -function _getSel(doc) { - var win = _getWin(doc); - return _IERANGE ? doc.selection : win.getSelection(); -} -function _getRng(doc) { - var sel = _getSel(doc), rng; - try { - if (sel.rangeCount > 0) { - rng = sel.getRangeAt(0); - } else { - rng = sel.createRange(); - } - } catch(e) {} - if (_IERANGE && (!rng || (!rng.item && rng.parentElement().ownerDocument !== doc))) { - return null; - } - return rng; -} -function _singleKeyMap(map) { - var newMap = {}, arr, v; - _each(map, function(key, val) { - arr = key.split(','); - for (var i = 0, len = arr.length; i < len; i++) { - v = arr[i]; - newMap[v] = val; - } - }); - return newMap; -} -function _hasAttrOrCss(knode, map) { - return _hasAttrOrCssByKey(knode, map, '*') || _hasAttrOrCssByKey(knode, map); -} -function _hasAttrOrCssByKey(knode, map, mapKey) { - mapKey = mapKey || knode.name; - if (knode.type !== 1) { - return false; - } - var newMap = _singleKeyMap(map); - if (!newMap[mapKey]) { - return false; - } - var arr = newMap[mapKey].split(','); - for (var i = 0, len = arr.length; i < len; i++) { - var key = arr[i]; - if (key === '*') { - return true; - } - var match = /^(\.?)([^=]+)(?:=([^=]*))?$/.exec(key); - var method = match[1] ? 'css' : 'attr'; - key = match[2]; - var val = match[3] || ''; - if (val === '' && knode[method](key) !== '') { - return true; - } - if (val !== '' && knode[method](key) === val) { - return true; - } - } - return false; -} -function _removeAttrOrCss(knode, map) { - if (knode.type != 1) { - return; - } - _removeAttrOrCssByKey(knode, map, '*'); - _removeAttrOrCssByKey(knode, map); -} -function _removeAttrOrCssByKey(knode, map, mapKey) { - mapKey = mapKey || knode.name; - if (knode.type !== 1) { - return; - } - var newMap = _singleKeyMap(map); - if (!newMap[mapKey]) { - return; - } - var arr = newMap[mapKey].split(','), allFlag = false; - for (var i = 0, len = arr.length; i < len; i++) { - var key = arr[i]; - if (key === '*') { - allFlag = true; - break; - } - var match = /^(\.?)([^=]+)(?:=([^=]*))?$/.exec(key); - key = match[2]; - if (match[1]) { - key = _toCamel(key); - if (knode[0].style[key]) { - knode[0].style[key] = ''; - } - } else { - knode.removeAttr(key); - } - } - if (allFlag) { - knode.remove(true); - } -} -function _getInnerNode(knode) { - var inner = knode; - while (inner.first()) { - inner = inner.first(); - } - return inner; -} -function _isEmptyNode(knode) { - if (knode.type != 1 || knode.isSingle()) { - return false; - } - return knode.html().replace(/<[^>]+>/g, '') === ''; -} -function _mergeWrapper(a, b) { - a = a.clone(true); - var lastA = _getInnerNode(a), childA = a, merged = false; - while (b) { - while (childA) { - if (childA.name === b.name) { - _mergeAttrs(childA, b.attr(), b.css()); - merged = true; - } - childA = childA.first(); - } - if (!merged) { - lastA.append(b.clone(false)); - } - merged = false; - b = b.first(); - } - return a; -} -function _wrapNode(knode, wrapper) { - wrapper = wrapper.clone(true); - if (knode.type == 3) { - _getInnerNode(wrapper).append(knode.clone(false)); - knode.replaceWith(wrapper); - return wrapper; - } - var nodeWrapper = knode, child; - while ((child = knode.first()) && child.children().length == 1) { - knode = child; - } - child = knode.first(); - var frag = knode.doc.createDocumentFragment(); - while (child) { - frag.appendChild(child[0]); - child = child.next(); - } - wrapper = _mergeWrapper(nodeWrapper, wrapper); - if (frag.firstChild) { - _getInnerNode(wrapper).append(frag); - } - nodeWrapper.replaceWith(wrapper); - return wrapper; -} -function _mergeAttrs(knode, attrs, styles) { - _each(attrs, function(key, val) { - if (key !== 'style') { - knode.attr(key, val); - } - }); - _each(styles, function(key, val) { - knode.css(key, val); - }); -} -function _inPreElement(knode) { - while (knode && knode.name != 'body') { - if (_PRE_TAG_MAP[knode.name] || knode.name == 'div' && knode.hasClass('ke-script')) { - return true; - } - knode = knode.parent(); - } - return false; -} -function KCmd(range) { - this.init(range); -} -_extend(KCmd, { - init : function(range) { - var self = this, doc = range.doc; - self.doc = doc; - self.win = _getWin(doc); - self.sel = _getSel(doc); - self.range = range; - }, - selection : function(forceReset) { - var self = this, doc = self.doc, rng = _getRng(doc); - self.sel = _getSel(doc); - if (rng) { - self.range = _range(rng); - if (K(self.range.startContainer).name == 'html') { - self.range.selectNodeContents(doc.body).collapse(false); - } - return self; - } - if (forceReset) { - self.range.selectNodeContents(doc.body).collapse(false); - } - return self; - }, - select : function(hasDummy) { - hasDummy = _undef(hasDummy, true); - var self = this, sel = self.sel, range = self.range.cloneRange().shrink(), - sc = range.startContainer, so = range.startOffset, - ec = range.endContainer, eo = range.endOffset, - doc = _getDoc(sc), win = self.win, rng, hasU200b = false; - if (hasDummy && sc.nodeType == 1 && range.collapsed) { - if (_IERANGE) { - var dummy = K(' ', doc); - range.insertNode(dummy[0]); - rng = doc.body.createTextRange(); - try { - rng.moveToElementText(dummy[0]); - } catch(ex) {} - rng.collapse(false); - rng.select(); - dummy.remove(); - win.focus(); - return self; - } - if (_WEBKIT) { - var children = sc.childNodes; - if (K(sc).isInline() || so > 0 && K(children[so - 1]).isInline() || children[so] && K(children[so]).isInline()) { - range.insertNode(doc.createTextNode('\u200B')); - hasU200b = true; - } - } - } - if (_IERANGE) { - try { - rng = range.get(true); - rng.select(); - } catch(e) {} - } else { - if (hasU200b) { - range.collapse(false); - } - rng = range.get(true); - sel.removeAllRanges(); - sel.addRange(rng); - if (doc !== document) { - var pos = K(rng.endContainer).pos(); - //win.scrollTo(pos.x, pos.y); - } - } - win.focus(); - return self; - }, - wrap : function(val) { - var self = this, doc = self.doc, range = self.range, wrapper; - wrapper = K(val, doc); - if (range.collapsed) { - range.shrink(); - range.insertNode(wrapper[0]).selectNodeContents(wrapper[0]); - return self; - } - if (wrapper.isBlock()) { - var copyWrapper = wrapper.clone(true), child = copyWrapper; - while (child.first()) { - child = child.first(); - } - child.append(range.extractContents()); - range.insertNode(copyWrapper[0]).selectNode(copyWrapper[0]); - return self; - } - range.enlarge(); - var bookmark = range.createBookmark(), ancestor = range.commonAncestor(), isStart = false; - K(ancestor).scan(function(node) { - if (!isStart && node == bookmark.start) { - isStart = true; - return; - } - if (isStart) { - if (node == bookmark.end) { - return false; - } - var knode = K(node); - if (_inPreElement(knode)) { - return; - } - if (knode.type == 3 && _trim(node.nodeValue).length > 0) { - var parent; - while ((parent = knode.parent()) && parent.isStyle() && parent.children().length == 1) { - knode = parent; - } - _wrapNode(knode, wrapper); - } - } - }); - range.moveToBookmark(bookmark); - return self; - }, - split : function(isStart, map) { - var range = this.range, doc = range.doc; - var tempRange = range.cloneRange().collapse(isStart); - var node = tempRange.startContainer, pos = tempRange.startOffset, - parent = node.nodeType == 3 ? node.parentNode : node, - needSplit = false, knode; - while (parent && parent.parentNode) { - knode = K(parent); - if (map) { - if (!knode.isStyle()) { - break; - } - if (!_hasAttrOrCss(knode, map)) { - break; - } - } else { - if (_NOSPLIT_TAG_MAP[knode.name]) { - break; - } - } - needSplit = true; - parent = parent.parentNode; - } - if (needSplit) { - var dummy = doc.createElement('span'); - range.cloneRange().collapse(!isStart).insertNode(dummy); - if (isStart) { - tempRange.setStartBefore(parent.firstChild).setEnd(node, pos); - } else { - tempRange.setStart(node, pos).setEndAfter(parent.lastChild); - } - var frag = tempRange.extractContents(), - first = frag.firstChild, last = frag.lastChild; - if (isStart) { - tempRange.insertNode(frag); - range.setStartAfter(last).setEndBefore(dummy); - } else { - parent.appendChild(frag); - range.setStartBefore(dummy).setEndBefore(first); - } - var dummyParent = dummy.parentNode; - if (dummyParent == range.endContainer) { - var prev = K(dummy).prev(), next = K(dummy).next(); - if (prev && next && prev.type == 3 && next.type == 3) { - range.setEnd(prev[0], prev[0].nodeValue.length); - } else if (!isStart) { - range.setEnd(range.endContainer, range.endOffset - 1); - } - } - dummyParent.removeChild(dummy); - } - return this; - }, - remove : function(map) { - var self = this, doc = self.doc, range = self.range; - range.enlarge(); - if (range.startOffset === 0) { - var ksc = K(range.startContainer), parent; - while ((parent = ksc.parent()) && parent.isStyle() && parent.children().length == 1) { - ksc = parent; - } - range.setStart(ksc[0], 0); - ksc = K(range.startContainer); - if (ksc.isBlock()) { - _removeAttrOrCss(ksc, map); - } - var kscp = ksc.parent(); - if (kscp && kscp.isBlock()) { - _removeAttrOrCss(kscp, map); - } - } - var sc, so; - if (range.collapsed) { - self.split(true, map); - sc = range.startContainer; - so = range.startOffset; - if (so > 0) { - var sb = K(sc.childNodes[so - 1]); - if (sb && _isEmptyNode(sb)) { - sb.remove(); - range.setStart(sc, so - 1); - } - } - var sa = K(sc.childNodes[so]); - if (sa && _isEmptyNode(sa)) { - sa.remove(); - } - if (_isEmptyNode(sc)) { - range.startBefore(sc); - sc.remove(); - } - range.collapse(true); - return self; - } - self.split(true, map); - self.split(false, map); - var startDummy = doc.createElement('span'), endDummy = doc.createElement('span'); - range.cloneRange().collapse(false).insertNode(endDummy); - range.cloneRange().collapse(true).insertNode(startDummy); - var nodeList = [], cmpStart = false; - K(range.commonAncestor()).scan(function(node) { - if (!cmpStart && node == startDummy) { - cmpStart = true; - return; - } - if (node == endDummy) { - return false; - } - if (cmpStart) { - nodeList.push(node); - } - }); - K(startDummy).remove(); - K(endDummy).remove(); - sc = range.startContainer; - so = range.startOffset; - var ec = range.endContainer, eo = range.endOffset; - if (so > 0) { - var startBefore = K(sc.childNodes[so - 1]); - if (startBefore && _isEmptyNode(startBefore)) { - startBefore.remove(); - range.setStart(sc, so - 1); - if (sc == ec) { - range.setEnd(ec, eo - 1); - } - } - var startAfter = K(sc.childNodes[so]); - if (startAfter && _isEmptyNode(startAfter)) { - startAfter.remove(); - if (sc == ec) { - range.setEnd(ec, eo - 1); - } - } - } - var endAfter = K(ec.childNodes[range.endOffset]); - if (endAfter && _isEmptyNode(endAfter)) { - endAfter.remove(); - } - var bookmark = range.createBookmark(true); - _each(nodeList, function(i, node) { - _removeAttrOrCss(K(node), map); - }); - range.moveToBookmark(bookmark); - return self; - }, - commonNode : function(map) { - var range = this.range; - var ec = range.endContainer, eo = range.endOffset, - node = (ec.nodeType == 3 || eo === 0) ? ec : ec.childNodes[eo - 1]; - function find(node) { - var child = node, parent = node; - while (parent) { - if (_hasAttrOrCss(K(parent), map)) { - return K(parent); - } - parent = parent.parentNode; - } - while (child && (child = child.lastChild)) { - if (_hasAttrOrCss(K(child), map)) { - return K(child); - } - } - return null; - } - var cNode = find(node); - if (cNode) { - return cNode; - } - if (node.nodeType == 1 || (ec.nodeType == 3 && eo === 0)) { - var prev = K(node).prev(); - if (prev) { - return find(prev); - } - } - return null; - }, - commonAncestor : function(tagName) { - var range = this.range, - sc = range.startContainer, so = range.startOffset, - ec = range.endContainer, eo = range.endOffset, - startNode = (sc.nodeType == 3 || so === 0) ? sc : sc.childNodes[so - 1], - endNode = (ec.nodeType == 3 || eo === 0) ? ec : ec.childNodes[eo - 1]; - function find(node) { - while (node) { - if (node.nodeType == 1) { - if (node.tagName.toLowerCase() === tagName) { - return node; - } - } - node = node.parentNode; - } - return null; - } - var start = find(startNode), end = find(endNode); - if (start && end && start === end) { - return K(start); - } - return null; - }, - state : function(key) { - var self = this, doc = self.doc, bool = false; - try { - bool = doc.queryCommandState(key); - } catch (e) {} - return bool; - }, - val : function(key) { - var self = this, doc = self.doc, range = self.range; - function lc(val) { - return val.toLowerCase(); - } - key = lc(key); - var val = '', knode; - if (key === 'fontfamily' || key === 'fontname') { - val = _nativeCommandValue(doc, 'fontname'); - val = val.replace(/['"]/g, ''); - return lc(val); - } - if (key === 'formatblock') { - val = _nativeCommandValue(doc, key); - if (val === '') { - knode = self.commonNode({'h1,h2,h3,h4,h5,h6,p,div,pre,address' : '*'}); - if (knode) { - val = knode.name; - } - } - if (val === 'Normal') { - val = 'p'; - } - return lc(val); - } - if (key === 'fontsize') { - knode = self.commonNode({'*' : '.font-size'}); - if (knode) { - val = knode.css('font-size'); - } - return lc(val); - } - if (key === 'forecolor') { - knode = self.commonNode({'*' : '.color'}); - if (knode) { - val = knode.css('color'); - } - val = _toHex(val); - if (val === '') { - val = 'default'; - } - return lc(val); - } - if (key === 'hilitecolor') { - knode = self.commonNode({'*' : '.background-color'}); - if (knode) { - val = knode.css('background-color'); - } - val = _toHex(val); - if (val === '') { - val = 'default'; - } - return lc(val); - } - return val; - }, - toggle : function(wrapper, map) { - var self = this; - if (self.commonNode(map)) { - self.remove(map); - } else { - self.wrap(wrapper); - } - return self.select(); - }, - bold : function() { - return this.toggle('', { - span : '.font-weight=bold', - strong : '*', - b : '*' - }); - }, - italic : function() { - return this.toggle('', { - span : '.font-style=italic', - em : '*', - i : '*' - }); - }, - underline : function() { - return this.toggle('', { - span : '.text-decoration=underline', - u : '*' - }); - }, - strikethrough : function() { - return this.toggle('', { - span : '.text-decoration=line-through', - s : '*' - }); - }, - forecolor : function(val) { - return this.wrap('').select(); - }, - hilitecolor : function(val) { - return this.wrap('').select(); - }, - fontsize : function(val) { - return this.wrap('').select(); - }, - fontname : function(val) { - return this.fontfamily(val); - }, - fontfamily : function(val) { - return this.wrap('').select(); - }, - removeformat : function() { - var map = { - '*' : '.font-weight,.font-style,.text-decoration,.color,.background-color,.font-size,.font-family,.text-indent' - }, - tags = _STYLE_TAG_MAP; - _each(tags, function(key, val) { - map[key] = '*'; - }); - this.remove(map); - return this.select(); - }, - inserthtml : function(val, quickMode) { - var self = this, range = self.range; - if (val === '') { - return self; - } - function pasteHtml(range, val) { - val = '' + val; - var rng = range.get(); - if (rng.item) { - rng.item(0).outerHTML = val; - } else { - rng.pasteHTML(val); - } - var temp = range.doc.getElementById('__kindeditor_temp_tag__'); - temp.parentNode.removeChild(temp); - var newRange = _toRange(rng); - range.setEnd(newRange.endContainer, newRange.endOffset); - range.collapse(false); - self.select(false); - } - function insertHtml(range, val) { - var doc = range.doc, - frag = doc.createDocumentFragment(); - K('@' + val, doc).each(function() { - frag.appendChild(this); - }); - range.deleteContents(); - range.insertNode(frag); - range.collapse(false); - self.select(false); - } - if (_IERANGE && quickMode) { - try { - pasteHtml(range, val); - } catch(e) { - insertHtml(range, val); - } - return self; - } - insertHtml(range, val); - return self; - }, - hr : function() { - return this.inserthtml('
'); - }, - print : function() { - this.win.print(); - return this; - }, - insertimage : function(url, title, width, height, border, align) { - title = _undef(title, ''); - border = _undef(border, 0); - var html = ''; - return self.inserthtml(html); - } - if (range.isControl()) { - var node = K(range.startContainer.childNodes[range.startOffset]); - html += '>'; - node.after(K(html, doc)); - node.next().append(node); - range.selectNode(node[0]); - return self.select(); - } - function setAttr(node, url, type) { - K(node).attr('href', url).attr('data-ke-src', url); - if (type) { - K(node).attr('target', type); - } else { - K(node).removeAttr('target'); - } - } - var sc = range.startContainer, so = range.startOffset, - ec = range.endContainer, eo = range.endOffset; - if (sc.nodeType == 1 && sc === ec && so + 1 === eo) { - var child = sc.childNodes[so]; - if (child.nodeName.toLowerCase() == 'a') { - setAttr(child, url, type); - return self; - } - } - _nativeCommand(doc, 'createlink', '__kindeditor_temp_url__'); - K('a[href="__kindeditor_temp_url__"]', doc).each(function() { - setAttr(this, url, type); - }); - return self; - }, - unlink : function() { - var self = this, doc = self.doc, range = self.range; - self.select(); - if (range.collapsed) { - var a = self.commonNode({ a : '*' }); - if (a) { - range.selectNode(a.get()); - self.select(); - } - _nativeCommand(doc, 'unlink', null); - if (_WEBKIT && K(range.startContainer).name === 'img') { - var parent = K(range.startContainer).parent(); - if (parent.name === 'a') { - parent.remove(true); - } - } - } else { - _nativeCommand(doc, 'unlink', null); - } - return self; - } -}); -_each(('formatblock,selectall,justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,' + - 'insertunorderedlist,indent,outdent,subscript,superscript').split(','), function(i, name) { - KCmd.prototype[name] = function(val) { - var self = this; - self.select(); - _nativeCommand(self.doc, name, val); - if (_IERANGE && _inArray(name, 'justifyleft,justifycenter,justifyright,justifyfull'.split(',')) >= 0) { - self.selection(); - } - if (!_IERANGE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) { - self.selection(); - } - - return self; - }; -}); -_each('cut,copy,paste'.split(','), function(i, name) { - KCmd.prototype[name] = function() { - var self = this; - if (!self.doc.queryCommandSupported(name)) { - throw 'not supported'; - } - self.select(); - _nativeCommand(self.doc, name, null); - return self; - }; -}); -function _cmd(mixed) { - if (mixed.nodeName) { - var doc = _getDoc(mixed); - mixed = _range(doc).selectNodeContents(doc.body).collapse(false); - } - return new KCmd(mixed); -} -K.CmdClass = KCmd; -K.cmd = _cmd; -function _drag(options) { - var moveEl = options.moveEl, - moveFn = options.moveFn, - clickEl = options.clickEl || moveEl, - beforeDrag = options.beforeDrag, - iframeFix = options.iframeFix === undefined ? true : options.iframeFix; - var docs = [document]; - if (iframeFix) { - K('iframe').each(function() { - var src = _formatUrl(this.src || '', 'absolute'); - if (/^https?:\/\//.test(src)) { - return; - } - var doc; - try { - doc = _iframeDoc(this); - } catch(e) {} - if (doc) { - var pos = K(this).pos(); - K(doc).data('pos-x', pos.x); - K(doc).data('pos-y', pos.y); - docs.push(doc); - } - }); - } - clickEl.mousedown(function(e) { - //新加的 - if(e.button !== 0 && e.button !== 1) { - return; - } - e.stopPropagation(); - var self = clickEl.get(), - x = _removeUnit(moveEl.css('left')), - y = _removeUnit(moveEl.css('top')), - width = moveEl.width(), - height = moveEl.height(), - pageX = e.pageX, - pageY = e.pageY; - if (beforeDrag) { - beforeDrag(); - } - function moveListener(e) { - e.preventDefault(); - var kdoc = K(_getDoc(e.target)); - var diffX = _round((kdoc.data('pos-x') || 0) + e.pageX - pageX); - var diffY = _round((kdoc.data('pos-y') || 0) + e.pageY - pageY); - moveFn.call(clickEl, x, y, width, height, diffX, diffY); - } - function selectListener(e) { - e.preventDefault(); - } - function upListener(e) { - e.preventDefault(); - K(docs).unbind('mousemove', moveListener) - .unbind('mouseup', upListener) - .unbind('selectstart', selectListener); - if (self.releaseCapture) { - self.releaseCapture(); - } - } - K(docs).mousemove(moveListener) - .mouseup(upListener) - .bind('selectstart', selectListener); - if (self.setCapture) { - self.setCapture(); - } - }); -} -function KWidget(options) { - this.init(options); -} -_extend(KWidget, { - init : function(options) { - var self = this; - self.name = options.name || ''; - self.doc = options.doc || document; - self.win = _getWin(self.doc); - self.x = _addUnit(options.x); - self.y = _addUnit(options.y); - self.z = options.z; - self.width = _addUnit(options.width); - self.height = _addUnit(options.height); - self.div = K('
'); - self.options = options; - self._alignEl = options.alignEl; - if (self.width) { - self.div.css('width', self.width); - } - if (self.height) { - self.div.css('height', self.height); - } - if (self.z) { - self.div.css({ - position : 'absolute', - left : self.x, - top : self.y, - 'z-index' : self.z - }); - } - if (self.z && (self.x === undefined || self.y === undefined)) { - self.autoPos(self.width, self.height); - } - if (options.cls) { - self.div.addClass(options.cls); - } - if (options.shadowMode) { - self.div.addClass('ke-shadow'); - } - if (options.css) { - self.div.css(options.css); - } - if (options.src) { - K(options.src).replaceWith(self.div); - } else { - K(self.doc.body).append(self.div); - } - if (options.html) { - self.div.html(options.html); - } - if (options.autoScroll) { - if (_IE && _V < 7 || _QUIRKS) { - var scrollPos = _getScrollPos(); - K(self.win).bind('scroll', function(e) { - var pos = _getScrollPos(), - diffX = pos.x - scrollPos.x, - diffY = pos.y - scrollPos.y; - self.pos(_removeUnit(self.x) + diffX, _removeUnit(self.y) + diffY, false); - }); - } else { - self.div.css('position', 'fixed'); - } - } - }, - pos : function(x, y, updateProp) { - var self = this; - updateProp = _undef(updateProp, true); - if (x !== null) { - x = x < 0 ? 0 : _addUnit(x); - self.div.css('left', x); - if (updateProp) { - self.x = x; - } - } - if (y !== null) { - y = y < 0 ? 0 : _addUnit(y); - self.div.css('top', y); - if (updateProp) { - self.y = y; - } - } - return self; - }, - autoPos : function(width, height) { - var self = this, - w = _removeUnit(width) || 0, - h = _removeUnit(height) || 0, - scrollPos = _getScrollPos(); - if (self._alignEl) { - var knode = K(self._alignEl), - pos = knode.pos(), - diffX = _round(knode[0].clientWidth / 2 - w / 2), - diffY = _round(knode[0].clientHeight / 2 - h / 2); - x = diffX < 0 ? pos.x : pos.x + diffX; - y = diffY < 0 ? pos.y : pos.y + diffY; - } else { - var docEl = _docElement(self.doc); - x = _round(scrollPos.x + (docEl.clientWidth - w) / 2); - y = _round(scrollPos.y + (docEl.clientHeight - h) / 2); - } - if (!(_IE && _V < 7 || _QUIRKS)) { - x -= scrollPos.x; - y -= scrollPos.y; - } - return self.pos(x, y); - }, - remove : function() { - var self = this; - if (_IE && _V < 7 || _QUIRKS) { - K(self.win).unbind('scroll'); - } - self.div.remove(); - _each(self, function(i) { - self[i] = null; - }); - return this; - }, - show : function() { - this.div.show(); - return this; - }, - hide : function() { - this.div.hide(); - return this; - }, - draggable : function(options) { - var self = this; - options = options || {}; - options.moveEl = self.div; - options.moveFn = function(x, y, width, height, diffX, diffY) { - if ((x = x + diffX) < 0) { - x = 0; - } - if ((y = y + diffY) < 0) { - y = 0; - } - self.pos(x, y); - }; - _drag(options); - return self; - } -}); -function _widget(options) { - return new KWidget(options); -} -K.WidgetClass = KWidget; -K.widget = _widget; -function _iframeDoc(iframe) { - iframe = _get(iframe); - return iframe.contentDocument || iframe.contentWindow.document; -} -var html, _direction = ''; -if ((html = document.getElementsByTagName('html'))) { - _direction = html[0].dir; -} - -function _getInitHtml(themesPath, bodyClass, cssPath, cssData) { - var arr = [ - (_direction === '' ? '' : ''), - '', - '' - ]; - if (!_isArray(cssPath)) { - cssPath = [cssPath]; - } - _each(cssPath, function(i, path) { - if (path) { - arr.push(''); - } - }); - if (cssData) { - arr.push(''); - } - arr.push(''); - return arr.join('\n'); -} -function _elementVal(knode, val) { - if (knode.hasVal()) { - if (val === undefined) { - var html = knode.val(); - html = html.replace(/(<(?:p|p\s[^>]*)>) *(<\/p>)/ig, ''); - return html; - } - if(self.placeholder != ""){ - if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(val)){ - return knode.val(""); - } - } - return knode.val(val); - } - if(self.placeholder != ""){ - if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(val)){ - return knode.html(""); - } - } else{ - return knode.html(val); - } -} -function KEdit(options) { - this.init(options); -} -_extend(KEdit, KWidget, { - init : function(options) { - var self = this; - KEdit.parent.init.call(self, options); - self.srcElement = K(options.srcElement); - self.div.addClass('ke-edit'); - self.designMode = _undef(options.designMode, true); - self.beforeGetHtml = options.beforeGetHtml; - self.beforeSetHtml = options.beforeSetHtml; - self.afterSetHtml = options.afterSetHtml; - var themesPath = _undef(options.themesPath, ''), - bodyClass = options.bodyClass, - cssPath = options.cssPath, - cssData = options.cssData, - isDocumentDomain = location.protocol != 'res:' && location.host.replace(/:\d+/, '') !== document.domain, - srcScript = ('document.open();' + - (isDocumentDomain ? 'document.domain="' + document.domain + '";' : '') + - 'document.close();'), - iframeSrc = _IE ? ' src="javascript:void(function(){' + encodeURIComponent(srcScript) + '}())"' : ''; - self.iframe = K('').css('width', '100%'); - self.textarea = K('').css('width', '100%'); - self.tabIndex = isNaN(parseInt(options.tabIndex, 10)) ? self.srcElement.attr('tabindex') : parseInt(options.tabIndex, 10); - self.iframe.attr('tabindex', self.tabIndex); - self.textarea.attr('tabindex', self.tabIndex); - if (self.width) { - self.setWidth(self.width); - } - if (self.height) { - self.setHeight(self.height); - } - if (self.designMode) { - self.textarea.hide(); - } else { - self.iframe.hide(); - } - function ready() { - var doc = _iframeDoc(self.iframe); - doc.open(); - if (isDocumentDomain) { - doc.domain = document.domain; - } - - doc.write(_getInitHtml(themesPath, bodyClass, cssPath, cssData)); - doc.close(); - self.win = self.iframe[0].contentWindow; - self.doc = doc; - var cmd = _cmd(doc); - self.afterChange(function(e) { -// if (e.which == 8) { -// var range = cmd.range -// var bookmark = range.createBookmark(); -// cmd.doc.body.innerHTML = cmd.doc.body.innerHTML.replace(/

\s*<\/p>/g,""); -// range.moveToBookmark(bookmark); -// } - cmd.selection(); - }); - if (_WEBKIT) { - K(doc).click(function(e) { - if (K(e.target).name === 'img') { - cmd.selection(true); - cmd.range.selectNode(e.target); - cmd.select(); - } - }); - } - if (_IE) { - self._mousedownHandler = function() { - var newRange = cmd.range.cloneRange(); - newRange.shrink(); - if (newRange.isControl()) { - self.blur(); - } - }; - K(document).mousedown(self._mousedownHandler); - K(doc).keydown(function(e) { - if (e.which == 8) { - cmd.selection(); - var rng = cmd.range; - if (rng.isControl()) { - rng.collapse(true); - K(rng.startContainer.childNodes[rng.startOffset]).remove(); - e.preventDefault(); - } - } - }); - } - self.cmd = cmd; - self.html(_elementVal(self.srcElement)); - if (_IE) { - doc.body.disabled = true; - doc.body.contentEditable = true; - doc.body.removeAttribute('disabled'); - } else { - doc.designMode = 'on'; - } - if (options.afterCreate) { - options.afterCreate.call(self); - } - } - if (isDocumentDomain) { - self.iframe.bind('load', function(e) { - self.iframe.unbind('load'); - if (_IE) { - ready(); - } else { - setTimeout(ready, 0); - } - }); - } - self.div.append(self.iframe); - self.div.append(self.textarea); - self.srcElement.hide(); - !isDocumentDomain && ready(); - }, - setWidth : function(val) { - var self = this; - val = _addUnit(val); - self.width = val; - self.div.css('width', val); - return self; - }, - setHeight : function(val) { - var self = this; - val = _addUnit(val); - self.height = val; - self.div.css('height', val); - self.iframe.css('height', val); - if ((_IE && _V < 8) || _QUIRKS) { - val = _addUnit(_removeUnit(val) - 2); - } - self.textarea.css('height', val); - return self; - }, - remove : function() { - var self = this, doc = self.doc; - K(doc.body).unbind(); - K(doc).unbind(); - K(self.win).unbind(); - if (self._mousedownHandler) { - K(document).unbind('mousedown', self._mousedownHandler); - } - _elementVal(self.srcElement, self.html()); - self.srcElement.show(); - doc.write(''); - self.iframe.unbind(); - self.textarea.unbind(); - KEdit.parent.remove.call(self); - }, - html : function(val, isFull) { - var self = this, doc = self.doc; - if (self.designMode) { - var body = doc.body; - if (val === undefined) { - if (isFull) { - val = '' + body.parentNode.innerHTML + ''; - } else { - val = body.innerHTML; - } - //yk - if (self.beforeGetHtml) { - val = self.beforeGetHtml(val); - } - if (_GECKO && val == '
') { - val = ''; - } - return val; - } - if (self.beforeSetHtml) { - val = self.beforeSetHtml(val); - } - if (_IE && _V >= 9) { - val = val.replace(/(<.*?checked=")checked(".*>)/ig, '$1$2'); - } - K(body).html(val); - if (self.afterSetHtml) { - self.afterSetHtml(); - } - return self; - } - if (val === undefined) { - return self.textarea.val(); - } - self.textarea.val(val); - return self; - }, - design : function(bool) { - var self = this, val; - if (bool === undefined ? !self.designMode : bool) { - if (!self.designMode) { - val = self.html(); - self.designMode = true; - - //self.html(val); - //self.textarea.hide(); - //self.iframe.show(); - //新加 - self.textarea.hide(); - self.html(val); - var iframe = self.iframe; - var height = _removeUnit(self.height); - iframe.height(height - 2); - iframe.show(); - setTimeout(function() { - iframe.height(height); - }, 0); - } - } else { - if (self.designMode) { - val = self.html(); - self.designMode = false; - self.html(val); - self.iframe.hide(); - self.textarea.show(); - } - } - return self.focus(); - }, - focus : function() { - var self = this; - self.designMode ? self.win.focus() : self.textarea[0].focus(); - return self; - }, - blur : function() { - var self = this; - if (_IE) { - var input = K('', self.div); - self.div.append(input); - input[0].focus(); - input.remove(); - } else { - self.designMode ? self.win.blur() : self.textarea[0].blur(); - } - return self; - }, - afterChange : function(fn) { - var self = this, doc = self.doc, body = doc.body; - K(doc).keyup(function(e) { - if (!e.ctrlKey && !e.altKey && _CHANGE_KEY_MAP[e.which]) { - fn(e); - } - }); - K(doc).mouseup(fn).contextmenu(fn); - K(self.win).blur(fn); - function timeoutHandler(e) { - setTimeout(function() { - fn(e); - }, 1); - } - K(body).bind('paste', timeoutHandler); - K(body).bind('cut', timeoutHandler); - return self; - } -}); -function _edit(options) { - return new KEdit(options); -} -K.EditClass = KEdit; -K.edit = _edit; -K.iframeDoc = _iframeDoc; -function _selectToolbar(name, fn) { - var self = this, - knode = self.get(name); - if (knode) { - if (knode.hasClass('ke-disabled')) { - return; - } - fn(knode); - } -} -function KToolbar(options) { - this.init(options); -} -_extend(KToolbar, KWidget, { - init : function(options) { - var self = this; - KToolbar.parent.init.call(self, options); - self.disableMode = _undef(options.disableMode, false); - self.noDisableItemMap = _toMap(_undef(options.noDisableItems, [])); - self._itemMap = {}; - self.div.addClass('ke-toolbar').bind('contextmenu,mousedown,mousemove', function(e) { - e.preventDefault(); - }).attr('unselectable', 'on'); - function find(target) { - var knode = K(target); - if (knode.hasClass('ke-outline')) { - return knode; - } - if (knode.hasClass('ke-toolbar-icon')) { - return knode.parent(); - } - } - function hover(e, method) { - var knode = find(e.target); - if (knode) { - if (knode.hasClass('ke-disabled')) { - return; - } - if (knode.hasClass('ke-selected')) { - return; - } - knode[method]('ke-on'); - } - } - self.div.mouseover(function(e) { - hover(e, 'addClass'); - }) - .mouseout(function(e) { - hover(e, 'removeClass'); - }) - .click(function(e) { - var knode = find(e.target); - if (knode) { - if (knode.hasClass('ke-disabled')) { - return; - } - self.options.click.call(this, e, knode.attr('data-name')); - } - }); - }, - get : function(name) { - //if(this._itemMap[name])return this._itemMap[name]; - //return this._itemMap[name]=K("span.ke-icon-"+name,this.div).parent() -// if (this._itemMap[name]) { -// return this._itemMap[name]; -// } -// if($("#define").css('display') == 'block'){ -// pdiv = $("#define") -// }else if($("#full").css('display') == 'block'){ -// pdiv = $("#full") -// } - var container = this.div; - if(!$("#define",container).is(':hidden')){ - pdiv = $("#define",container); - }else if(!$("#full",container).is(':hidden')){ - pdiv = $("#full",container); - } - return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent()); - }, - select : function(name) { - _selectToolbar.call(this, name, function(knode) { - knode.addClass('ke-selected'); - }); - return self; - }, - unselect : function(name) { - _selectToolbar.call(this, name, function(knode) { - knode.removeClass('ke-selected').removeClass('ke-on'); - }); - return self; - }, - enable : function(name) { - var self = this, - knode = name.get ? name : self.get(name); - if (knode) { - knode.removeClass('ke-disabled'); - knode.opacity(1); - } - return self; - }, - disable : function(name) { - var self = this, - knode = name.get ? name : self.get(name); - if (knode) { - knode.removeClass('ke-selected').addClass('ke-disabled'); - knode.opacity(0.5); - } - return self; - }, - disableAll : function(bool, noDisableItems) { - var self = this, map = self.noDisableItemMap, item; - if (noDisableItems) { - map = _toMap(noDisableItems); - } - if (bool === undefined ? !self.disableMode : bool) { - K('span.ke-outline', self.div).each(function() { - var knode = K(this), - name = knode[0].getAttribute('data-name', 2); - if (!map[name]) { - self.disable(knode); - } - }); - self.disableMode = true; - } else { - K('span.ke-outline', self.div).each(function() { - var knode = K(this), - name = knode[0].getAttribute('data-name', 2); - if (!map[name]) { - self.enable(knode); - } - }); - self.disableMode = false; - } - return self; - } -}); -function _toolbar(options) { - return new KToolbar(options); -} -K.ToolbarClass = KToolbar; -K.toolbar = _toolbar; -function KMenu(options) { - this.init(options); -} -_extend(KMenu, KWidget, { - init : function(options) { - var self = this; - options.z = options.z || 811213; - KMenu.parent.init.call(self, options); - self.centerLineMode = _undef(options.centerLineMode, true); - self.div.addClass('ke-menu').bind('click,mousedown', function(e){ - e.stopPropagation(); - }).attr('unselectable', 'on'); - }, - addItem : function(item) { - var self = this; - if (item.title === '-') { - self.div.append(K('

')); - return; - } - var itemDiv = K('
'), - leftDiv = K('
'), - rightDiv = K('
'), - height = _addUnit(item.height), - iconClass = _undef(item.iconClass, ''); - self.div.append(itemDiv); - if (height) { - itemDiv.css('height', height); - rightDiv.css('line-height', height); - } - var centerDiv; - if (self.centerLineMode) { - centerDiv = K('
'); - if (height) { - centerDiv.css('height', height); - } - } - itemDiv.mouseover(function(e) { - K(this).addClass('ke-menu-item-on'); - if (centerDiv) { - centerDiv.addClass('ke-menu-item-center-on'); - } - }) - .mouseout(function(e) { - K(this).removeClass('ke-menu-item-on'); - if (centerDiv) { - centerDiv.removeClass('ke-menu-item-center-on'); - } - }) - .click(function(e) { - item.click.call(K(this)); - e.stopPropagation(); - }) - .append(leftDiv); - if (centerDiv) { - itemDiv.append(centerDiv); - } - itemDiv.append(rightDiv); - if (item.checked) { - iconClass = 'ke-icon-checked'; - } - if (iconClass !== '') { - leftDiv.html(''); - } - rightDiv.html(item.title); - return self; - }, - remove : function() { - var self = this; - if (self.options.beforeRemove) { - self.options.beforeRemove.call(self); - } - K('.ke-menu-item', self.div[0]).unbind(); - KMenu.parent.remove.call(self); - return self; - } -}); -function _menu(options) { - return new KMenu(options); -} -K.MenuClass = KMenu; -K.menu = _menu; -function KColorPicker(options) { - this.init(options); -} -_extend(KColorPicker, KWidget, { - init : function(options) { - var self = this; - options.z = options.z || 811213; - KColorPicker.parent.init.call(self, options); - var colors = options.colors || [ - ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'], - ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'], - ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'], - ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000'] - ]; - self.selectedColor = (options.selectedColor || '').toLowerCase(); - self._cells = []; - self.div.addClass('ke-colorpicker').bind('click,mousedown', function(e){ - e.stopPropagation(); - }).attr('unselectable', 'on'); - var table = self.doc.createElement('table'); - self.div.append(table); - table.className = 'ke-colorpicker-table'; - table.cellPadding = 0; - table.cellSpacing = 0; - table.border = 0; - var row = table.insertRow(0), cell = row.insertCell(0); - cell.colSpan = colors[0].length; - self._addAttr(cell, '', 'ke-colorpicker-cell-top'); - for (var i = 0; i < colors.length; i++) { - row = table.insertRow(i + 1); - for (var j = 0; j < colors[i].length; j++) { - cell = row.insertCell(j); - self._addAttr(cell, colors[i][j], 'ke-colorpicker-cell'); - } - } - }, - _addAttr : function(cell, color, cls) { - var self = this; - cell = K(cell).addClass(cls); - if (self.selectedColor === color.toLowerCase()) { - cell.addClass('ke-colorpicker-cell-selected'); - } - cell.attr('title', color || self.options.noColor); - cell.mouseover(function(e) { - K(this).addClass('ke-colorpicker-cell-on'); - }); - cell.mouseout(function(e) { - K(this).removeClass('ke-colorpicker-cell-on'); - }); - cell.click(function(e) { - e.stop(); - self.options.click.call(K(this), color); - }); - if (color) { - cell.append(K('
').css('background-color', color)); - } else { - cell.html(self.options.noColor); - } - K(cell).attr('unselectable', 'on'); - self._cells.push(cell); - }, - remove : function() { - var self = this; - _each(self._cells, function() { - this.unbind(); - }); - KColorPicker.parent.remove.call(self); - return self; - } -}); -function _colorpicker(options) { - return new KColorPicker(options); -} -K.ColorPickerClass = KColorPicker; -K.colorpicker = _colorpicker; -function KUploadButton(options) { - this.init(options); -} -_extend(KUploadButton, { - init : function(options) { - //dump_obj(options); - var self = this, - button = K(options.button), - fieldName = options.fieldName || 'file', - url = options.url || '', - title = button.val(), - extraParams = options.extraParams || {}, - cls = button[0].className || '', - target = options.target || 'kindeditor_upload_iframe_' + new Date().getTime(); - options.afterError = options.afterError || function(str) { - alert(str); - }; - var hiddenElements = []; - for(var k in extraParams){ - hiddenElements.push(''); - } - var html = [ - '
', - (options.target ? '' : ''), - (options.form ? '
' : '
'), - '', - hiddenElements.join(''), - '', - '', - '', - (options.form ? '
' : ''), - '
'].join(''); - var div = K(html, button.doc); - $(div).hide()// 如果 以后要用根据 http://kindeditor.net/docs/uploadbutton.html#k-uploadbutton-options来使用uploadButton,那么这里的button会 是隐藏的 - button.hide(); - button.before(div); - self.div = div; - if(options.ops!=undefined)options.ops.up_file_div = div;//options.ops是KindEditor.create()的options参数 - self.button = button; - self.iframe = options.target ? K('iframe[name="' + target + '"]') : K('iframe', div); - self.form = options.form ? K(options.form) : K('form', div); - self.fileBox = K('.ke-upload-file', div); - var width = options.width || K('.ke-button-common', div).width(); - K('.ke-upload-area', div).width(width); - self.options = options; - }, - submit : function() { - var self = this, - iframe = self.iframe; - iframe.bind('load', function() { - iframe.unbind(); - var tempForm = document.createElement('form'); - self.fileBox.before(tempForm); - K(tempForm).append(self.fileBox); - tempForm.reset(); - K(tempForm).remove(true); - var doc = K.iframeDoc(iframe), - pre = doc.getElementsByTagName('pre')[0], - str = '', data; - if (pre) { - str = pre.innerHTML; - } else { - str = doc.body.innerHTML; - } - str = _unescape(str); - iframe[0].src = 'javascript:false'; - try { - data = K.json(str); - } catch (e) { - self.options.afterError.call(self, '' + doc.body.parentNode.innerHTML + ''); - } - if (data) { - self.options.afterUpload.call(self, data); - } - }); - self.form[0].submit(); - return self; - }, - remove : function() { - var self = this; - if (self.fileBox) { - self.fileBox.unbind(); - } - self.iframe.remove(); - self.div.remove(); - self.button.show(); - return self; - } -}); -function _uploadbutton(options) { - return new KUploadButton(options); -} -K.UploadButtonClass = KUploadButton; -K.uploadbutton = _uploadbutton; -function _createButton(arg) { - arg = arg || {}; - var name = arg.name || '', - span = K(''), - btn = K(''); - if (arg.click) { - btn.click(arg.click); - } - span.append(btn); - return span; -} -function KDialog(options) { - this.init(options); -} -_extend(KDialog, KWidget, { - init : function(options) { - var self = this; - var shadowMode = _undef(options.shadowMode, true); - options.z = options.z || 811213; - options.shadowMode = false; - options.autoScroll = _undef(options.autoScroll, true); - KDialog.parent.init.call(self, options); - var title = options.title, - body = K(options.body, self.doc), - previewBtn = options.previewBtn, - yesBtn = options.yesBtn, - noBtn = options.noBtn, - closeBtn = options.closeBtn, - showMask = _undef(options.showMask, true); - self.div.addClass('ke-dialog').bind('click,mousedown', function(e){ - e.stopPropagation(); - }); - var contentDiv = K('
').appendTo(self.div); - if (_IE && _V < 7) { - self.iframeMask = K('').appendTo(self.div); - } else if (shadowMode) { - K('
').appendTo(self.div); - } - var headerDiv = K('
'); - contentDiv.append(headerDiv); - headerDiv.html(title); - self.closeIcon = K('').click(closeBtn.click); - headerDiv.append(self.closeIcon); - self.draggable({ - clickEl : headerDiv, - beforeDrag : options.beforeDrag - }); - var bodyDiv = K('
'); - contentDiv.append(bodyDiv); - bodyDiv.append(body); - var footerDiv = K(''); - if (previewBtn || yesBtn || noBtn) { - contentDiv.append(footerDiv); - } - _each([ - { btn : previewBtn, name : 'preview' }, - { btn : yesBtn, name : 'yes' }, - { btn : noBtn, name : 'no' } - ], function() { - if (this.btn) { - var button = _createButton(this.btn); - button.addClass('ke-dialog-' + this.name); - footerDiv.append(button); - } - }); - if (self.height) { - bodyDiv.height(_removeUnit(self.height) - headerDiv.height() - footerDiv.height()); - } - self.div.width(self.div.width()); - self.div.height(self.div.height()); - self.mask = null; - if (showMask) { - var docEl = _docElement(self.doc), - docWidth = Math.max(docEl.scrollWidth, docEl.clientWidth), - docHeight = Math.max(docEl.scrollHeight, docEl.clientHeight); - self.mask = _widget({ - x : 0, - y : 0, - z : self.z - 1, - cls : 'ke-dialog-mask', - width : docWidth, - height : docHeight - }); - } - self.autoPos(self.div.width(), self.div.height()); - self.footerDiv = footerDiv; - self.bodyDiv = bodyDiv; - self.headerDiv = headerDiv; - self.isLoading = false; - }, - setMaskIndex : function(z) { - var self = this; - self.mask.div.css('z-index', z); - }, - showLoading : function(msg) { - msg = _undef(msg, ''); - var self = this, body = self.bodyDiv; - self.loading = K('
' + msg + '
') - .width(body.width()).height(body.height()) - .css('top', self.headerDiv.height() + 'px'); - body.css('visibility', 'hidden').after(self.loading); - self.isLoading = true; - return self; - }, - hideLoading : function() { - this.loading && this.loading.remove(); - this.bodyDiv.css('visibility', 'visible'); - this.isLoading = false; - return this; - }, - remove : function() { - var self = this; - if (self.options.beforeRemove) { - self.options.beforeRemove.call(self); - } - self.mask && self.mask.remove(); - self.iframeMask && self.iframeMask.remove(); - self.closeIcon.unbind(); - K('input', self.div).unbind(); - K('button', self.div).unbind(); - self.footerDiv.unbind(); - self.bodyDiv.unbind(); - self.headerDiv.unbind(); - K('iframe', self.div).each(function() { - K(this).remove(); - }); - KDialog.parent.remove.call(self); - return self; - } -}); -function _dialog(options) { - return new KDialog(options); -} -K.DialogClass = KDialog; -K.dialog = _dialog; -function _tabs(options) { - var self = _widget(options), - remove = self.remove, - afterSelect = options.afterSelect, - div = self.div, - liList = []; - div.addClass('ke-tabs') - .bind('contextmenu,mousedown,mousemove', function(e) { - e.preventDefault(); - }); - var ul = K('
    '); - div.append(ul); - self.add = function(tab) { - var li = K('
  • ' + tab.title + '
  • '); - li.data('tab', tab); - liList.push(li); - ul.append(li); - }; - self.selectedIndex = 0; - self.select = function(index) { - self.selectedIndex = index; - _each(liList, function(i, li) { - li.unbind(); - if (i === index) { - li.addClass('ke-tabs-li-selected'); - K(li.data('tab').panel).show(''); - } else { - li.removeClass('ke-tabs-li-selected').removeClass('ke-tabs-li-on') - .mouseover(function() { - K(this).addClass('ke-tabs-li-on'); - }) - .mouseout(function() { - K(this).removeClass('ke-tabs-li-on'); - }) - .click(function() { - self.select(i); - }); - K(li.data('tab').panel).hide(); - } - }); - if (afterSelect) { - afterSelect.call(self, index); - } - }; - self.remove = function() { - _each(liList, function() { - this.remove(); - }); - ul.remove(); - remove.call(self); - }; - return self; -} -K.tabs = _tabs; -function _loadScript(url, fn) { - var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), - script = document.createElement('script'); - head.appendChild(script); - script.src = url; - script.charset = 'utf-8'; - script.onload = script.onreadystatechange = function() { - if (!this.readyState || this.readyState === 'loaded') { - if (fn) { - fn(); - } - script.onload = script.onreadystatechange = null; - head.removeChild(script); - } - }; -} -function _chopQuery(url) { - var index = url.indexOf('?'); - return index > 0 ? url.substr(0, index) : url; -} -function _loadStyle(url) { - var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), - link = document.createElement('link'), - absoluteUrl = _chopQuery(_formatUrl(url, 'absolute')); - var links = K('link[rel="stylesheet"]', head); - for (var i = 0, len = links.length; i < len; i++) { - if (_chopQuery(_formatUrl(links[i].href, 'absolute')) === absoluteUrl) { - return; - } - } - head.appendChild(link); - link.href = url; - link.rel = 'stylesheet'; -} -function _ajax(url, fn, method, param, dataType) { - method = method || 'GET'; - dataType = dataType || 'json'; - var xhr = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); - xhr.open(method, url, true); - xhr.onreadystatechange = function () { - if (xhr.readyState == 4 && xhr.status == 200) { - if (fn) { - var data = _trim(xhr.responseText); - if (dataType == 'json') { - data = _json(data); - } - fn(data); - } - } - }; - if (method == 'POST') { - var params = []; - _each(param, function(key, val) { - params.push(encodeURIComponent(key) + '=' + encodeURIComponent(val)); - }); - try { - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - } catch (e) {} - xhr.send(params.join('&')); - } else { - xhr.send(null); - } -} -K.loadScript = _loadScript; -K.loadStyle = _loadStyle; -K.ajax = _ajax; -var _plugins = {}; -function _plugin(name, fn) { - if (name === undefined) { - return _plugins; - } - if (!fn) { - return _plugins[name]; - } - _plugins[name] = fn; -} -var _language = {}; -function _parseLangKey(key) { - var match, ns = 'core'; - if ((match = /^(\w+)\.(\w+)$/.exec(key))) { - ns = match[1]; - key = match[2]; - } - return { ns : ns, key : key }; -} -function _lang(mixed, langType) { - langType = langType === undefined ? K.options.langType : langType; - if (typeof mixed === 'string') { - if (!_language[langType]) { - return 'no language'; - } - var pos = mixed.length - 1; - if (mixed.substr(pos) === '.') { - return _language[langType][mixed.substr(0, pos)]; - } - var obj = _parseLangKey(mixed); - return _language[langType][obj.ns][obj.key]; - } - _each(mixed, function(key, val) { - var obj = _parseLangKey(key); - if (!_language[langType]) { - _language[langType] = {}; - } - if (!_language[langType][obj.ns]) { - _language[langType][obj.ns] = {}; - } - _language[langType][obj.ns][obj.key] = val; - }); -} -function _getImageFromRange(range, fn) { - if (range.collapsed) { - return; - } - range = range.cloneRange().up(); - var sc = range.startContainer, so = range.startOffset; - if (!_WEBKIT && !range.isControl()) { - return; - } - var img = K(sc.childNodes[so]); - if (!img || img.name != 'img') { - return; - } - if (fn(img)) { - return img; - } -} -function _bindContextmenuEvent() { - var self = this, doc = self.edit.doc; - K(doc).contextmenu(function(e) { - if (self.menu) { - self.hideMenu(); - } - if (!self.useContextmenu) { - e.preventDefault(); - return; - } - if (self._contextmenus.length === 0) { - return; - } - var maxWidth = 0, items = []; - _each(self._contextmenus, function() { - if (this.title == '-') { - items.push(this); - return; - } - if (this.cond && this.cond()) { - items.push(this); - if (this.width && this.width > maxWidth) { - maxWidth = this.width; - } - } - }); - while (items.length > 0 && items[0].title == '-') { - items.shift(); - } - while (items.length > 0 && items[items.length - 1].title == '-') { - items.pop(); - } - var prevItem = null; - _each(items, function(i) { - if (this.title == '-' && prevItem.title == '-') { - delete items[i]; - } - prevItem = this; - }); - if (items.length > 0) { - e.preventDefault(); - var pos = K(self.edit.iframe).pos(), - menu = _menu({ - x : pos.x + e.clientX, - y : pos.y + e.clientY, - width : maxWidth, - css : { visibility: 'hidden' }, - shadowMode : self.shadowMode - }); - _each(items, function() { - if (this.title) { - menu.addItem(this); - } - }); - var docEl = _docElement(menu.doc), - menuHeight = menu.div.height(); - if (e.clientY + menuHeight >= docEl.clientHeight - 100) { - menu.pos(menu.x, _removeUnit(menu.y) - menuHeight); - } - menu.div.css('visibility', 'visible'); - self.menu = menu; - } - }); -} -function _bindNewlineEvent() { - var self = this, doc = self.edit.doc, newlineTag = self.newlineTag; - if (_IE && newlineTag !== 'br') { - return; - } - if (_GECKO && _V < 3 && newlineTag !== 'p') { - return; - } - if (_OPERA && _V < 9) { - return; - } - var brSkipTagMap = _toMap('h1,h2,h3,h4,h5,h6,pre,li'), - pSkipTagMap = _toMap('p,h1,h2,h3,h4,h5,h6,pre,li,blockquote'); - function getAncestorTagName(range) { - var ancestor = K(range.commonAncestor()); - while (ancestor) { - if (ancestor.type == 1 && !ancestor.isStyle()) { - break; - } - ancestor = ancestor.parent(); - } - return ancestor.name; - } - K(doc).keydown(function(e) { - if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) { - return; - } - self.cmd.selection(); - var tagName = getAncestorTagName(self.cmd.range); - if (tagName == 'marquee' || tagName == 'select') { - return; - } - if (newlineTag === 'br' && !brSkipTagMap[tagName]) { - e.preventDefault(); - self.insertHtml('
    ' + (_IE && _V < 9 ? '' : '\u200B')); - return; - } - if (!pSkipTagMap[tagName]) { - _nativeCommand(doc, 'formatblock', '

    '); - } - }); - K(doc).keyup(function(e) { - if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) { - return; - } - if (newlineTag == 'br') { - return; - } - if (_GECKO) { - var root = self.cmd.commonAncestor('p'); - var a = self.cmd.commonAncestor('a'); - if (a && a.text() == '') { - a.remove(true); - self.cmd.range.selectNodeContents(root[0]).collapse(true); - self.cmd.select(); - } - return; - } - self.cmd.selection(); - var tagName = getAncestorTagName(self.cmd.range); - if (tagName == 'marquee' || tagName == 'select') { - return; - } - if (!pSkipTagMap[tagName]) { - _nativeCommand(doc, 'formatblock', '

    '); - } - var div = self.cmd.commonAncestor('div'); - if (div) { - var p = K('

    '), - child = div[0].firstChild; - while (child) { - var next = child.nextSibling; - p.append(child); - child = next; - } - div.before(p); - div.remove(); - self.cmd.range.selectNodeContents(p[0]); - self.cmd.select(); - } - }); -} -function _bindTabEvent() { - var self = this, doc = self.edit.doc; - K(doc).keydown(function(e) { - if (e.which == 9) { - e.preventDefault(); - if (self.afterTab) { - self.afterTab.call(self, e); - return; - } - var cmd = self.cmd, range = cmd.range; - range.shrink(); - if (range.collapsed && range.startContainer.nodeType == 1) { - range.insertNode(K('@ ', doc)[0]); - cmd.select(); - } - self.insertHtml('    '); - } - }); -} -function _bindFocusEvent() { - var self = this; - K(self.edit.textarea[0], self.edit.win).focus(function(e) { - if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\u4e00-\u9fa5]*[\。]*<\/\w*\>\s*$/.test(self.edit.html())){ - self.edit.html(''); - } - if(typeof self.options.enable_at === 'function'){ - self.options.enable_at(); - } - if (self.afterFocus) { - self.afterFocus.call(self, e); - } - }).blur(function(e) { - if(self.isEmpty()) { - if (self.placeholder != "") { - self.edit.html("" + self.placeholder + ""); - } - // self.edit.html(self.placeholder); - // self.edit.html("" + self.placeholder + ""); - } - if (self.afterBlur) { - self.afterBlur.call(self, e); - } - }); -} -function _removeBookmarkTag(html) { - return _trim(html.replace(/]*id="?__kindeditor_bookmark_\w+_\d+__"?[^>]*><\/span>/ig, '')); -} -function _removeTempTag(html) { - return html.replace(/]+class="?__kindeditor_paste__"?[^>]*>[\s\S]*?<\/div>/ig, ''); -} -function _addBookmarkToStack(stack, bookmark) { - if (stack.length === 0) { - stack.push(bookmark); - return; - } - var prev = stack[stack.length - 1]; - if (_removeBookmarkTag(bookmark.html) !== _removeBookmarkTag(prev.html)) { - stack.push(bookmark); - } -} -function _undoToRedo(fromStack, toStack) { - var self = this, edit = self.edit, - body = edit.doc.body, - range, bookmark; - if (fromStack.length === 0) { - return self; - } - if (edit.designMode) { - range = self.cmd.range; - bookmark = range.createBookmark(true); - bookmark.html = body.innerHTML; - } else { - bookmark = { - html : body.innerHTML - }; - } - _addBookmarkToStack(toStack, bookmark); - var prev = fromStack.pop(); - if (_removeBookmarkTag(bookmark.html) === _removeBookmarkTag(prev.html) && fromStack.length > 0) { - prev = fromStack.pop(); - } - if (edit.designMode) { - edit.html(prev.html); - if (prev.start) { - range.moveToBookmark(prev); - self.select(); - } - } else { - K(body).html(_removeBookmarkTag(prev.html)); - } - return self; -} -function KEditor(options) { - var self = this; - self.options = {}; - function setOption(key, val) { - if (KEditor.prototype[key] === undefined) { - self[key] = val; - } - self.options[key] = val; - } - _each(options, function(key, val) { - setOption(key, options[key]); - }); - _each(K.options, function(key, val) { - if (self[key] === undefined) { - setOption(key, val); - } - }); - var se = K(self.srcElement || '').css('width', '100%'); + self.tabIndex = isNaN(parseInt(options.tabIndex, 10)) ? self.srcElement.attr('tabindex') : parseInt(options.tabIndex, 10); + self.iframe.attr('tabindex', self.tabIndex); + self.textarea.attr('tabindex', self.tabIndex); + if (self.width) { + self.setWidth(self.width); + } + if (self.height) { + self.setHeight(self.height); + } + if (self.designMode) { + self.textarea.hide(); + } else { + self.iframe.hide(); + } + function ready() { + var doc = _iframeDoc(self.iframe); + doc.open(); + if (isDocumentDomain) { + doc.domain = document.domain; + } + + doc.write(_getInitHtml(themesPath, bodyClass, cssPath, cssData)); + doc.close(); + self.win = self.iframe[0].contentWindow; + self.doc = doc; + var cmd = _cmd(doc); + self.afterChange(function(e) { +// if (e.which == 8) { +// var range = cmd.range +// var bookmark = range.createBookmark(); +// cmd.doc.body.innerHTML = cmd.doc.body.innerHTML.replace(/

    \s*<\/p>/g,""); +// range.moveToBookmark(bookmark); +// } + cmd.selection(); + }); + if (_WEBKIT) { + K(doc).click(function(e) { + if (K(e.target).name === 'img') { + cmd.selection(true); + cmd.range.selectNode(e.target); + cmd.select(); + } + }); + } + if (_IE) { + self._mousedownHandler = function() { + var newRange = cmd.range.cloneRange(); + newRange.shrink(); + if (newRange.isControl()) { + self.blur(); + } + }; + K(document).mousedown(self._mousedownHandler); + K(doc).keydown(function(e) { + if (e.which == 8) { + cmd.selection(); + var rng = cmd.range; + if (rng.isControl()) { + rng.collapse(true); + K(rng.startContainer.childNodes[rng.startOffset]).remove(); + e.preventDefault(); + } + } + }); + } + self.cmd = cmd; + self.html(_elementVal(self.srcElement)); + if (_IE) { + doc.body.disabled = true; + doc.body.contentEditable = true; + doc.body.removeAttribute('disabled'); + } else { + doc.designMode = 'on'; + } + if (options.afterCreate) { + options.afterCreate.call(self); + } + } + if (isDocumentDomain) { + self.iframe.bind('load', function(e) { + self.iframe.unbind('load'); + if (_IE) { + ready(); + } else { + setTimeout(ready, 0); + } + }); + } + self.div.append(self.iframe); + self.div.append(self.textarea); + self.srcElement.hide(); + !isDocumentDomain && ready(); + }, + setWidth : function(val) { + var self = this; + val = _addUnit(val); + self.width = val; + self.div.css('width', val); + return self; + }, + setHeight : function(val) { + var self = this; + val = _addUnit(val); + self.height = val; + self.div.css('height', val); + self.iframe.css('height', val); + if ((_IE && _V < 8) || _QUIRKS) { + val = _addUnit(_removeUnit(val) - 2); + } + self.textarea.css('height', val); + return self; + }, + remove : function() { + var self = this, doc = self.doc; + K(doc.body).unbind(); + K(doc).unbind(); + K(self.win).unbind(); + if (self._mousedownHandler) { + K(document).unbind('mousedown', self._mousedownHandler); + } + _elementVal(self.srcElement, self.html()); + self.srcElement.show(); + doc.write(''); + self.iframe.unbind(); + self.textarea.unbind(); + KEdit.parent.remove.call(self); + }, + html : function(val, isFull) { + var self = this, doc = self.doc; + if (self.designMode) { + var body = doc.body; + if (val === undefined) { + if (isFull) { + val = '' + body.parentNode.innerHTML + ''; + } else { + val = body.innerHTML; + } + //yk + if (self.beforeGetHtml) { + val = self.beforeGetHtml(val); + } + if (_GECKO && val == '
    ') { + val = ''; + } + return val; + } + if (self.beforeSetHtml) { + val = self.beforeSetHtml(val); + } + if (_IE && _V >= 9) { + val = val.replace(/(<.*?checked=")checked(".*>)/ig, '$1$2'); + } + K(body).html(val); + if (self.afterSetHtml) { + self.afterSetHtml(); + } + return self; + } + if (val === undefined) { + return self.textarea.val(); + } + self.textarea.val(val); + return self; + }, + design : function(bool) { + var self = this, val; + if (bool === undefined ? !self.designMode : bool) { + if (!self.designMode) { + val = self.html(); + self.designMode = true; + + //self.html(val); + //self.textarea.hide(); + //self.iframe.show(); + //新加 + self.textarea.hide(); + self.html(val); + var iframe = self.iframe; + var height = _removeUnit(self.height); + iframe.height(height - 2); + iframe.show(); + setTimeout(function() { + iframe.height(height); + }, 0); + } + } else { + if (self.designMode) { + val = self.html(); + self.designMode = false; + self.html(val); + self.iframe.hide(); + self.textarea.show(); + } + } + return self.focus(); + }, + focus : function() { + var self = this; + self.designMode ? self.win.focus() : self.textarea[0].focus(); + return self; + }, + blur : function() { + var self = this; + if (_IE) { + var input = K('', self.div); + self.div.append(input); + input[0].focus(); + input.remove(); + } else { + self.designMode ? self.win.blur() : self.textarea[0].blur(); + } + return self; + }, + afterChange : function(fn) { + var self = this, doc = self.doc, body = doc.body; + K(doc).keyup(function(e) { + if (!e.ctrlKey && !e.altKey && _CHANGE_KEY_MAP[e.which]) { + fn(e); + } + }); + K(doc).mouseup(fn).contextmenu(fn); + K(self.win).blur(fn); + function timeoutHandler(e) { + setTimeout(function() { + fn(e); + }, 1); + } + K(body).bind('paste', timeoutHandler); + K(body).bind('cut', timeoutHandler); + return self; + } +}); +function _edit(options) { + return new KEdit(options); +} +K.EditClass = KEdit; +K.edit = _edit; +K.iframeDoc = _iframeDoc; +function _selectToolbar(name, fn) { + var self = this, + knode = self.get(name); + if (knode) { + if (knode.hasClass('ke-disabled')) { + return; + } + fn(knode); + } +} +function KToolbar(options) { + this.init(options); +} +_extend(KToolbar, KWidget, { + init : function(options) { + var self = this; + KToolbar.parent.init.call(self, options); + self.disableMode = _undef(options.disableMode, false); + self.noDisableItemMap = _toMap(_undef(options.noDisableItems, [])); + self._itemMap = {}; + self.div.addClass('ke-toolbar').bind('contextmenu,mousedown,mousemove', function(e) { + e.preventDefault(); + }).attr('unselectable', 'on'); + function find(target) { + var knode = K(target); + if (knode.hasClass('ke-outline')) { + return knode; + } + if (knode.hasClass('ke-toolbar-icon')) { + return knode.parent(); + } + } + function hover(e, method) { + var knode = find(e.target); + if (knode) { + if (knode.hasClass('ke-disabled')) { + return; + } + if (knode.hasClass('ke-selected')) { + return; + } + knode[method]('ke-on'); + } + } + self.div.mouseover(function(e) { + hover(e, 'addClass'); + }) + .mouseout(function(e) { + hover(e, 'removeClass'); + }) + .click(function(e) { + var knode = find(e.target); + if (knode) { + if (knode.hasClass('ke-disabled')) { + return; + } + self.options.click.call(this, e, knode.attr('data-name')); + } + }); + }, + get : function(name) { + //if(this._itemMap[name])return this._itemMap[name]; + //return this._itemMap[name]=K("span.ke-icon-"+name,this.div).parent() +// if (this._itemMap[name]) { +// return this._itemMap[name]; +// } +// if($("#define").css('display') == 'block'){ +// pdiv = $("#define") +// }else if($("#full").css('display') == 'block'){ +// pdiv = $("#full") +// } + var container = this.div; + if(!$("#define",container).is(':hidden')){ + pdiv = $("#define",container); + }else if(!$("#full",container).is(':hidden')){ + pdiv = $("#full",container); + } + return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent()); + }, + select : function(name) { + _selectToolbar.call(this, name, function(knode) { + knode.addClass('ke-selected'); + }); + return self; + }, + unselect : function(name) { + _selectToolbar.call(this, name, function(knode) { + knode.removeClass('ke-selected').removeClass('ke-on'); + }); + return self; + }, + enable : function(name) { + var self = this, + knode = name.get ? name : self.get(name); + if (knode) { + knode.removeClass('ke-disabled'); + knode.opacity(1); + } + return self; + }, + disable : function(name) { + var self = this, + knode = name.get ? name : self.get(name); + if (knode) { + knode.removeClass('ke-selected').addClass('ke-disabled'); + knode.opacity(0.5); + } + return self; + }, + disableAll : function(bool, noDisableItems) { + var self = this, map = self.noDisableItemMap, item; + if (noDisableItems) { + map = _toMap(noDisableItems); + } + if (bool === undefined ? !self.disableMode : bool) { + K('span.ke-outline', self.div).each(function() { + var knode = K(this), + name = knode[0].getAttribute('data-name', 2); + if (!map[name]) { + self.disable(knode); + } + }); + self.disableMode = true; + } else { + K('span.ke-outline', self.div).each(function() { + var knode = K(this), + name = knode[0].getAttribute('data-name', 2); + if (!map[name]) { + self.enable(knode); + } + }); + self.disableMode = false; + } + return self; + } +}); +function _toolbar(options) { + return new KToolbar(options); +} +K.ToolbarClass = KToolbar; +K.toolbar = _toolbar; +function KMenu(options) { + this.init(options); +} +_extend(KMenu, KWidget, { + init : function(options) { + var self = this; + options.z = options.z || 811213; + KMenu.parent.init.call(self, options); + self.centerLineMode = _undef(options.centerLineMode, true); + self.div.addClass('ke-menu').bind('click,mousedown', function(e){ + e.stopPropagation(); + }).attr('unselectable', 'on'); + }, + addItem : function(item) { + var self = this; + if (item.title === '-') { + self.div.append(K('

    ')); + return; + } + var itemDiv = K('
    '), + leftDiv = K('
    '), + rightDiv = K('
    '), + height = _addUnit(item.height), + iconClass = _undef(item.iconClass, ''); + self.div.append(itemDiv); + if (height) { + itemDiv.css('height', height); + rightDiv.css('line-height', height); + } + var centerDiv; + if (self.centerLineMode) { + centerDiv = K('
    '); + if (height) { + centerDiv.css('height', height); + } + } + itemDiv.mouseover(function(e) { + K(this).addClass('ke-menu-item-on'); + if (centerDiv) { + centerDiv.addClass('ke-menu-item-center-on'); + } + }) + .mouseout(function(e) { + K(this).removeClass('ke-menu-item-on'); + if (centerDiv) { + centerDiv.removeClass('ke-menu-item-center-on'); + } + }) + .click(function(e) { + item.click.call(K(this)); + e.stopPropagation(); + }) + .append(leftDiv); + if (centerDiv) { + itemDiv.append(centerDiv); + } + itemDiv.append(rightDiv); + if (item.checked) { + iconClass = 'ke-icon-checked'; + } + if (iconClass !== '') { + leftDiv.html(''); + } + rightDiv.html(item.title); + return self; + }, + remove : function() { + var self = this; + if (self.options.beforeRemove) { + self.options.beforeRemove.call(self); + } + K('.ke-menu-item', self.div[0]).unbind(); + KMenu.parent.remove.call(self); + return self; + } +}); +function _menu(options) { + return new KMenu(options); +} +K.MenuClass = KMenu; +K.menu = _menu; +function KColorPicker(options) { + this.init(options); +} +_extend(KColorPicker, KWidget, { + init : function(options) { + var self = this; + options.z = options.z || 811213; + KColorPicker.parent.init.call(self, options); + var colors = options.colors || [ + ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'], + ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'], + ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'], + ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000'] + ]; + self.selectedColor = (options.selectedColor || '').toLowerCase(); + self._cells = []; + self.div.addClass('ke-colorpicker').bind('click,mousedown', function(e){ + e.stopPropagation(); + }).attr('unselectable', 'on'); + var table = self.doc.createElement('table'); + self.div.append(table); + table.className = 'ke-colorpicker-table'; + table.cellPadding = 0; + table.cellSpacing = 0; + table.border = 0; + var row = table.insertRow(0), cell = row.insertCell(0); + cell.colSpan = colors[0].length; + self._addAttr(cell, '', 'ke-colorpicker-cell-top'); + for (var i = 0; i < colors.length; i++) { + row = table.insertRow(i + 1); + for (var j = 0; j < colors[i].length; j++) { + cell = row.insertCell(j); + self._addAttr(cell, colors[i][j], 'ke-colorpicker-cell'); + } + } + }, + _addAttr : function(cell, color, cls) { + var self = this; + cell = K(cell).addClass(cls); + if (self.selectedColor === color.toLowerCase()) { + cell.addClass('ke-colorpicker-cell-selected'); + } + cell.attr('title', color || self.options.noColor); + cell.mouseover(function(e) { + K(this).addClass('ke-colorpicker-cell-on'); + }); + cell.mouseout(function(e) { + K(this).removeClass('ke-colorpicker-cell-on'); + }); + cell.click(function(e) { + e.stop(); + self.options.click.call(K(this), color); + }); + if (color) { + cell.append(K('
    ').css('background-color', color)); + } else { + cell.html(self.options.noColor); + } + K(cell).attr('unselectable', 'on'); + self._cells.push(cell); + }, + remove : function() { + var self = this; + _each(self._cells, function() { + this.unbind(); + }); + KColorPicker.parent.remove.call(self); + return self; + } +}); +function _colorpicker(options) { + return new KColorPicker(options); +} +K.ColorPickerClass = KColorPicker; +K.colorpicker = _colorpicker; +function KUploadButton(options) { + this.init(options); +} +_extend(KUploadButton, { + init : function(options) { + //dump_obj(options); + var self = this, + button = K(options.button), + fieldName = options.fieldName || 'file', + url = options.url || '', + title = button.val(), + extraParams = options.extraParams || {}, + cls = button[0].className || '', + target = options.target || 'kindeditor_upload_iframe_' + new Date().getTime(); + options.afterError = options.afterError || function(str) { + alert(str); + }; + var hiddenElements = []; + for(var k in extraParams){ + hiddenElements.push(''); + } + var html = [ + '
    ', + (options.target ? '' : ''), + (options.form ? '
    ' : '
    '), + '', + hiddenElements.join(''), + '', + '', + '', + (options.form ? '
    ' : ''), + '
    '].join(''); + var div = K(html, button.doc); + $(div).hide()// 如果 以后要用根据 http://kindeditor.net/docs/uploadbutton.html#k-uploadbutton-options来使用uploadButton,那么这里的button会 是隐藏的 + button.hide(); + button.before(div); + self.div = div; + if(options.ops!=undefined)options.ops.up_file_div = div;//options.ops是KindEditor.create()的options参数 + self.button = button; + self.iframe = options.target ? K('iframe[name="' + target + '"]') : K('iframe', div); + self.form = options.form ? K(options.form) : K('form', div); + self.fileBox = K('.ke-upload-file', div); + var width = options.width || K('.ke-button-common', div).width(); + K('.ke-upload-area', div).width(width); + self.options = options; + }, + submit : function() { + var self = this, + iframe = self.iframe; + iframe.bind('load', function() { + iframe.unbind(); + var tempForm = document.createElement('form'); + self.fileBox.before(tempForm); + K(tempForm).append(self.fileBox); + tempForm.reset(); + K(tempForm).remove(true); + var doc = K.iframeDoc(iframe), + pre = doc.getElementsByTagName('pre')[0], + str = '', data; + if (pre) { + str = pre.innerHTML; + } else { + str = doc.body.innerHTML; + } + str = _unescape(str); + iframe[0].src = 'javascript:false'; + try { + data = K.json(str); + } catch (e) { + self.options.afterError.call(self, '' + doc.body.parentNode.innerHTML + ''); + } + if (data) { + self.options.afterUpload.call(self, data); + } + }); + self.form[0].submit(); + return self; + }, + remove : function() { + var self = this; + if (self.fileBox) { + self.fileBox.unbind(); + } + self.iframe.remove(); + self.div.remove(); + self.button.show(); + return self; + } +}); +function _uploadbutton(options) { + return new KUploadButton(options); +} +K.UploadButtonClass = KUploadButton; +K.uploadbutton = _uploadbutton; +function _createButton(arg) { + arg = arg || {}; + var name = arg.name || '', + span = K(''), + btn = K(''); + if (arg.click) { + btn.click(arg.click); + } + span.append(btn); + return span; +} +function KDialog(options) { + this.init(options); +} +_extend(KDialog, KWidget, { + init : function(options) { + var self = this; + var shadowMode = _undef(options.shadowMode, true); + options.z = options.z || 811213; + options.shadowMode = false; + options.autoScroll = _undef(options.autoScroll, true); + KDialog.parent.init.call(self, options); + var title = options.title, + body = K(options.body, self.doc), + previewBtn = options.previewBtn, + yesBtn = options.yesBtn, + noBtn = options.noBtn, + closeBtn = options.closeBtn, + showMask = _undef(options.showMask, true); + self.div.addClass('ke-dialog').bind('click,mousedown', function(e){ + e.stopPropagation(); + }); + var contentDiv = K('
    ').appendTo(self.div); + if (_IE && _V < 7) { + self.iframeMask = K('').appendTo(self.div); + } else if (shadowMode) { + K('
    ').appendTo(self.div); + } + var headerDiv = K('
    '); + contentDiv.append(headerDiv); + headerDiv.html(title); + self.closeIcon = K('').click(closeBtn.click); + headerDiv.append(self.closeIcon); + self.draggable({ + clickEl : headerDiv, + beforeDrag : options.beforeDrag + }); + var bodyDiv = K('
    '); + contentDiv.append(bodyDiv); + bodyDiv.append(body); + var footerDiv = K(''); + if (previewBtn || yesBtn || noBtn) { + contentDiv.append(footerDiv); + } + _each([ + { btn : previewBtn, name : 'preview' }, + { btn : yesBtn, name : 'yes' }, + { btn : noBtn, name : 'no' } + ], function() { + if (this.btn) { + var button = _createButton(this.btn); + button.addClass('ke-dialog-' + this.name); + footerDiv.append(button); + } + }); + if (self.height) { + bodyDiv.height(_removeUnit(self.height) - headerDiv.height() - footerDiv.height()); + } + self.div.width(self.div.width()); + self.div.height(self.div.height()); + self.mask = null; + if (showMask) { + var docEl = _docElement(self.doc), + docWidth = Math.max(docEl.scrollWidth, docEl.clientWidth), + docHeight = Math.max(docEl.scrollHeight, docEl.clientHeight); + self.mask = _widget({ + x : 0, + y : 0, + z : self.z - 1, + cls : 'ke-dialog-mask', + width : docWidth, + height : docHeight + }); + } + self.autoPos(self.div.width(), self.div.height()); + self.footerDiv = footerDiv; + self.bodyDiv = bodyDiv; + self.headerDiv = headerDiv; + self.isLoading = false; + }, + setMaskIndex : function(z) { + var self = this; + self.mask.div.css('z-index', z); + }, + showLoading : function(msg) { + msg = _undef(msg, ''); + var self = this, body = self.bodyDiv; + self.loading = K('
    ' + msg + '
    ') + .width(body.width()).height(body.height()) + .css('top', self.headerDiv.height() + 'px'); + body.css('visibility', 'hidden').after(self.loading); + self.isLoading = true; + return self; + }, + hideLoading : function() { + this.loading && this.loading.remove(); + this.bodyDiv.css('visibility', 'visible'); + this.isLoading = false; + return this; + }, + remove : function() { + var self = this; + if (self.options.beforeRemove) { + self.options.beforeRemove.call(self); + } + self.mask && self.mask.remove(); + self.iframeMask && self.iframeMask.remove(); + self.closeIcon.unbind(); + K('input', self.div).unbind(); + K('button', self.div).unbind(); + self.footerDiv.unbind(); + self.bodyDiv.unbind(); + self.headerDiv.unbind(); + K('iframe', self.div).each(function() { + K(this).remove(); + }); + KDialog.parent.remove.call(self); + return self; + } +}); +function _dialog(options) { + return new KDialog(options); +} +K.DialogClass = KDialog; +K.dialog = _dialog; +function _tabs(options) { + var self = _widget(options), + remove = self.remove, + afterSelect = options.afterSelect, + div = self.div, + liList = []; + div.addClass('ke-tabs') + .bind('contextmenu,mousedown,mousemove', function(e) { + e.preventDefault(); + }); + var ul = K('
      '); + div.append(ul); + self.add = function(tab) { + var li = K('
    • ' + tab.title + '
    • '); + li.data('tab', tab); + liList.push(li); + ul.append(li); + }; + self.selectedIndex = 0; + self.select = function(index) { + self.selectedIndex = index; + _each(liList, function(i, li) { + li.unbind(); + if (i === index) { + li.addClass('ke-tabs-li-selected'); + K(li.data('tab').panel).show(''); + } else { + li.removeClass('ke-tabs-li-selected').removeClass('ke-tabs-li-on') + .mouseover(function() { + K(this).addClass('ke-tabs-li-on'); + }) + .mouseout(function() { + K(this).removeClass('ke-tabs-li-on'); + }) + .click(function() { + self.select(i); + }); + K(li.data('tab').panel).hide(); + } + }); + if (afterSelect) { + afterSelect.call(self, index); + } + }; + self.remove = function() { + _each(liList, function() { + this.remove(); + }); + ul.remove(); + remove.call(self); + }; + return self; +} +K.tabs = _tabs; +function _loadScript(url, fn) { + var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), + script = document.createElement('script'); + head.appendChild(script); + script.src = url; + script.charset = 'utf-8'; + script.onload = script.onreadystatechange = function() { + if (!this.readyState || this.readyState === 'loaded') { + if (fn) { + fn(); + } + script.onload = script.onreadystatechange = null; + head.removeChild(script); + } + }; +} +function _chopQuery(url) { + var index = url.indexOf('?'); + return index > 0 ? url.substr(0, index) : url; +} +function _loadStyle(url) { + var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement), + link = document.createElement('link'), + absoluteUrl = _chopQuery(_formatUrl(url, 'absolute')); + var links = K('link[rel="stylesheet"]', head); + for (var i = 0, len = links.length; i < len; i++) { + if (_chopQuery(_formatUrl(links[i].href, 'absolute')) === absoluteUrl) { + return; + } + } + head.appendChild(link); + link.href = url; + link.rel = 'stylesheet'; +} +function _ajax(url, fn, method, param, dataType) { + method = method || 'GET'; + dataType = dataType || 'json'; + var xhr = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); + xhr.open(method, url, true); + xhr.onreadystatechange = function () { + if (xhr.readyState == 4 && xhr.status == 200) { + if (fn) { + var data = _trim(xhr.responseText); + if (dataType == 'json') { + data = _json(data); + } + fn(data); + } + } + }; + if (method == 'POST') { + var params = []; + _each(param, function(key, val) { + params.push(encodeURIComponent(key) + '=' + encodeURIComponent(val)); + }); + try { + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + } catch (e) {} + xhr.send(params.join('&')); + } else { + xhr.send(null); + } +} +K.loadScript = _loadScript; +K.loadStyle = _loadStyle; +K.ajax = _ajax; +var _plugins = {}; +function _plugin(name, fn) { + if (name === undefined) { + return _plugins; + } + if (!fn) { + return _plugins[name]; + } + _plugins[name] = fn; +} +var _language = {}; +function _parseLangKey(key) { + var match, ns = 'core'; + if ((match = /^(\w+)\.(\w+)$/.exec(key))) { + ns = match[1]; + key = match[2]; + } + return { ns : ns, key : key }; +} +function _lang(mixed, langType) { + langType = langType === undefined ? K.options.langType : langType; + if (typeof mixed === 'string') { + if (!_language[langType]) { + return 'no language'; + } + var pos = mixed.length - 1; + if (mixed.substr(pos) === '.') { + return _language[langType][mixed.substr(0, pos)]; + } + var obj = _parseLangKey(mixed); + return _language[langType][obj.ns][obj.key]; + } + _each(mixed, function(key, val) { + var obj = _parseLangKey(key); + if (!_language[langType]) { + _language[langType] = {}; + } + if (!_language[langType][obj.ns]) { + _language[langType][obj.ns] = {}; + } + _language[langType][obj.ns][obj.key] = val; + }); +} +function _getImageFromRange(range, fn) { + if (range.collapsed) { + return; + } + range = range.cloneRange().up(); + var sc = range.startContainer, so = range.startOffset; + if (!_WEBKIT && !range.isControl()) { + return; + } + var img = K(sc.childNodes[so]); + if (!img || img.name != 'img') { + return; + } + if (fn(img)) { + return img; + } +} +function _bindContextmenuEvent() { + var self = this, doc = self.edit.doc; + K(doc).contextmenu(function(e) { + if (self.menu) { + self.hideMenu(); + } + if (!self.useContextmenu) { + e.preventDefault(); + return; + } + if (self._contextmenus.length === 0) { + return; + } + var maxWidth = 0, items = []; + _each(self._contextmenus, function() { + if (this.title == '-') { + items.push(this); + return; + } + if (this.cond && this.cond()) { + items.push(this); + if (this.width && this.width > maxWidth) { + maxWidth = this.width; + } + } + }); + while (items.length > 0 && items[0].title == '-') { + items.shift(); + } + while (items.length > 0 && items[items.length - 1].title == '-') { + items.pop(); + } + var prevItem = null; + _each(items, function(i) { + if (this.title == '-' && prevItem.title == '-') { + delete items[i]; + } + prevItem = this; + }); + if (items.length > 0) { + e.preventDefault(); + var pos = K(self.edit.iframe).pos(), + menu = _menu({ + x : pos.x + e.clientX, + y : pos.y + e.clientY, + width : maxWidth, + css : { visibility: 'hidden' }, + shadowMode : self.shadowMode + }); + _each(items, function() { + if (this.title) { + menu.addItem(this); + } + }); + var docEl = _docElement(menu.doc), + menuHeight = menu.div.height(); + if (e.clientY + menuHeight >= docEl.clientHeight - 100) { + menu.pos(menu.x, _removeUnit(menu.y) - menuHeight); + } + menu.div.css('visibility', 'visible'); + self.menu = menu; + } + }); +} +function _bindNewlineEvent() { + var self = this, doc = self.edit.doc, newlineTag = self.newlineTag; + if (_IE && newlineTag !== 'br') { + return; + } + if (_GECKO && _V < 3 && newlineTag !== 'p') { + return; + } + if (_OPERA && _V < 9) { + return; + } + var brSkipTagMap = _toMap('h1,h2,h3,h4,h5,h6,pre,li'), + pSkipTagMap = _toMap('p,h1,h2,h3,h4,h5,h6,pre,li,blockquote'); + function getAncestorTagName(range) { + var ancestor = K(range.commonAncestor()); + while (ancestor) { + if (ancestor.type == 1 && !ancestor.isStyle()) { + break; + } + ancestor = ancestor.parent(); + } + return ancestor.name; + } + K(doc).keydown(function(e) { + if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) { + return; + } + self.cmd.selection(); + var tagName = getAncestorTagName(self.cmd.range); + if (tagName == 'marquee' || tagName == 'select') { + return; + } + if (newlineTag === 'br' && !brSkipTagMap[tagName]) { + e.preventDefault(); + self.insertHtml('
      ' + (_IE && _V < 9 ? '' : '\u200B')); + return; + } + if (!pSkipTagMap[tagName]) { + _nativeCommand(doc, 'formatblock', '

      '); + } + }); + K(doc).keyup(function(e) { + if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) { + return; + } + if (newlineTag == 'br') { + return; + } + if (_GECKO) { + var root = self.cmd.commonAncestor('p'); + var a = self.cmd.commonAncestor('a'); + if (a && a.text() == '') { + a.remove(true); + self.cmd.range.selectNodeContents(root[0]).collapse(true); + self.cmd.select(); + } + return; + } + self.cmd.selection(); + var tagName = getAncestorTagName(self.cmd.range); + if (tagName == 'marquee' || tagName == 'select') { + return; + } + if (!pSkipTagMap[tagName]) { + _nativeCommand(doc, 'formatblock', '

      '); + } + var div = self.cmd.commonAncestor('div'); + if (div) { + var p = K('

      '), + child = div[0].firstChild; + while (child) { + var next = child.nextSibling; + p.append(child); + child = next; + } + div.before(p); + div.remove(); + self.cmd.range.selectNodeContents(p[0]); + self.cmd.select(); + } + }); +} +function _bindTabEvent() { + var self = this, doc = self.edit.doc; + K(doc).keydown(function(e) { + if (e.which == 9) { + e.preventDefault(); + if (self.afterTab) { + self.afterTab.call(self, e); + return; + } + var cmd = self.cmd, range = cmd.range; + range.shrink(); + if (range.collapsed && range.startContainer.nodeType == 1) { + range.insertNode(K('@ ', doc)[0]); + cmd.select(); + } + self.insertHtml('    '); + } + }); +} +function _bindFocusEvent() { + var self = this; + K(self.edit.textarea[0], self.edit.win).focus(function(e) { + if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\u4e00-\u9fa5]*[\。]*<\/\w*\>\s*$/.test(self.edit.html())){ + self.edit.html(''); + } + if(typeof self.options.enable_at === 'function'){ + self.options.enable_at(); + } + if (self.afterFocus) { + self.afterFocus.call(self, e); + } + }).blur(function(e) { + if(self.isEmpty()) { + if (self.placeholder != "") { + self.edit.html("" + self.placeholder + ""); + } + // self.edit.html(self.placeholder); + // self.edit.html("" + self.placeholder + ""); + } + if (self.afterBlur) { + self.afterBlur.call(self, e); + } + }); +} +function _removeBookmarkTag(html) { + return _trim(html.replace(/]*id="?__kindeditor_bookmark_\w+_\d+__"?[^>]*><\/span>/ig, '')); +} +function _removeTempTag(html) { + return html.replace(/]+class="?__kindeditor_paste__"?[^>]*>[\s\S]*?<\/div>/ig, ''); +} +function _addBookmarkToStack(stack, bookmark) { + if (stack.length === 0) { + stack.push(bookmark); + return; + } + var prev = stack[stack.length - 1]; + if (_removeBookmarkTag(bookmark.html) !== _removeBookmarkTag(prev.html)) { + stack.push(bookmark); + } +} +function _undoToRedo(fromStack, toStack) { + var self = this, edit = self.edit, + body = edit.doc.body, + range, bookmark; + if (fromStack.length === 0) { + return self; + } + if (edit.designMode) { + range = self.cmd.range; + bookmark = range.createBookmark(true); + bookmark.html = body.innerHTML; + } else { + bookmark = { + html : body.innerHTML + }; + } + _addBookmarkToStack(toStack, bookmark); + var prev = fromStack.pop(); + if (_removeBookmarkTag(bookmark.html) === _removeBookmarkTag(prev.html) && fromStack.length > 0) { + prev = fromStack.pop(); + } + if (edit.designMode) { + edit.html(prev.html); + if (prev.start) { + range.moveToBookmark(prev); + self.select(); + } + } else { + K(body).html(_removeBookmarkTag(prev.html)); + } + return self; +} +function KEditor(options) { + var self = this; + self.options = {}; + function setOption(key, val) { + if (KEditor.prototype[key] === undefined) { + self[key] = val; + } + self.options[key] = val; + } + _each(options, function(key, val) { + setOption(key, options[key]); + }); + _each(K.options, function(key, val) { + if (self[key] === undefined) { + setOption(key, val); + } + }); + var se = K(self.srcElement || '