├── .github └── workflows │ └── codeql-analysis.yml ├── .travis.yml ├── LICENSE ├── README.md ├── cmd ├── logAgent │ ├── conf │ │ └── config.go │ ├── etc │ │ └── config.ini │ └── main.go ├── logManager │ ├── conf │ │ └── app.conf │ ├── controllers │ │ ├── collect.go │ │ ├── log.go │ │ ├── server.go │ │ ├── update.go │ │ └── user.go │ ├── main.go │ ├── models │ │ ├── collect.go │ │ ├── init.go │ │ ├── server.go │ │ └── user.go │ ├── routers │ │ └── router.go │ ├── static │ │ ├── css │ │ │ ├── main.css │ │ │ └── reset.css │ │ ├── img │ │ │ ├── icons.png │ │ │ ├── login-bg.jpg │ │ │ ├── logo.png │ │ │ └── person.png │ │ └── js │ │ │ ├── jquery-1.12.4.min.js │ │ │ └── reload.min.js │ └── views │ │ ├── collect.tpl │ │ ├── index.tpl │ │ ├── layout.tpl │ │ ├── login.tpl │ │ ├── server.tpl │ │ └── update.tpl └── logTransfer │ ├── conf │ └── config.go │ ├── etc │ └── config.ini │ ├── kafka │ └── kafka.go │ └── main.go ├── go.mod ├── go.sum ├── images ├── architecture.jpg ├── logmanager_dashboard.png ├── logmanager_host.png └── logmanager_login.png ├── pkgs ├── es │ └── es.go ├── etcd │ └── etcd.go ├── kafka │ └── kafka.go ├── logger │ └── logger.go └── taillog │ ├── tail.go │ └── tail_mgr.go └── utils ├── etcd.go ├── ip.go └── misc.go /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '31 17 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'go' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v2 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.14.x 7 | - 1.15.x 8 | - 1.16.x 9 | 10 | env: 11 | - GO111MODULE=on 12 | 13 | install: 14 | - cd cmd/logAgent && go build && cd - 15 | - cd cmd/logTransfer && go build && cd - 16 | - cd cmd/logManager && go build && cd - 17 | 18 | script: 19 | - cd cmd/logAgent && go test -v ./... && cd - 20 | - cd cmd/logTransfer && go test -v ./... && cd - 21 | - cd cmd/logManager && go test -v ./... && cd - 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # logCollect 日志收集服务 2 | 3 | [![travis-ci](https://travis-ci.com/hzde0128/logCollect.svg?branch=master)](https://travis-ci.com/github/hzde0128/logCollect) [![Code Grade](https://www.code-inspector.com/project/4797/status/svg)](https://frontend.code-inspector.com/public/project/4797/logAgent/dashboard) [![Code Quality Score](https://www.code-inspector.com/project/4797/score/svg)](https://frontend.code-inspector.com/public/project/4797/logAgent/dashboard) [![Go Report Card](https://goreportcard.com/badge/github.com/hzde0128/logCollect)](https://goreportcard.com/report/github.com/hzde0128/logCollect) 4 | 5 | ## 软件架构 6 | 7 | ![architecture](images/architecture.jpg) 8 | 9 | --- 10 | 说明 11 | 12 | 通过在运维平台上配置日志收集项,logAgent从etcd中获取要收集的日志信息从业务服务器读取日志信息,发往kafka,logTransfer负责从kafka读取日志,写入到Elasticsearch中,通过Kibana进行日志检索。系统性能数据的收集有Node_Exporter进行采集,Prometheus拉取入库,将告警信息推给AlertManager,最后通过Grafana进行可视化展示。 13 | 14 | --- 15 | 16 | 快速开发环境 17 | 18 | 使用docker-compose快速部署开发环境 19 | 20 | ```yaml 21 | version: "3" 22 | 23 | networks: 24 | app-kafka: 25 | driver: bridge 26 | 27 | services: 28 | zookeeper: 29 | container_name: zookeeper 30 | image: zookeeper:3.4.14 31 | restart: always 32 | networks: 33 | - app-kafka 34 | kafka: 35 | container_name: kafka 36 | image: bitnami/kafka:2.4.0 37 | restart: always 38 | environment: 39 | - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 40 | - ALLOW_PLAINTEXT_LISTENER=yes 41 | # 后面三条是暴露给外网使用 42 | - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT 43 | - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:29092 44 | - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 45 | ports: 46 | - 127.0.0.1:9092:9092 47 | # 外网使用29092进行访问 48 | - 127.0.0.1:29092:29092 49 | networks: 50 | - app-kafka 51 | ``` 52 | 53 | ## v0.1.0版本实现的功能 54 | 55 | - 读取日志文件 56 | 57 | - 写入到kafka中 58 | 59 | - 可以自行配置要收集的日志文件 60 | 61 | ## v0.2.0版本实现的功能 62 | 63 | - 从etcd中获取日志收集项 64 | 65 | - logAgent可以同时运行多个日志收集任务 66 | 67 | - 实现实时配置项变更 68 | 69 | - 根据当前服务器的IP地址获取配置项 70 | 71 | ## v0.3.0版本增加logTransfer服务 72 | 73 | - 实现日志入库到ES 74 | 75 | - 使用第三方日志框架logrus保存日志 76 | 77 | - 支持日志文件切割 78 | 79 | - 加入消费组,支持多个topic 80 | 81 | - tail包从上次读取的位置开始读 82 | 83 | ## v0.4.0版本增加logManager服务 84 | 85 | logManager是有Beego框架搭建起来的web服务,主要是为了方便管理日志收集项 86 | 87 | - 从后台界面添加主机和日志收集项 88 | 89 | - Cookie和Session实现 90 | 91 | - 后台访问鉴权 92 | 93 | - CURD增删改查操作完成 94 | 95 | ## v0.5.0版本logManager优化 96 | 97 | - 使用redis进行缓存 98 | 99 | - 实现从logManager进行添加/删除/修改日志收集项 100 | 101 | - logAgent获取logManager界面增删改的收集项 102 | 103 | ## 开发计划 104 | 105 | - [x] logManager使用redis进行缓存 106 | 107 | - [x] logManager添加收集项之后将配置发给etcd 108 | 109 | - [x] logAgent从etcd获取到收集项进行收集并监听变更 110 | 111 | - [ ] logTransfer从etcd获取配置写ES 112 | 113 | ![logManager-login](images/logmanager_login.png) 114 | 115 | ![logManager-dashboard](images/logmanager_dashboard.png) 116 | 117 | ![logManager-host](images/logmanager_host.png) 118 | 119 | ## 配套教程 120 | 121 | [Go运维开发之日志收集(1)收集应用程序到kafka中](https://huangzhongde.cn/post/2020-03-03-golang_devops_logAgent_1_write_log_to_kafka/) 122 | 123 | [Go运维开发之日志收集(2)从etcd中获取配置信息](https://huangzhongde.cn/post/2020-03-04-golang_devops_logAgent_2_get_config_from_etcd/) 124 | 125 | [Go运维开发之日志收集(3)根据etcd配置项创建多个tailTask](https://huangzhongde.cn/post/2020-03-04-golang_devops_logAgent_3_get_config_from_etcd_create_tailtask/) 126 | 127 | [Go运维开发之日志收集(4)监视etcd配置项的变更](https://huangzhongde.cn/post/2020-03-04-golang_devops_logAgent_4_watch_config_from_etcd/) 128 | 129 | [Go运维开发之日志收集(5)根据IP地址去拉取配置日志收集项](https://huangzhongde.cn/post/2020-03-04-golang_devops_logAgent_5_get_conf_adapter_ipaddr/) 130 | 131 | [Go运维开发之日志收集(6)从kafka中获取日志信息](https://huangzhongde.cn/post/2020-03-05-golang_devops_logAgent_6_get_data_from_kafka/) 132 | 133 | [Go运维开发之日志收集(7)将日志入库到Elasticsearch并通过Kibana进行展示](https://huangzhongde.cn/post/2020-03-05-golang_devops_logAgent_7_write_to_es/) 134 | 135 | [Go运维开发之日志收集(8)将应用程序日志写入到文件中](https://huangzhongde.cn/post/2020-03-05-golang_devops_logAgent_8_with_logrus/) 136 | 137 | [Go运维开发之日志收集(9)logTransfer支持多个Topic](https://huangzhongde.cn/post/2020-03-10-golang_devops_logAgent_9_kafka_consumer_group_multi_topics/) 138 | -------------------------------------------------------------------------------- /cmd/logAgent/conf/config.go: -------------------------------------------------------------------------------- 1 | package conf 2 | 3 | // AppConf 主配置文件 4 | type AppConf struct { 5 | CenterConf `ini:"center"` 6 | KafkaConf `ini:"kafka"` 7 | EtcdConf `ini:"etcd"` 8 | LogConf `ini:"log"` 9 | } 10 | 11 | // CenterConf center节 12 | type CenterConf struct { 13 | Address string `ini:"address"` 14 | } 15 | 16 | // KafkaConf kafka节 17 | type KafkaConf struct { 18 | Address string `ini:"address"` 19 | ChanMaxSize int `ini:"chan_max_size"` 20 | } 21 | 22 | // EtcdConf etcd节 23 | type EtcdConf struct { 24 | Address string `ini:"address"` 25 | Timeout int `ini:"timeout"` 26 | Key string `ini:"collect_log_key"` 27 | } 28 | 29 | // LogConf log节 30 | type LogConf struct { 31 | FilePath string `ini:"filePath"` 32 | FileName string `ini:"filename"` 33 | LogLevel string `ini:"loglevel"` 34 | MaxAge int `ini:"max_age"` 35 | } 36 | -------------------------------------------------------------------------------- /cmd/logAgent/etc/config.ini: -------------------------------------------------------------------------------- 1 | [center] 2 | address = 172.16.10.10:80 3 | 4 | [kafka] 5 | address = 172.16.10.10:9092 6 | chan_max_size=100000 7 | 8 | [etcd] 9 | address = 172.16.10.10:2379 10 | timeout = 5 11 | collect_log_key = /logagent/%s/collect # 收集的日志的key 12 | 13 | [log] 14 | filePath = logs 15 | filename = my.log 16 | # 日志级别 trace,debug,info,warning,error,fatal,panic 17 | loglevel = debug 18 | # 最长保存多少天 19 | max_age = 7 -------------------------------------------------------------------------------- /cmd/logAgent/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "path" 6 | "sync" 7 | "time" 8 | 9 | "logCollect/cmd/logAgent/conf" 10 | "logCollect/pkgs/etcd" 11 | "logCollect/pkgs/kafka" 12 | "logCollect/pkgs/logger" 13 | "logCollect/pkgs/taillog" 14 | "logCollect/utils" 15 | 16 | "gopkg.in/ini.v1" 17 | ) 18 | 19 | var ( 20 | cfg = new(conf.AppConf) 21 | wg sync.WaitGroup 22 | ) 23 | 24 | func main() { 25 | // 0.加载配置文件 26 | err := ini.MapTo(cfg, "etc/config.ini") 27 | if err != nil { 28 | panic(err) 29 | } 30 | // 加载日志文件 31 | // fmt.Println(path.Join(cfg.LogConf.FilePath, cfg.LogConf.FileName)) 32 | err = logger.Init(path.Join(cfg.LogConf.FilePath, cfg.LogConf.FileName), cfg.LogConf.LogLevel, time.Duration(cfg.LogConf.MaxAge)*time.Hour*24) 33 | if err != nil { 34 | logger.Log.Warnf("初始化日志文件失败, err:%v\n", err) 35 | } 36 | // logger.Log.Info("初始化日志文件成功") 37 | // 1.初始化kafka 38 | err = kafka.Init([]string{cfg.KafkaConf.Address}, cfg.KafkaConf.ChanMaxSize) 39 | if err != nil { 40 | logger.Log.Errorf("init kafka failed ,err:%v\n", err) 41 | return 42 | } 43 | logger.Log.Info("init kafka success") 44 | 45 | // 2. 初始化etcd 46 | err = etcd.Init(cfg.EtcdConf.Address, time.Duration(cfg.EtcdConf.Timeout)*time.Second) 47 | if err != nil { 48 | logger.Log.Errorf("init etcd failed, err:%v\n", err) 49 | return 50 | } 51 | logger.Log.Info("init etcd success.") 52 | 53 | // 为了实现每个logagent都拉取自己独有的配置,所以要以自己的IP地址作为区分 54 | ipStr, err := utils.GetOutboundIP(cfg.CenterConf.Address) 55 | if err != nil { 56 | logger.Log.Errorf("get local addr failed, err:%v\n", err) 57 | return 58 | } 59 | etcdConfKey := fmt.Sprintf(cfg.EtcdConf.Key, ipStr) 60 | // 2.1 从etcd中获取日志收集项的配置信息 61 | logEntryConf, err := etcd.GetConf(etcdConfKey) 62 | if err != nil { 63 | logger.Log.Errorf("get conf from etcd failed,err:%v\n", err) 64 | return 65 | } 66 | logger.Log.Infof("get conf from etcd success, %v\n", logEntryConf) 67 | for index, value := range logEntryConf { 68 | logger.Log.Debugf("index:%v value:%v\n", index, value) 69 | } 70 | 71 | // 3. 收集日志发往Kafka 72 | taillog.Init(logEntryConf) 73 | // 因为NewConfChan访问了tskMgr的newConfChan, 这个channel是在taillog.Init(logEntryConf) 执行的初始化 74 | newConfChan := taillog.NewConfChan() // 从taillog包中获取对外暴露的通道 75 | wg.Add(1) 76 | go etcd.WatchConf(etcdConfKey, newConfChan) // 哨兵发现最新的配置信息会通知上面的那个通道 77 | wg.Wait() 78 | } 79 | -------------------------------------------------------------------------------- /cmd/logManager/conf/app.conf: -------------------------------------------------------------------------------- 1 | # 服务器基础配置 2 | # 应用程序名称 3 | appname = logManager 4 | # 服务端口 5 | httpport = 8080 6 | # 运行模式 dev/prod 7 | runmode = dev 8 | # 是否启用session 9 | sessionon = true 10 | 11 | # mysql相关配置信息 12 | mysql_host = 127.0.0.1 13 | mysql_port = 3306 14 | mysql_user = root 15 | mysql_pass = 12345678 16 | mysql_db = logmanager 17 | 18 | # redis相关配置 19 | redis_host = 127.0.0.1 20 | redis_port = 6379 21 | redis_db = 0 22 | 23 | # etcd相关配置 24 | etcd_host = 127.0.0.1 25 | etcd_port = 2379 -------------------------------------------------------------------------------- /cmd/logManager/controllers/collect.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | 7 | "logCollect/cmd/logManager/models" 8 | "logCollect/utils" 9 | 10 | "github.com/astaxie/beego" 11 | "github.com/astaxie/beego/orm" 12 | ) 13 | 14 | // CollectController 日志收集 15 | type CollectController struct { 16 | beego.Controller 17 | } 18 | 19 | // LogEntry 需要收集的日志的配置信息 20 | type LogEntry struct { 21 | Path string `json:"path"` // 日志存放的路径 22 | Topic string `json:"topic"` // 日志要发往Kafka中的哪个Topic 23 | } 24 | 25 | // Get 日志收集列表展示 26 | func (c *CollectController) Get() { 27 | // 查询主机信息 28 | o := orm.NewOrm() 29 | qs := o.QueryTable("Server") 30 | 31 | var servers []models.Server 32 | _, err := qs.All(&servers) 33 | if err != nil { 34 | beego.Info("查询失败,err:", err) 35 | } else { 36 | c.Data["server"] = servers 37 | } 38 | 39 | c.Layout = "layout.tpl" 40 | c.TplName = "collect.tpl" 41 | } 42 | 43 | // Post 添加日志收集处理 44 | func (c *CollectController) Post() { 45 | // 处理用户发过来的请求 46 | server := c.GetString("server") 47 | filepath := c.GetString("filePath") 48 | topic := c.GetString("topic") 49 | beego.Info("Server:", server) 50 | beego.Info("FilePath:", filepath) 51 | beego.Info("Topic:", topic) 52 | 53 | // 处理处理 54 | if filepath == "" || topic == "" { 55 | beego.Info("路径或者Topic为空") 56 | c.Redirect("/admin/collect", http.StatusFound) 57 | } 58 | 59 | // 数据入库 60 | o := orm.NewOrm() 61 | 62 | var servers models.Server 63 | collect := models.Collect{} 64 | 65 | servers.Address = server 66 | err := o.Read(&servers, "Address") 67 | if err != nil { 68 | beego.Info("非法的服务器地址", err) 69 | return 70 | } 71 | collect.Server = &servers 72 | collect.Path = filepath 73 | collect.Topic = topic 74 | 75 | _, err = o.Insert(&collect) 76 | if err != nil { 77 | beego.Info("添加失败,", err) 78 | return 79 | } 80 | 81 | key := "/logagent/" + server + "/collect" 82 | var conf = LogEntry{ 83 | Path: filepath, 84 | Topic: topic, 85 | } 86 | 87 | // 转化为json 88 | val, _ := json.Marshal(conf) 89 | beego.Info(string(val)) 90 | _, err = utils.PutConf(key, "["+string(val)+"]") 91 | if err != nil { 92 | beego.Info("推送到etcd失败", err) 93 | } 94 | beego.Info("成功推送到etcd") 95 | 96 | c.Redirect("/admin/", http.StatusFound) 97 | } 98 | -------------------------------------------------------------------------------- /cmd/logManager/controllers/log.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "math" 5 | "net/http" 6 | "strconv" 7 | 8 | "logCollect/utils" 9 | 10 | "logCollect/cmd/logManager/models" 11 | 12 | "github.com/astaxie/beego" 13 | "github.com/astaxie/beego/orm" 14 | ) 15 | 16 | // LogController 日志 17 | type LogController struct { 18 | beego.Controller 19 | } 20 | 21 | // DeleteController 删除日志 22 | type DeleteController struct { 23 | beego.Controller 24 | } 25 | 26 | // Get 获取日志列表 27 | func (c *LogController) Get() { 28 | o := orm.NewOrm() 29 | 30 | // 获取主机列表 31 | qs := o.QueryTable("Server") 32 | 33 | servers := []models.Server{} 34 | 35 | beego.Info(qs) 36 | 37 | _, err := qs.All(&servers) 38 | if err != nil { 39 | beego.Info("查询失败,err:", err) 40 | } 41 | 42 | // 分页设置 43 | pageSize := 8 44 | 45 | query := o.QueryTable("collect") 46 | count, err := query.Count() 47 | if err != nil { 48 | beego.Info("查询失败,", err) 49 | return 50 | } 51 | 52 | // 获取页面数,向上取整 53 | page, err := strconv.Atoi(c.GetString("page")) 54 | if err != nil { 55 | page = 1 56 | } 57 | start := pageSize * (page - 1) 58 | 59 | pageCount := int(math.Ceil(float64(count) / float64(pageSize))) 60 | 61 | // 获取日志收集项 62 | var collects []models.Collect 63 | table := o.QueryTable("collect") 64 | table.Limit(pageSize, start).RelatedSel("Server").All(&collects) 65 | 66 | beego.Info("总数:", count) 67 | 68 | c.Data["pageCount"] = pageCount 69 | c.Data["count"] = count 70 | c.Data["collect"] = collects 71 | c.Data["server"] = servers 72 | c.Data["prepage"] = 1 73 | c.Data["page"] = page 74 | 75 | c.Layout = "layout.tpl" 76 | c.TplName = "index.tpl" 77 | } 78 | 79 | // Post 日志处理 80 | func (c *LogController) Post() { 81 | // 接收数据 82 | address := c.GetString("select") 83 | beego.Info("Address: ", address) 84 | if address == "" { 85 | beego.Info("下拉框传递数据失败") 86 | } 87 | // 获取分类信息 88 | c.Redirect("/admin/", http.StatusFound) 89 | } 90 | 91 | // Get 删除日志收集项 92 | func (c *DeleteController) Get() { 93 | // 获取用户输入的ID 94 | id, err := c.GetInt("id") 95 | if err != nil { 96 | beego.Info("数据非法") 97 | return 98 | } 99 | beego.Info("获取到的ID:", id) 100 | 101 | o := orm.NewOrm() 102 | // 获取对应的主机 103 | server := models.Server{} 104 | o.Raw("SELECT address FROM server WHERE id = (SELECT server_id FROM collect WHERE id = ?)", id).QueryRow(&server) 105 | 106 | beego.Info(server) 107 | // 执行删除操作 108 | collect := models.Collect{ID: id} 109 | _, err = o.Delete(&collect) 110 | if err != nil { 111 | beego.Info("删除失败,", err) 112 | return 113 | } 114 | 115 | // 拼接key 116 | key := "/logagent/" + server.Address + "/collect" 117 | //// 同时删除etcd配置 118 | _, err = utils.DelConf(key) 119 | if err != nil { 120 | beego.Info("删除失败", err) 121 | } 122 | beego.Info("删除成功") 123 | // 跳转到日志列表页 124 | c.Redirect("/admin/", http.StatusFound) 125 | } 126 | -------------------------------------------------------------------------------- /cmd/logManager/controllers/server.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "math" 5 | "net/http" 6 | "strconv" 7 | 8 | "logCollect/cmd/logManager/models" 9 | 10 | "github.com/astaxie/beego" 11 | "github.com/astaxie/beego/orm" 12 | ) 13 | 14 | // ServerController 主机结构体 15 | type ServerController struct { 16 | beego.Controller 17 | } 18 | 19 | // DeleteSvrController 删除主机 20 | type DeleteSvrController struct { 21 | beego.Controller 22 | } 23 | 24 | // Get 显示主机列表 25 | func (c *ServerController) Get() { 26 | // 显示主机列表 27 | o := orm.NewOrm() 28 | qs := o.QueryTable("Server") 29 | 30 | servers := []models.Server{} 31 | 32 | beego.Info(qs) 33 | 34 | _, err := qs.All(&servers) 35 | if err != nil { 36 | beego.Info("查询失败,err:", err) 37 | } 38 | pageSize := 5 39 | query := o.QueryTable("Server") 40 | count, err := query.Count() 41 | if err != nil { 42 | beego.Info("查询失败,", err) 43 | return 44 | } 45 | 46 | // 获取页面数,向上取整 47 | page, err := strconv.Atoi(c.GetString("page")) 48 | if err != nil { 49 | page = 1 50 | } 51 | start := pageSize * (page - 1) 52 | 53 | pageCount := int(math.Ceil(float64(count) / float64(pageSize))) 54 | table := o.QueryTable("Server") 55 | table.Limit(pageSize, start).All(&servers) 56 | 57 | c.Data["pageCount"] = pageCount 58 | c.Data["count"] = count 59 | c.Data["pagesize"] = pageSize 60 | c.Data["server"] = servers 61 | c.Data["prepage"] = 1 62 | c.Data["page"] = page 63 | 64 | c.Layout = "layout.tpl" 65 | c.TplName = "server.tpl" 66 | } 67 | 68 | // Post 添加主机 69 | func (c *ServerController) Post() { 70 | // 获取用户输入的数据 71 | serverName := c.GetString("ServerName") 72 | serverAddress := c.GetString("ServerAddress") 73 | beego.Info("ServerName:", serverName) 74 | beego.Info("ServerAddress:", serverAddress) 75 | 76 | // 简单判断 77 | if serverName == "" || serverAddress == "" { 78 | beego.Info("主机名称和地址不能为空") 79 | c.Redirect("/admin/server/", http.StatusFound) 80 | } 81 | 82 | // 初始orm 83 | o := orm.NewOrm() 84 | server := models.Server{} 85 | server.Hostname = serverName 86 | server.Address = serverAddress 87 | 88 | // 入库 89 | _, err := o.Insert(&server) 90 | if err != nil { 91 | beego.Info("添加失败") 92 | } 93 | // 跳转到主机列表页 94 | c.Redirect("/admin/server/", http.StatusFound) 95 | } 96 | 97 | // Get 删除主机 98 | func (c *DeleteSvrController) Get() { 99 | // 获取用户输入的ID 100 | id, err := c.GetInt("id") 101 | if err != nil { 102 | beego.Info("数据非法") 103 | return 104 | } 105 | beego.Info("获取到的ID:", id) 106 | 107 | // 执行删除操作 108 | o := orm.NewOrm() 109 | server := models.Server{ID: id} 110 | _, err = o.Delete(&server) 111 | if err != nil { 112 | beego.Info("删除失败,", err) 113 | return 114 | } 115 | 116 | c.Redirect("/admin/server/", http.StatusFound) 117 | } 118 | -------------------------------------------------------------------------------- /cmd/logManager/controllers/update.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | "strconv" 7 | 8 | "logCollect/utils" 9 | 10 | "logCollect/cmd/logManager/models" 11 | 12 | "github.com/astaxie/beego" 13 | "github.com/astaxie/beego/orm" 14 | ) 15 | 16 | // UpdateController 更新 17 | type UpdateController struct { 18 | beego.Controller 19 | } 20 | 21 | // Get 修改日志收集项 22 | func (c *UpdateController) Get() { 23 | // 从数据库获取当前的信息 24 | id, _ := strconv.Atoi(c.Ctx.Input.Param(":id")) 25 | beego.Info("Id: ", id) 26 | 27 | // 验证id是否非法 28 | o := orm.NewOrm() 29 | collect := models.Collect{} 30 | collect.ID = id 31 | err := o.Read(&collect, "id") 32 | if err != nil { 33 | beego.Info("无效的ID", err) 34 | return 35 | } 36 | 37 | o.QueryTable("Collect").RelatedSel("Server").Filter("id", id).All(&collect) 38 | 39 | // 显示内容 40 | c.Data["collect"] = collect 41 | 42 | c.Layout = "layout.tpl" 43 | c.TplName = "update.tpl" 44 | } 45 | 46 | // Post 处理修改日志收集项 47 | func (c *UpdateController) Post() { 48 | server := c.GetString("server") 49 | path := c.GetString("path") 50 | topic := c.GetString("topic") 51 | id, _ := strconv.Atoi(c.Ctx.Input.Param(":id")) 52 | beego.Info("Path: ", path) 53 | beego.Info("Topic: ", topic) 54 | beego.Info("Server: ", server) 55 | 56 | // 修改数据库 57 | o := orm.NewOrm() 58 | collect := models.Collect{} 59 | servers := models.Server{} 60 | servers.Address = server 61 | err := o.Read(&servers, "Address") 62 | if err != nil { 63 | beego.Info("获取主机错误") 64 | return 65 | } 66 | collect.Topic = topic 67 | collect.Path = path 68 | collect.Server = &servers 69 | collect.ID = id 70 | 71 | _, err = o.Update(&collect) 72 | if err != nil { 73 | beego.Info("修改失败,", err) 74 | return 75 | } 76 | 77 | // 更新etcd 78 | key := "/logagent/" + server + "/collect" 79 | var conf = LogEntry{ 80 | Path: path, 81 | Topic: topic, 82 | } 83 | 84 | // 转化为json 85 | val, _ := json.Marshal(conf) 86 | beego.Info(string(val)) 87 | _, err = utils.PutConf(key, "["+string(val)+"]") 88 | if err != nil { 89 | beego.Info("推送到etcd失败", err) 90 | } 91 | beego.Info("成功推送到etcd") 92 | 93 | c.Redirect("/admin/", http.StatusFound) 94 | } 95 | -------------------------------------------------------------------------------- /cmd/logManager/controllers/user.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | "net/http" 7 | "time" 8 | 9 | "logCollect/utils" 10 | 11 | "logCollect/cmd/logManager/models" 12 | 13 | "github.com/astaxie/beego" 14 | "github.com/astaxie/beego/orm" 15 | ) 16 | 17 | // LoginController 登录 18 | type LoginController struct { 19 | beego.Controller 20 | } 21 | 22 | // LogoutController 登出 23 | type LogoutController struct { 24 | beego.Controller 25 | } 26 | 27 | // Get 登录页面 28 | func (c *LoginController) Get() { 29 | // 获取Cookie 30 | username := c.Ctx.GetCookie("username") 31 | if username != "" { 32 | c.Data["username"] = username 33 | c.Data["check"] = "checked" 34 | } 35 | c.TplName = "login.tpl" 36 | } 37 | 38 | // Post 登录处理页面 39 | func (c *LoginController) Post() { 40 | // 处理登录请求 41 | // 1.获取用户输入的数据 42 | userName := c.GetString("userName") 43 | password := c.GetString("password") 44 | // 检查是否记住用户名 45 | remember := c.GetString("remember") 46 | // beego.Info(userName, password, remember) 47 | 48 | // 2.数据处理 49 | if userName == "" || password == "" { 50 | c.TplName = "login.tpl" 51 | return 52 | } 53 | 54 | // 3.数据查询 55 | // 3.1获取orm对象 56 | o := orm.NewOrm() 57 | 58 | // 3.2获取查询对象 59 | user := models.User{} 60 | 61 | // 3.3查询数据 62 | user.Username = userName 63 | 64 | err := o.Read(&user, "userName") 65 | if err != nil { 66 | beego.Info("用户名或密码错误") 67 | c.TplName = "login.tpl" 68 | return 69 | } 70 | //md5验证 71 | data := []byte(password) 72 | has := md5.Sum(data) 73 | if user.Password != fmt.Sprintf("%x", has) { 74 | beego.Info("用户名或密码错误") 75 | c.TplName = "login.tpl" 76 | return 77 | } 78 | 79 | // 设置Cookie 80 | if remember == "on" { 81 | c.Ctx.SetCookie("username", userName, 7*24*time.Hour) 82 | } else { 83 | c.Ctx.SetCookie("username", userName, -1) 84 | } 85 | // 设置session 86 | c.SetSession("username", userName) 87 | // 4.返回视图 88 | c.Redirect("/admin/", http.StatusFound) 89 | 90 | // 创建sessionId 91 | sessionID := utils.Md5String(userName) 92 | // 将用户信息加入redis中 93 | bm, err := utils.RedisConn() 94 | if err != nil { 95 | beego.Info("Redis连接失败", err) 96 | } 97 | // session保留10分钟 98 | err = bm.Put(sessionID, userName, time.Second*600) 99 | if err != nil { 100 | beego.Info("存入redis失败", err) 101 | } 102 | } 103 | 104 | // Get 退出登录 105 | func (c *LogoutController) Get() { 106 | // 1.删除session 107 | c.DelSession("username") 108 | 109 | // 2.跳转到登录页面 110 | c.Redirect("/", http.StatusFound) 111 | } 112 | -------------------------------------------------------------------------------- /cmd/logManager/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | 7 | "logCollect/cmd/logManager/models" 8 | _ "logCollect/cmd/logManager/routers" 9 | "logCollect/utils" 10 | 11 | "github.com/astaxie/beego" 12 | "github.com/astaxie/beego/orm" 13 | ) 14 | 15 | func main() { 16 | // 加载配置 17 | utils.Init() 18 | // 上一页/下一页 19 | beego.AddFuncMap("prepage", prepage) 20 | beego.AddFuncMap("nextpage", nextpage) 21 | 22 | orm.Debug = true 23 | 24 | // 初始化一个管理用户 25 | o := orm.NewOrm() 26 | 27 | user := models.User{} 28 | user.Username = "admin" 29 | 30 | err := o.Read(&user, "username") 31 | if err != nil { 32 | beego.Info("用户admin不存在,添加用户") 33 | // md5存放 34 | data := []byte("admin") 35 | has := md5.Sum(data) 36 | user.Password = fmt.Sprintf("%x", has) 37 | o.Insert(&user) 38 | } 39 | 40 | beego.Run() 41 | } 42 | 43 | // prepage 上一页 44 | func prepage(idx int) (page int) { 45 | if idx > 1 { 46 | page = idx - 1 47 | } else { 48 | page = idx 49 | } 50 | return 51 | } 52 | 53 | // nextpage 下一页 54 | func nextpage(idx, count int) (page int) { 55 | if idx < count { 56 | page = idx + 1 57 | } else { 58 | page = count 59 | } 60 | return 61 | } 62 | -------------------------------------------------------------------------------- /cmd/logManager/models/collect.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "time" 4 | 5 | // Collect 日志收集表 6 | type Collect struct { 7 | ID int 8 | Path string // 日志文件路径 9 | Topic string // 日志对应的Topic 10 | Server *Server `orm:"rel(fk)"` // 服务器信息 11 | CreateTime time.Time `orm:"type(datetime);auto_now_add"` // 添加时间 12 | } 13 | -------------------------------------------------------------------------------- /cmd/logManager/models/init.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "logCollect/utils" 5 | 6 | "github.com/astaxie/beego" 7 | "github.com/astaxie/beego/orm" 8 | 9 | "time" 10 | 11 | // mysql driver 12 | _ "github.com/go-sql-driver/mysql" 13 | ) 14 | 15 | func init() { 16 | utils.Init() 17 | orm.DefaultTimeLoc = time.Local 18 | dsn := utils.GMysqlUser + ":" + utils.GMysqlPass + "@tcp(" + utils.GMysqlHost + ":" + utils.GMysqlPort + ")/" + utils.GMysqlDb 19 | beego.Info("dsn:", dsn) 20 | orm.RegisterDataBase("default", "mysql", dsn+"?charset=utf8") 21 | orm.RegisterModel(new(User), new(Server), new(Collect)) 22 | orm.RunSyncdb("default", false, false) 23 | } 24 | -------------------------------------------------------------------------------- /cmd/logManager/models/server.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Server 主机表 4 | type Server struct { 5 | ID int 6 | Hostname string `orm:"unique"` // 主机名称 7 | Address string // 主机地址 8 | Collect []*Collect `orm:"reverse(many)"` 9 | } 10 | -------------------------------------------------------------------------------- /cmd/logManager/models/user.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // User 用户表 4 | type User struct { 5 | ID int 6 | Username string `orm:"unique"` // 用户名 7 | Password string // 用户密码 8 | } 9 | -------------------------------------------------------------------------------- /cmd/logManager/routers/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "net/http" 5 | 6 | "logCollect/cmd/logManager/controllers" 7 | 8 | "github.com/astaxie/beego" 9 | "github.com/astaxie/beego/context" 10 | ) 11 | 12 | func init() { 13 | // 路由过滤器,在进入后台之前进行session判断 14 | beego.InsertFilter("/admin/*", beego.BeforeRouter, filterFunc) 15 | beego.Router("/", &controllers.LoginController{}) 16 | beego.Router("/logout", &controllers.LogoutController{}) 17 | beego.Router("/admin/", &controllers.LogController{}) 18 | beego.Router("/admin/collect/", &controllers.CollectController{}) 19 | beego.Router("/admin/collect/delete", &controllers.DeleteController{}) 20 | beego.Router("/admin/collect/?:id", &controllers.UpdateController{}) 21 | beego.Router("/admin/server/", &controllers.ServerController{}) 22 | beego.Router("/admin/server/delete", &controllers.DeleteSvrController{}) 23 | } 24 | 25 | var filterFunc = func(ctx *context.Context) { 26 | username := ctx.Input.Session("username") 27 | if username == nil { 28 | ctx.Redirect(http.StatusFound, "/") 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cmd/logManager/static/css/main.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background:#f1f2f6; 3 | font-family:'Microsoft YaHei'; 4 | } 5 | 6 | .login_logo{ 7 | background:rgba(47,64,80,0.4); 8 | height:45px; 9 | } 10 | 11 | .login_logo img{ 12 | margin:5px 0 0 10px; 13 | } 14 | 15 | .header{ 16 | width:100%; 17 | height:60px; 18 | overflow:hidden; 19 | background:#2f4050; 20 | position:fixed; 21 | left:0px; 22 | top:0px; 23 | } 24 | 25 | .header .logo{ 26 | width:194px; 27 | height:33px; 28 | margin:13px 0 0 20px; 29 | } 30 | 31 | .header .logout{ 32 | width:90px; 33 | height:30px; 34 | background:url(../img/icons.png) 10px -344px no-repeat #1ab394; 35 | margin:15px 20px 0 0; 36 | border-radius:4px; 37 | text-indent:40px; 38 | line-height:30px; 39 | font-size:14px; 40 | color:#fff; 41 | } 42 | 43 | .header .logout:hover{ 44 | width:88px; 45 | height:28px; 46 | border:1px solid #1ab394; 47 | background:url(../img/icons.png) 10px -344px no-repeat #2f4050; 48 | opacity:0.5; 49 | } 50 | 51 | .side_bar{ 52 | position:fixed; 53 | width:210px; 54 | background:#466079; 55 | left:0px; 56 | top:60px; 57 | bottom:0px; 58 | } 59 | 60 | .user_info{ 61 | width:210px; 62 | overflow:hidden; 63 | } 64 | 65 | .user_info img{ 66 | display:block; 67 | margin:20px auto 0; 68 | width:68px; 69 | height:68px; 70 | border-radius:34px; 71 | } 72 | 73 | .user_info p{ 74 | text-align:center; 75 | font-size:14px; 76 | color:#bdcbd8; 77 | margin:10px auto; 78 | } 79 | 80 | .user_info em{ 81 | font-weight:bold; 82 | color:#1ab394; 83 | } 84 | 85 | .menu_con{ 86 | width:210px; 87 | margin-top:10px; 88 | overflow:hidden; 89 | } 90 | 91 | .first_menu{ 92 | height:44px; 93 | border-bottom:1px solid #597b9b; 94 | background:url(../img/icons.png) 190px -283px no-repeat; 95 | } 96 | 97 | .menu_con .active{ 98 | background:url(../img/icons.png) 190px -283px no-repeat #2f4050; 99 | border-bottom:0px; 100 | } 101 | 102 | .menu_con a{ 103 | display:block; 104 | height:44px; 105 | line-height:44px; 106 | color:#e5f1fc; 107 | font-size:12px; 108 | text-indent:60px; 109 | } 110 | 111 | .icon01{ 112 | background:url(../img/icons.png) 20px 12px no-repeat; 113 | } 114 | 115 | .icon02{ 116 | background:url(../img/icons.png) 20px -38px no-repeat; 117 | } 118 | 119 | .icon021{ 120 | background:url(../img/icons.png) 50px -87px no-repeat; 121 | } 122 | 123 | .icon022{ 124 | background:url(../img/icons.png) 50px -139px no-repeat; 125 | } 126 | 127 | 128 | .icon03{ 129 | background:url(../img/icons.png) 20px -89px no-repeat; 130 | } 131 | 132 | .icon031{ 133 | background:url(../img/icons.png) 50px -185px no-repeat; 134 | } 135 | 136 | .icon032{ 137 | background:url(../img/icons.png) 50px -235px no-repeat; 138 | } 139 | 140 | .icon033{ 141 | background:url(../img/icons.png) 50px -336px no-repeat; 142 | } 143 | 144 | .icon034{ 145 | background:url(../img/icons.png) 50px -390px no-repeat; 146 | } 147 | 148 | .sub_menu{ 149 | display:none; 150 | border-bottom:1px solid #597b9b; 151 | } 152 | 153 | .sub_menu li{ 154 | background:url(../img/icons.png) 190px -283px no-repeat #2f4050; 155 | } 156 | 157 | .sub_menu a{ 158 | text-indent:80px; 159 | } 160 | 161 | .show{ 162 | display:block; 163 | } 164 | 165 | .main_body{ 166 | position:fixed; 167 | background:#f9f9f9; 168 | left:210px; 169 | top:60px; 170 | right:0px; 171 | bottom:0px; 172 | } 173 | 174 | .breadcrub{ 175 | width:96%; 176 | height:35px; 177 | line-height:35px; 178 | background-color:#deecf9; 179 | margin:20px auto 0; 180 | font-size:14px; 181 | border-left:5px solid #f80; 182 | text-indent:10px; 183 | color:#666; 184 | } 185 | 186 | .pannel{ 187 | width:96%; 188 | height:600px; 189 | overflow:hidden; 190 | margin:20px auto 0; 191 | background-color:#fff; 192 | } 193 | 194 | .spannels{ 195 | overflow:hidden; 196 | margin:20px auto 0; 197 | } 198 | 199 | .spannel{ 200 | width:31%; 201 | float:left; 202 | margin-left:2%; 203 | height:100px; 204 | overflow:hidden; 205 | text-align:center; 206 | position:relative; 207 | } 208 | 209 | .spannel2{ 210 | width:30%; 211 | float:left; 212 | margin-left:2%; 213 | height:100px; 214 | overflow:hidden; 215 | text-align:center; 216 | position:relative; 217 | } 218 | 219 | .spannel em,.spannel2 em{ 220 | font-size:50px; 221 | line-height:50px; 222 | display:inline-block; 223 | margin:10px 0 0 20px; 224 | font-family:'Arial'; 225 | color:rgba(255,255,255,0.8); 226 | } 227 | 228 | .spannel span,.spannel2 span{ 229 | font-size:14px; 230 | display:inline-block; 231 | color:rgba(255,255,255,0.8); 232 | margin-left:10px; 233 | } 234 | 235 | .spannel b,.spannel2 b{ 236 | position:absolute; 237 | left:0; 238 | bottom:0; 239 | width:100%; 240 | line-height:24px; 241 | background:rgba(0,0,0,0.1); 242 | color:#fff; 243 | font-size:14px; 244 | font-weight:normal; 245 | } 246 | 247 | 248 | 249 | .scolor01{ 250 | background-color:#ff9565; 251 | } 252 | 253 | .scolor02{ 254 | background-color:#9ed367; 255 | } 256 | 257 | .scolor03{ 258 | background-color:#23b7e5; 259 | } 260 | 261 | .chart_show{ 262 | width:100%; 263 | height:400px; 264 | } 265 | 266 | .login_bg{ 267 | position:fixed; 268 | left:0; 269 | top:0; 270 | width:100%; 271 | height:100%; 272 | z-index:-9999; 273 | background:url(../img/login-bg.jpg) no-repeat; 274 | } 275 | 276 | .login_form{ 277 | width:330px; 278 | height:292px; 279 | background:#fff; 280 | position:fixed; 281 | left:50%; 282 | top:50%; 283 | margin-top:-146px; 284 | margin-left:-165px; 285 | overflow:hidden; 286 | border-radius:6px; 287 | } 288 | 289 | .login_form .error_tip{ 290 | position:absolute; 291 | font-size:12px; 292 | color:#f00; 293 | bottom:84px; 294 | left:18px; 295 | display:none; 296 | } 297 | 298 | .login_form .remember{ 299 | position:absolute; 300 | font-size:12px; 301 | color:#333; 302 | bottom:84px; 303 | left:16px; 304 | } 305 | 306 | .login_form .remember input{ 307 | float:left; 308 | margin-top:2px; 309 | } 310 | 311 | .login_form .remember label{ 312 | float:left; 313 | margin-left:6px; 314 | } 315 | 316 | 317 | 318 | .login_title{ 319 | line-height:72px; 320 | text-align:center; 321 | background:#1ab394; 322 | color:#fff; 323 | font-size:20px; 324 | } 325 | 326 | .input_txt{ 327 | display:block; 328 | margin:20px auto 0; 329 | width:298px; 330 | height:32px; 331 | border:1px solid #d0d0d0; 332 | border-radius:4px; 333 | outline:none; 334 | text-indent:10px; 335 | } 336 | 337 | .forget_pass{ 338 | display:block; 339 | width:298px; 340 | margin:10px auto 0; 341 | text-align:right; 342 | font-size:14px; 343 | color:#5195d0; 344 | } 345 | 346 | .input_sub{ 347 | display:block; 348 | margin:40px auto 0; 349 | width:298px; 350 | height:32px; 351 | border:0px; 352 | border-radius:4px; 353 | background:#1ab394; 354 | color:#fff; 355 | cursor:pointer; 356 | } 357 | 358 | .input_sub:hover{ 359 | opacity:0.8; 360 | } 361 | 362 | 363 | .common_table{ 364 | width:100%; 365 | border-collapse:collapse; 366 | border:1px solid #d1d1d1; 367 | } 368 | 369 | .common_table th,.common_table td{ 370 | border:1px solid #d1d1d1; 371 | text-align:center; 372 | padding:13px 0px; 373 | font-size:12px; 374 | } 375 | 376 | .pagenation{ 377 | padding:0px; 378 | list-style:none; 379 | width:960px; 380 | height:40px; 381 | margin:20px auto 0; 382 | text-align:center; 383 | font-size:0px; 384 | } 385 | 386 | .pagenation li{ 387 | display:inline-block; 388 | height:26px; 389 | font-size:12px; 390 | margin:7px 5px 0px; 391 | } 392 | 393 | .pagenation a{ 394 | line-height:26px; 395 | text-decoration:none; 396 | color:#393c35; 397 | display:block; 398 | padding:0px 10px; 399 | border:1px solid #d1d1d1; 400 | } 401 | 402 | .pagenation a:hover{ 403 | background:#f80; 404 | color:#fff; 405 | } 406 | 407 | .review,.edit,.addtype{ 408 | display:inline-block; 409 | width:40px; 410 | line-height:20px; 411 | margin:-5px 5px; 412 | border-radius:4px; 413 | color:#fff; 414 | background:#25c192; 415 | } 416 | 417 | .addtype{ 418 | width:100px; 419 | line-height:26px; 420 | border:0px; 421 | } 422 | 423 | .edit{ 424 | background:#25c192; 425 | } 426 | 427 | .common_table .tleft{ 428 | text-align:left; 429 | text-indent:10px; 430 | } 431 | 432 | .review_title{ 433 | font-size:18px; 434 | line-height:40px; 435 | text-indent:20px; 436 | border-bottom:1px solid #ddd; 437 | margin-bottom:20px; 438 | } 439 | 440 | .form_group{ 441 | overflow:hidden; 442 | margin-bottom:15px; 443 | } 444 | 445 | .form_group label{ 446 | float:left; 447 | width:12%; 448 | line-height:30px; 449 | text-align:right; 450 | font-size:14px; 451 | } 452 | 453 | .form_group .input_txt2{ 454 | width:86%; 455 | height:30px; 456 | float:left; 457 | text-indent:10px; 458 | outline:none; 459 | border-radius:4px; 460 | border:1px solid #d0d0d0; 461 | box-sizing:border-box; 462 | } 463 | 464 | .form_group .input_area,.form_group .input_multxt{ 465 | width:86%; 466 | height:300px; 467 | float:left; 468 | padding:10px; 469 | outline:none; 470 | font-family:'Microsoft YaHei'; 471 | font-size:14px; 472 | border-radius:4px; 473 | border:1px solid #d0d0d0; 474 | box-sizing:border-box; 475 | } 476 | 477 | .form_group .input_multxt{ 478 | height:200px; 479 | } 480 | 481 | .rich_wrap{ 482 | width:86%; 483 | } 484 | 485 | .form_group .sel_opt{ 486 | width:150px; 487 | height:30px; 488 | float:left; 489 | border:1px solid #ddd; 490 | border-radius:4px; 491 | outline:none; 492 | text-indent:10px; 493 | } 494 | 495 | .sel_opt{ 496 | width:150px; 497 | height:26px; 498 | border:1px solid #ddd; 499 | background:#fff; 500 | border-radius:4px; 501 | outline:none; 502 | text-indent:10px; 503 | margin-bottom:10px 504 | } 505 | 506 | .sel_label{ 507 | float: left; 508 | font-size: 14px; 509 | margin-top: 2px; 510 | } 511 | 512 | .type_txt{ 513 | width:300px; 514 | height:24px; 515 | border:1px solid #ddd; 516 | border-radius:4px; 517 | outline:none; 518 | text-indent:10px; 519 | } 520 | 521 | .form_group .index_pic{ 522 | width:100px; 523 | height:100px; 524 | float:left; 525 | margin:0px; 526 | } 527 | 528 | .form_group .detail{ 529 | width:86%; 530 | float:left; 531 | font-size:14px; 532 | line-height:30px; 533 | } 534 | 535 | .form_group .detail b{ 536 | font-size:16px; 537 | } 538 | 539 | .group_hide{ 540 | display:none; 541 | } 542 | 543 | .indent_group{ 544 | text-indent:12%; 545 | margin-top:15px; 546 | } 547 | 548 | .confirm{ 549 | width:80px; 550 | height:30px; 551 | border-radius:4px; 552 | color:#fff; 553 | background:#25c192; 554 | border:0px; 555 | outline:none; 556 | } 557 | 558 | .cancel{ 559 | width:80px; 560 | height:30px; 561 | border-radius:4px; 562 | color:#fff; 563 | background:#25c192; 564 | border:0px; 565 | outline:none; 566 | } 567 | 568 | .line_top{ 569 | border-top:1px solid #ddd; 570 | padding:10px 0px; 571 | } 572 | 573 | .input_file{ 574 | margin-top:4px; 575 | } 576 | 577 | 578 | .pop{ 579 | width:500px; 580 | height:270px; 581 | border:1px solid #ddd; 582 | background:#fff; 583 | position:fixed; 584 | left:50%; 585 | top:50%; 586 | margin-top:-151px; 587 | margin-left:-251px; 588 | z-index:9999; 589 | } 590 | 591 | .pop h3{ 592 | background:#25c192; 593 | line-height:40px; 594 | margin:2px; 595 | color:#fff; 596 | text-indent:10px; 597 | } 598 | 599 | .form_group .input_label{ 600 | width:80px; 601 | line-height:32px; 602 | margin-left:60px; 603 | } 604 | 605 | .form_group .error_tip{ 606 | position:absolute; 607 | left:141px; 608 | top:132px; 609 | color:#f00; 610 | font-size:12px; 611 | display:none; 612 | } 613 | 614 | .input_txt3{ 615 | width:298px; 616 | height:32px; 617 | border:1px solid #d0d0d0; 618 | border-radius:4px; 619 | outline:none; 620 | text-indent:10px; 621 | } 622 | 623 | .mt50{ 624 | margin-top:50px; 625 | } 626 | 627 | .pop .line_top{ 628 | text-align:center; 629 | margin-top:80px; 630 | padding-top:15px; 631 | } 632 | 633 | .mask{ 634 | position:fixed; 635 | width:100%; 636 | height:100%; 637 | background:#000; 638 | left:0px; 639 | top:0px; 640 | opacity:0.3 641 | } 642 | 643 | .pop_con{ 644 | display:none; 645 | } 646 | 647 | .category_name{ 648 | font-size:14px; 649 | line-height:30px; 650 | } 651 | 652 | .ui-pagination-container{ 653 | text-align:center; 654 | margin-top:5px; 655 | } -------------------------------------------------------------------------------- /cmd/logManager/static/css/reset.css: -------------------------------------------------------------------------------- 1 | /* 去掉标签默认的间距 */ 2 | body,ul,ol,p,h1,h2,h3,h4,h4,h6,dl,dd,select,input,form{ 3 | margin:0; 4 | padding:0; 5 | } 6 | /* 去掉小圆点以及数字 */ 7 | ul,ol{ 8 | list-style:none; 9 | } 10 | /* 去掉下划线 */ 11 | a{text-decoration:none;} 12 | 13 | /* 去掉斜体 */ 14 | em{ 15 | font-style:normal; 16 | } 17 | /* 让h标签继承body的文字设置 */ 18 | h1,h2,h3,h4,h4,h6{ 19 | font-size:100%; 20 | font-weight:normal; 21 | } 22 | /* 在IE下去掉图片做链接时生成的框线 */ 23 | img{ 24 | border:0px; 25 | } 26 | 27 | /* 清除浮动以及清除margin-top塌陷 */ 28 | .clearfix:before,.clearfix:after{ 29 | content:''; 30 | display:table; 31 | } 32 | .clearfix:after{ 33 | clear:both; 34 | } 35 | .clearfix{ 36 | zoom:1; 37 | } 38 | 39 | 40 | .fl{ 41 | float:left; 42 | } 43 | 44 | .fr{ 45 | float:right; 46 | } 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /cmd/logManager/static/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hzde0128/logCollect/5e92f9447d2c83e0072779001864dad9436fdeca/cmd/logManager/static/img/icons.png -------------------------------------------------------------------------------- /cmd/logManager/static/img/login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hzde0128/logCollect/5e92f9447d2c83e0072779001864dad9436fdeca/cmd/logManager/static/img/login-bg.jpg -------------------------------------------------------------------------------- /cmd/logManager/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hzde0128/logCollect/5e92f9447d2c83e0072779001864dad9436fdeca/cmd/logManager/static/img/logo.png -------------------------------------------------------------------------------- /cmd/logManager/static/img/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hzde0128/logCollect/5e92f9447d2c83e0072779001864dad9436fdeca/cmd/logManager/static/img/person.png -------------------------------------------------------------------------------- /cmd/logManager/static/js/jquery-1.12.4.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; 3 | }return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("